User:TBurmeister (WMF)/Sandbox/Pywikibot

Installation and setup
Official docs at: Manual:Pywikibot/Installation

install pywikibot in an isolated environment: install dependencies: Download stable version of Pywikibot: Configure using a helper script: To see the contents of your user config, use a text editor to view

Because you've configured your set of projects (sites), you don't need to specify which you want to log in to. To login, you only need to issue the following command: Test your installation:

Messing around with some commands
In the following command, I had to enclose the page name in quotes to avoid getting an error related to the parentheses in my username. Hopefully you are luckier than I am, and your username is simpler. Other pywikibot command examples you see are likely to leave out those single quotes.

To investigate:


 * Scripts:ListPages: Print a list of pages, as defined by page generator parameters. Optionally, it also prints page content to STDOUT or save it to a file in the current directory. https://doc.wikimedia.org/pywikibot/stable/scripts_ref/scripts.html#module-scripts.listpages