[yunqa.de] Re: AutoIt Importer

  • From: Delphi Inspiration <delphi@xxxxxxxx>
  • To: yunqa@xxxxxxxxxxxxx
  • Date: Tue, 20 Jul 2010 07:26:53 +0200

On 19.07.2010 19:58, complex junk wrote:

> I routinely use WikiTaxi as an offline backup for my personal wiki,
> and I wanted to share my solution for those who export directly from
> their MediaWiki export page. It's an AutoIT script that requires
> 7-zip. Once compiled, it lets you drag and drop (or run standalone to
> choose) a file, automatically compresses file to bz2 with 7-zip, runs
> the Taxi Importer and types in the appropriate file names, launches
> WikiTaxi and navigates to the main page.
> 
> I put it on PasteBin with commented code: http://pastebin.com/Sxx5xhPX
> It is for anyone to use or modify freely. You need this to compile it:
> http://www.autoitscript.com/autoit3/index.shtml
> 
> Towards the end, it assumes you have a small wiki when it launches the
> newly converted WikiTaxi file, you may want to adjust if you plan on
> using this for very large wikis (remove section launching WikiTaxi
> after import).

Interesting script. If you like, you can register for the WikiTaxi Wiki
page at http://wikitaxi.org/delphi/doku.php/wiki/wikitaxi/index, create
a new page for your importer and post the script there.

> This is mainly a workaround because I feel there are missing features
> in WikiTaxi:
> 1. You cannot directly import .xml, you must first compress it to a ".xml.bz2"
> 2. There are no command line arguments for the importer, manual
> interaction is required.

Both are correct. However, if there is demand - and your script suggests
this - I will look into adding both features.

> 3. WikiTaxi picks a pseudo-random page on launch, you cannot specify
> (via command line arguments? or .ini?) to go to a specific page (i.e.
> Main Page). For my exports, it picks the same page 95% of the time. On
> Wikipedia dumps, it picks a random page, but NSFW content is picked
> sometimes.

WikiTaxi.exe takes two optional command line arguments:

1. Database file to load after start.
2. Page name to open - must be 100% correct including case.

Example to run WikiTaxi, load the "MyWiki.taxi" database and display
"StartPage":

  WikiTaxi.exe MyWiki.taxi StartPage

You can use this syntax to create a Windows shortcut to start WikiTaxi
the way you want.

> Maybe my workaround is unnecessary, I would like to know if these
> missing features are actually in WikiTaxi but not documented. Maybe
> this will inspire new features, but if not, this workaround works very
> fast for me and I hope it helps others.

Thanks,

Ralf
_______________________________________________
Delphi Inspiration mailing list
yunqa@xxxxxxxxxxxxx
//www.freelists.org/list/yunqa



Other related posts: