On 12 Feb 2003, Jean-Marc Lasgouttes wrote:

>> Taking a snapshot of lyx wiki

Here is a better solution (assuming that you can write to $LYXDIR/doc)
  cd $LYXDIR     # i.e. to .../share/lyx
  wget -r -P doc -nh -nH -k -p -R '*\?*' http://ev-en.org/wiki/moin.cgi/LyxWikis

this will create a snapshot structure of all the wikis in 

    $LYXDIR
        |-- doc
        |   `-- wiki
        |       |-- img
        |       `-- moin.cgi    (here's where the actual wikis are)

and you don't have to post-parse the files since wget does that at end
for you (I think it's the  switch -P combined with -k that fixes this).

A link in LyxWikis will now look like this:
        <a href="LyxFAQ">LyxFAQ</a>

i.e. it will have a relative path, so it doesn't matter where $LYXDIR 
actually is. There will still be paths that doesn't work, such as:
        <a href="/wiki/moin.cgi/LyxWikis?action=edit">EditText</a>

but they wont work properly without a cgi-script anyway.

So, to sum it up. It ought to be really easy to send this stuff with any 
lyx installation doing as I've described above. Then it's just a matter of 
informing the user that if he opens an URL such as this:

        file://localhost/usr/local/share/lyx/doc/wiki/moin.cgi/LyxFAQ

he'll find a local copy of the FAQ.

Of course, at the moment everything gets passed along, so it might be 
prudent to execute something like:
        rm `grep -i -L lyx $LYXDIR/share/doc/wiki/moin.cgi/*`

or do it the otherway around, and add a certain text-tag to the pages we 
want to be exported. 

/Christian

-- 
Christian Ridderström, +46-8-790 91 37           http://www.md.kth.se/~chr
Mechatronics lab, Dept. of Machine Design        http://www.md.kth.se

Reply via email to