Patches item #2783431, was opened at 2009-04-29 08:54 Message generated for change (Comment added) made by cosoleto You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=603140&aid=2783431...
Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None Status: Closed Resolution: Accepted Priority: 5 Private: No Submitted By: sigmaoctantis (sigmaoctantis) Assigned to: Nobody/Anonymous (nobody) Summary: titles from file for pagegenerators.py
Initial Comment: Additional option "-plainfile" reads titles from text files without square brackets ("-file")
----------------------------------------------------------------------
Comment By: Francesco Cosoleto (cosoleto)
Date: 2009-05-07 15:09
Message: This should resolve the problem: http://svn.wikimedia.org/viewvc/pywikipedia/trunk/pywikipedia/config.py?r1=6...
----------------------------------------------------------------------
Comment By: sigmaoctantis (sigmaoctantis) Date: 2009-05-07 10:40
Message: Thanks. For some encodings/systems, the initial title would need to be stripped of any BOM ( http://evanjones.ca/python-utf8.html#bom ).
----------------------------------------------------------------------
Comment By: Francesco Cosoleto (cosoleto) Date: 2009-05-06 13:31
Message: Applied in r6839.
----------------------------------------------------------------------
Comment By: Francesco Cosoleto (cosoleto) Date: 2009-05-02 13:59
Message: I think I will commit this patch tomorrow with a slightly changed docstring.
----------------------------------------------------------------------
Comment By: NicDumZ — Nicolas Dumazet (nicdumz) Date: 2009-05-01 07:08
Message: looks good to me. I was pretty sure that some generator already allowed to use one title per line, but I can't find it anymore. (?)
----------------------------------------------------------------------
Comment By: sigmaoctantis (sigmaoctantis) Date: 2009-04-30 20:11
Message: It is better than two separate options. I tested it and it works with files in both formats.
----------------------------------------------------------------------
Comment By: Francesco Cosoleto (cosoleto) Date: 2009-04-30 19:40
Message: A preliminary patch to enhance -file option as described is attached. Any comments?
----------------------------------------------------------------------
Comment By: sigmaoctantis (sigmaoctantis) Date: 2009-04-30 18:14
Message: Thanks, I updated it accordingly. Feel free to combine the two.
----------------------------------------------------------------------
Comment By: Francesco Cosoleto (cosoleto) Date: 2009-04-30 18:09
Message: f.readline() should be used instead of re.findall().
I think we have a too populated list of options. Probably it's better to change -file to interpret line as page titles when no [[title]] is found, instead of adding yet another option.
----------------------------------------------------------------------
You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=603140&aid=2783431...