NOTE: If you are a developer, please use a private wiki based on foswiki/trunk on a daily base ...or use trunk.foswiki.org to view this page for some minimal testing.
Use Item11383 for general documentation changes for release 1.1.5. Use Item9693 for docu changes for release 2.0.

Item1079: Create foswiki2twiki

Priority: CurrentState: AppliesTo: Component: WaitingFor:
Normal Closed Extension BuildContrib  
Some of us are still cursed with having to support TWiki for clients. Because I find development easier in Foswiki, I prefer to have my extensions in that namespace; but I also need to be able to convert back to TWiki.

I have a script derived from twiki2foswiki that does the job - ish. It makes a copy of the relevant Foswiki files, converts them but does not add them to subversion. The intent is that the script should be useable as a build step e.g. perl build.pl twiki.

-- CrawfordCurrie - 14 Feb 2009

Done as a BuildContrib feature.

-- CrawfordCurrie - 15 Feb 2009

The fix in Foswikirev:2602 bothered me, thus I looked into it. In fact the problem is that:
my $text = $this->$sub(<$fh>);
will evaluate the angle operator in list context, whereas
my $text = <$fh>;
will evaluate in scalar context.

The huge difference here is that in list context, undef is undef, whereas it's "" in scalar context. Therefore, if you want to avoid using a temporary variable, use scalar():
my $text = $this->$sub(scalar(<$fh>));

So if the file in $fh is empty, it will return undef (as it's eof()), and it will break.

Maybe the root cause of the issue is that the file shouldn't be empty?

The empty files are:
TinyMCEPlugin/pub/System/TinyMCEPlugin/tinymce/jscripts/tiny_mce/plugins/inlinepopups/readme.txt
core/data/_empty/WebPreferences.txt

-- OlivierRaginel - 23 Feb 2009

ItemTemplate edit

Summary Create foswiki2twiki
ReportedBy CrawfordCurrie
Codebase
SVN Range SVN 2501: Foswiki-1.0.0, Sat, 14 Feb 2009, build 2492
AppliesTo Extension
Component BuildContrib
Priority Normal
CurrentState Closed
WaitingFor
Checkins Foswikirev:2507 Foswikirev:2602
ReleasedIn
Topic revision: r7 - 23 Feb 2009 - 13:20:27 - OlivierRaginel
 
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. see CopyrightStatement. Creative Commons LicenseGet Foswiki at sourceforge.net. Fast, secure and Free Open Source software downloads