Help

Log in to Lingua Libre with Pywikibot

Revision as of 18:10, 15 July 2021 by Pamputt (talk | contribs)

Here are the steps, to log in to Lingua Libre using Pywikibot. Manual:Pywikibot/BotPasswords may give more details.

Install and configure Pywikibot

See Manuel:Pywikibot/Installation.

Create bot account with Special:BotPasswords

  1. With your user account (example: Pamputt), go to Special:BotPasswords
  2. Enter the name of your bot (for example: PamputtBot) and click on "Create".
    BotPasswords - Create a new bot passwords.png
  3. Select the right you want to give to your bot. Usually "High-volume editing", "Edit existing pages" and "Create, edit, and move pages" are enough.
    BotPasswords - Bot rights full.png
  4. At the bottom of the page, click on "Create".
  5. You should arrive on a page like this one.
    BotPasswords - Created.png
    The red part is the bot password

Fill user-config.py and user-password.py

using generate_user_files.py script

  • Run python pwb.py generate_user_files
  • Select "5" (lingualibre) for the family.
  • Validate the "language code" that is "lingualibre".
  • Enter your bot name on LinguaLibre (for example: PamputtBot)
  • Enter "No" not to add any other project.
  • Enter "y" at the question "Do you want to add a BotPassword for USERNAME?"
  • Enter your "bot name" (example: PamputtBot) at the question "BotPassword's "bot name" for USERNAME:"
  • Enter the password created on Special:BotPassword at the question "BotPassword's "password" for "PamputtBot" (no characters will be shown)"

by hand

  • In the main Pywikibot directory, create user-config.py
  • Add the following lines:
family = 'lingualibre'
mylang = 'lingualibre'
usernames['lingualibre']['lingualibre'] = 'PamputtBot'
password_file = "user-password.py"
  • In the main Pywikibot directory, create user-password.py
  • Add the following lines:
('USERNAME', BotPassword('BOTNAME', 'superpassword'))

For example:

('Pamputt', BotPassword('PamputtBot', 'rj7daxj8pa7lxp2abel8e82aees1kg5n'))

Login check

  • Run python pwb.py login

Something like "Logged in on lingualibre:lingualibre as PamputtBot." should be displayed.