Admin Forum:Suppressing numbering of output with pywikipediabot

Forums: Admin Central Index → Technical Help → Suppressing numbering of output with pywikipediabot Wikia's forums are a place for the community to help other members. To contact staff directly or to report bugs, please use Special:Contact.

When trying to use the pagegenerators.py script in the latest version of pywikipediabot, I note that the output is now numbered, as seen in this snippet: 68: Untitled (DWM 184) 69: The Useful Pile (short story) 70: Useless Things (short story) 71: A Victorian Interlude (short story) 72: A Visit to the Cinema (short story) This wasn't the case in previous iterations of the script, so I'm unfamiliar with how to turn this unhelpful feature off. In order to manipulate the output, I can't think of a single instance in which you'd actually want to have these numbers present. Anyone out there know how to get rid of numbering? 01:39: Mon 17 Sep 2012


 * Never mind. I poked around in the pagegenerators.py code and figured out how to disable it.   20:37: Mon 17 Sep 2012


 * By the way, just in case anyone else wants to generate un-numbered output, here's the fix.
 * Navigate to your  folder.  For Mac users who chose a standard installation of pywikipedia, this is found in   — that is the same folder that contains Pictures, Documents, Desktop, Movies and the other "meta" folders of the current instance of OS X. Some people call this your home folder, and indeed the standard OS X icon for it is a little house. (Windows users, you're well-noticed in the Pywikipediabot Manual, so you don't need my help finding your   folder.)
 * Make a backup copy of, so that you've got a fallback in case you really screw up with the remainder of the instructions.
 * Open  in whatever program will let you edit it.  Ideally, you should use a code editing program, as opposed to just a text editor.  So something like Coda or XCode or Espresso or .
 * Enable line numbers if they aren't already visible.
 * Go to line 1268 — or, if that flummoxes you, search for the following string:
 * Change from pywikibot.output("%4d: %s" % (i, page.title), toStdout = True) to pywikibot.output("%s" % (page.title), toStdout = True) and save the changed result back to your  folder.
 * When you complete these six easy steps, all output from  will now be in a neat, un-numbered list.  This changed format will mean that you can use the list directly in other pywikipedia scripts, or use them as a time-saving base for creating altered lists for yet other scripts.    18:57: Mon 24 Sep 2012