AgeCommit message (Collapse)AuthorFiles
2018-08-17Fix PEP 8 issues.Sergey Poznyakoff13 update urlSergey Poznyakoff2
2018-08-09Organizational changesSergey Poznyakoff1
2018-08-06Write README.rstSergey Poznyakoff4
2018-08-05Improve inter-version compatibilitySergey Poznyakoff2
* WikiTrans/ (HtmlTextNode): Use quote=False to make sure same output is obtained in Python 2.7 and 3.x * testdata/headings.html: Update
2018-08-05Fix typo in MANIFEST.inSergey Poznyakoff1
2018-08-05Fix parsing of closed tags with whitespace before '/>'Sergey Poznyakoff1
* WikiTrans/ (BaseWikiMarkup.otag): Fix the P<args> named part so that it cannot start with a slash.
2018-08-05Implement <ref> and <references>Sergey Poznyakoff6
* WikiTrans/ (BaseWikiMarkup.tags): Add 'ref' and 'references'. * WikiTrans/ (WikiTagNode): If the parser has the 'references' attribute, store each <ref> there. * WikiTrans/ Handle new tags. * WikiTrans/ (HtmlTagNode): Handle new tags. (HtmlWikiMarkup.references): New attribute * WikiTrans/ (TexiTagNode): Handle new tags. * WikiTrans/ (TextTagNode): Handle new tags. (TextWikiMarkup.showrefs): Renamed from references (TextWikiMarkup.references): New attribute.
2018-08-04wikitrans: fixesSergey Poznyakoff1
* bin/wikitrans (getwiki): fix downloading for Python 2.7 Return a properly encoded string. Fix help output. Allow to use -t dump with -I wiktionary
2018-08-04Update copyright yearsSergey Poznyakoff9
2018-08-04Minor changesSergey Poznyakoff4
2018-08-04Add testsuite for texi translatorSergey Poznyakoff21
2018-08-04Improve paragraph handling in texi translatorSergey Poznyakoff1
* WikiTrans/ Reimplement accumulator as a separate class.
2018-08-04Add COPYING.txtSergey Poznyakoff1
2018-08-02Re-implement testsuiteSergey Poznyakoff12
2018-08-01Fix wiki2textSergey Poznyakoff24
* WikiTrans/ (HtmlTextNode): Escape html entities * WikiTrans/ Remove the format method. * testdata/headings.html: Fix. * testdata/nowiki-tag.html: Fix. * tests/ Rename to tests/ * tests/ New file. * testdata/bold.text: New file. * testdata/boldit1.text: New file. * testdata/boldit2.text: New file. * testdata/boldit3.text: New file. * testdata/colon.text: New file. * testdata/deflist.text: New file. * testdata/headings.text: New file. * testdata/hz.text: New file. * testdata/it.text: New file. * testdata/itbold1.text: New file. * testdata/itbold2.text: New file. * testdata/itbold3.text: New file. * testdata/nowiki-ind.text: New file. * testdata/nowiki-tag.text: New file. * testdata/nowiki.text: New file. * testdata/numlist.text: New file. * testdata/para.text: New file. * testdata/unlist.text: New file.
2018-07-31bin/wikitrans: fix for python 3Sergey Poznyakoff1
2018-07-31Minor fixesSergey Poznyakoff5
* WikiTrans/ Use absolute import names. * WikiTrans/ Likewise. * WikiTrans/ Likewise. * WikiTrans/ Likewise. * bin/wikitrans: Enforce UTF-8 for Python 2 New option --base-name. Optionally download the material from http
2015-07-24Use WikiNode.format function to format nodes for output.Sergey Poznyakoff5
* WikiTrans/ (parser): New attribute. (__init__): Take three arguments. Second one is the parser that creates this node. (jsonEncode): Omit parser. * WikiTrans/ (__createWikiNode): Pass self as the first argument to the constructor. * WikiTrans/ Use derived node classes. * WikiTrans/ Likewise. * WikiTrans/ Likewise.
2015-07-23Use JSON for printable representation of tokens and nodes.Sergey Poznyakoff7
* WikiTrans/ New file. * WikiTrans/ Update * WikiTrans/ Minor change * WikiTrans/ Likewise. * WikiTrans/ (BaseWikiMarkup.__createWikiNode): New method; use it instead of invoking constructors directly throughout the code. (token_class): New attribute. A dictionary of token classes for each specific node type. * WikiTrans/ Use JSON for printable representation of nodes. * bin/wikitrans: Update
2015-07-22Major rewriteSergey Poznyakoff14
Use dedicated classes, instead of dictionaries, to represent markup tokens * WikiTrans/ New file. Defines Wiki markup tokens. * WikiTrans/ Rewrite. * WikiTrans/ Update. * WikiTrans/ Update. * WikiTrans/ Update. * bin/wikitrans: Update
2015-07-20Fix parsing of headers. Add more tests.Sergey Poznyakoff9
* WikiTrans/ (delim): Use [ \t] instead of \s. (parse0): Undo c41c19ff. * testdata/headings.html: Update. * testdata/nowiki-ind.html: New file. * testdata/ New file. * testdata/nowiki-tag.html: New file. * testdata/ New file. * testdata/nowiki.html: New file. * testdata/ New file. * tests/ Add new files.
2015-07-20Improve tag handling.Sergey Poznyakoff2
* WikiTrans/ (str_tag): Use the 'isblock' attribute to decide how to render the block. * WikiTrans/ (parse_para): Parse tags. (parse_til): Rename to parse_tag. All callers changed. Set the 'isblock' attribute (parse0): Call parse_para if at the beginning of the input.
2015-07-17wiki2texi: improve formattingSergey Poznyakoff2
2015-07-17BugfixesSergey Poznyakoff2
* WikiTrans/ (tokread): Fix recognition of <nowiki> blocks and unhandled tags. * tests/ Minor fix.
2015-07-16Restructure the package.Sergey Poznyakoff14
The idea is to switch from using this project as a git submodule to having it distributed via PyPI. Since the name 'wit' is already registered there, the package is renamed to 'wikitrans'. * Use setuptools Rename package to wikitrans. * Remove. Replaced with: * bin/wikitrans: New file. * Move to WikiTrans/ * Move to WikiTrans/ * Move to WikiTrans/ * Move to WikiTrans/ * Move to WikiTrans/ * Move to WikiTrans/ * Move to tests/ * New file. * README.rst: New file. * .gitignore: Update.
2015-07-16Fix to work with Python 3Sergey Poznyakoff1
2015-07-15Support for Python 3Sergey Poznyakoff5
* Import urllib.parse if importing urllib fails. Use list comprehensions to build lists from maps. * Use 'in' instead of has_key. Use list comprehensions to build lists from maps. * Likewise. * Use print function. Import StringIO from io if unable to import is as a module * Use print function. Fix some UTF strings.
2015-07-15Parse tag attributesSergey Poznyakoff4
* (TagAttributes) (TagAttributeSyntax): New classes. (BaseWikiMarkup): Store a TagAttributes object in tag['args'] of an XML tag. * (str_tag): convert tag['args'] to string * Likewise. * (str_tag): Handle <div>
2015-07-15Get rid of globalsSergey Poznyakoff1
* (delim,otag,ctag) (refstart): Now class attributes
2015-07-15Improve tokenizer and parser.Sergey Poznyakoff1
* (ctag,otag): pfx group not needed anymore (refstart): New global (tokread): Clean up logic. Handle <</nowiki>tag> properly. (parse_ref): Rewrite. (parse_inline): Recover in case of unmatched delimiters (parse_line): Handle OTAG tokens.
2015-07-15Fix parsing of <nowiki> blocks.Sergey Poznyakoff4
* (tokread): Catch the </nowiki> tag appearing on the same line with the opening <nowiki>. Never return nowiki block as a tag, instead yield a sequence of TEXT nodes. * (str_tag): Update. * Likewise. * Likewise.
2015-07-14Fix processing of environments (numbered/unnumbered lists, definition lists) ↵Sergey Poznyakoff7
and indented strings. * (tokread): Always add 'continuation' key to DELIM entries. Delete whitespace following environment delimiters. (peektkn): Take an optional offset argument. (parse0): Handle indentations. * (str_ind): Use <dl> to produce indentations. * (str_ind): End text with a newline. * testdata/colon.html: Update. * testdata/deflist.html: Update. * testdata/numlist.html: Update. * testdata/unlist.html: Update.
2015-07-12Improve tag handling and debuggingSergey Poznyakoff5
* Rewrite tag recognition. Implement dump method. * New options -D (--dump), and -t dump * (input_tag): Remove method (str_tag): Change handling of tags * Likewise. * Likewise.
2015-07-07Remove unnecessary debug printSergey Poznyakoff1
2015-07-07Initial implementation of Texinfo translator classSergey Poznyakoff4
* (str_pre): Don't add <pre> tags if nested * New file. * Add --type (--to, -t) and --input-type (-I) options. * (BaseWikiMarkup): Use new object style. (tokread): Remove 'extra' keyword for the sake of parse_env
2015-07-07Update copyright yearsSergey Poznyakoff7
2015-07-07Handle ambiguities between italic and bold markers, add more tests.Sergey Poznyakoff19
* (tokenize): Handle the three possible ambiguities in placing italic and bold markers. Redefine unresolved markers as text. * Add new tests. * testdata/ Rewrite. * testdata/ Rewrite. * testdata/ Rewrite. * testdata/ Remove. * testdata/ Remove, * testdata/bold.html: New file. * testdata/boldit0.html: New file. * testdata/boldit1.html: New file. * testdata/boldit3.html: New file. * testdata/it.html: New file. * testdata/itbold1.html: New file. * testdata/ New file. * testdata/itbold2.html: New file. * testdata/ New file. * testdata/itbold3.html: New file. * testdata/ New file. * testdata/para.html: New file.
2015-07-06Handle <tags> and implicit preformatted blocksSergey Poznyakoff3
Among <tags>, this commit handles <nowiki> and <code>. General tag handling mechanism is provided. * (otag, ctag, close_delim): New variables. (BaseWikiMarkup)<newline,nested>: New attributes. (otag, ctag, close_delim): New variables. (newline,nested>: New attributes. (input_tag): New abstract method. (tokread): Remove calls to dprint, now done by the callers. Handle xml-style tags. (getkn,ungetkn): Set newline. (inline_delims): Add '|' (parse_para): Decide whether it is going to be a PRE or PARA. Don't mix the two. Fix recovery in case of unmatched/incorrect inline constructs. (parse): eliminate initial PARA, if called as a nested instance. (WikiMarkup): Remove parse method. Rely on the parent class. * (input_tag, str_tag, str_pre): New methods. (format): Handle PRE and TAG tokens * Similar changes. Needs some more work.
2015-07-06Redo parse tree as a sequence of dictionaries, instead of arrays.Sergey Poznyakoff3
2015-07-05Remove unused constantsSergey Poznyakoff1
2015-07-05Fix most testcases.Sergey Poznyakoff11
* (envtypes): Redo as a dictionary. (ELT): New item type (BaseWikiMarkup): Fix list parsing. (parse): Comment out changes introduced by 9c42879. Must be rewritten. * (HtmlWikiMarkup): Change handling of lists. * Likewise. * testdata/ New testcase. * testdata/deflist.html: Likewise. * testdata/colon.html: Update. * testdata/headings.html: Update. * testdata/hz.html: Update. * testdata/numlist.html: Update. * testdata/unlist.html: Update.
2009-03-07Another buch of dirty kludgesSergey Poznyakoff3
2009-03-07Minor fixesSergey Poznyakoff1
2009-03-07Remove disambiguiations and graphics. Remove everything before the first ↵Sergey Poznyakoff2
header and any traling language links
2009-03-05Lots of formatting kludgesSergey Poznyakoff2
2009-03-05Avoid losing newlines while parsing the input stream. Provide some ↵Sergey Poznyakoff3
rudimentary parsing for wiktionary templates
2009-03-03Fix parsing of nested bold/it markupsSergey Poznyakoff1
2009-03-03Add two new testcases (both fail)Sergey Poznyakoff2
2009-03-03Quick & dirty fixSergey Poznyakoff2

Return to:

Send suggestions and report system problems to the System administrator.