mediawiki-parser icon indicating copy to clipboard operation
mediawiki-parser copied to clipboard

Add a command line

Open peter17 opened this issue 13 years ago • 1 comments

Instead of copying the wikitext in wikitext.txt, running python parser.py and reading article.htm, one should be able to provide the file he/she wants and pass some parameters to the parser and get the result directly in the console to redirect it where he/she wants.

We can expect something like that: <project_name> -format html -allowed_tags b;i;center -allow_autoclose_tags br;hr -templates templates file.wiki

Where templates would be a directory containing the called templates in text files.

It should also be possible to store the allowed tags in a configuration file, as well as the correspondence between the interwiki prefixes and the foreign wiki URLs.

peter17 avatar Aug 04 '11 15:08 peter17

argparse already has conventions for multiply-valued flags, so we should look at those first and see if they're too verbose.

erikrose avatar Aug 04 '11 17:08 erikrose