Hi again Russ,


Well, if you were able to switch to a database (like mysql or ms sql server) you would be able to:

-          Extract the actual text in the topics rather than the html presentation of the texts on each page/topic and

-          Use sql functions like replace to change the wiki syntax.


Depending on the amount of information it could be worthwhile to explore this alternative.






From: Russ Tremain [mailto:russt@releasetools.org]
Sent: Tuesday, July 20, 2010 7:57 PM
To: Marcello Teodori
Cc: Johan Lindell; veryquickwiki-users@lists.sourceforge.net
Subject: Re: [veryquickwiki-users] convert vqwiki to mediawiki?




I'm not sure how exporting from the database helps me, since the issue is translation from vqwiki syntax to mediawiki syntax in source documents, and I don't even use a database. ;)


Since my post, I have tried a few things, and made some progress.


First, I tried to use a perl-based html-to-wiki translator (found here):


        html2wiki --dialect MediaWiki topic_file ...


This failed miserably even for simple pages.


If you think about it, it seems like a much harder problem to convert html-ified wiki content, verses just translating the original wiki source form.  Ultimately, I decided to take the latter approach, and have written a translator to do the job.  The translator takes this approach:


I.   tokenize the original vqwiki sources to a generalized intermediate form (some have used XML for this; I did not)

II.  define mediawiki macros to translate the intermediate form to a different syntax.


As an simple example, here is the intermediate form for a Topic:




So if I define:





then I can output mediaWiki syntax (actually vqwiki already allows this input syntax, along with back-tick quotes, but you get the idea.)


Obviously the full problem is deeper than this, but I believe I have solved most of it.  I will post the sources somewhere after I do some more testing.


Step II. could theoretically be any arbitrary wiki syntax, though at the present time I am only interested in mediawiki.


As an aside, I also had the idea of switching vqwiki to use mediawiki input syntax, by setting:



in WEB-INF/classes/vqwiki.properties.  However, it doesn't seem to do much.  Either I'm not doing it right, or the work was never finished on this lexer.  I followed the instructions here.


I think this is a better long term approach for the community, since it would allow vqwiki as an alternative to JAM and/or the full MediaWiki behemoth.  In my case, the only goal is to force myself to start using media-wiki syntax.  There are serveral things I like about vqwiki over other wiki's, like the fact that I don't have to use a database for a small installation on my laptop.  Keeping the topics in the filesystem makes it very easy to move around and to backup.






At 5:42 PM +0100 7/20/10, Marcello Teodori wrote:

Hi, thanks for this useful info, it's something that should be added to the documentation as a FAQ entry or somewhere else.

I've been thinking a lot about adding a sort of driver concept support to the Export2HTML feature to allow exporting to different file formats, mostly with the Creole format in mind to avoid vqwiki syntax lock-in and also allow changing the syntax at a future version upgrade.



Marcello Teodori


On 16/lug/2010, at 14.15, Johan Lindell wrote:

Hi Russ,


If you switch to database mode you can retrieve the contents from the Topic table. If you set up database persistence you can import the wiki-pages/files to the database and the retrieve them from there


Med Vänliga Hälsningar

Johan Lindell


Vimur AB


+46 73 600 27 93



Sövdeborgsgatan 13

216 19  MALMÖ


From: Russ Tremain [mailto:russt@releasetools.org] 
Sent: Monday, July 12, 2010 6:47 PM
To: veryquickwiki-users@lists.sourceforge.net
Subject: [veryquickwiki-users] convert vqwiki to mediawiki?




I've written a lot of content in vqwiki, but unfortunately my current employer uses media wiki for mark-up.


Any hints on the easiest way to convert content from vqwiki to mediawiki?


I'm currently using vqwiki 2.8.1.


Possibly I can go the Export2HTML route, but that seems error prone.





P.S.  here is a useful post, which summarized a bunch of conversion tools last year.  Seems like Atlassian has the most mature tool, but it is to convert everything to Confluence (their product).


This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first_______________________________________________
veryquickwiki-users mailing list