Log in to Lingua Libre with Pywikibot

Here are the steps, to log in to Lingua Libre using Pywikibot.

Manual:Pywikibot/BotPasswords may give more details.

Install and configure Pywikibot

See Manual: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
  6. At different step, you may be redirected to OAuth Wikimedia Commons to log in with your user account.
    BotPasswords - Commons login.png

Fill and

using script

  • Run python 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
  • Add the following lines:
family = 'lingualibre'
mylang = 'lingualibre'
usernames['lingualibre']['lingualibre'] = 'PamputtBot'
password_file = ""
  • In the main Pywikibot directory, create
  • Add the following lines:
('USERNAME', BotPassword('BOTNAME', 'superpassword'))

For example:

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

Login check

  • Run python login

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

See also

Lingua Libre technical helps
Template {{Speakers category}} • {{Recommended lists}} • {{To iso 639-2}} • {{To iso 639-3}} • {{Userbox-records}} • {{Bot steps}}
Audio files How to create a frequency list?Convert files formatsDenoise files with SoXRename and mass rename
Bots Help:BotsLinguaLibre:BotHelp:Log in to Lingua Libre with PywikibotLingua Libre Bot (gh) • OlafbotPamputtBotDragons Bot (gh)
MediaWiki MediaWiki: Help:Documentation opérationelle MediawikiHelp:Database structureHelp:CSSHelp:RenameHelp:OAuthLinguaLibre:User rights (rate limit) • Module:Lingua Libre record & {{Lingua Libre record}}JS scripts: MediaWiki:Common.jsLastAudios.jsSoundLibrary.jsItemsSugar.jsLexemeQueriesGenerator.js (pad) • Sparql2data.js (pad) • LanguagesGallery.js (pad) • Gadgets: Gadget-LinguaImporter.jsGadget-Demo.jsGadget-RecentNonAudio.js
Queries Help:APIsHelp:SPARQLSPARQL (intermediate) (stub) • SPARQL for lexemes (stub) • SPARQL for maintenanceLingualibre:Wikidata (stub) • Help:SPARQL (HAL)
Reuses Help:Download datasetsHelp:Embed audio in HTML
Unstable & tests Help:SPARQL/test
Categories Category:Technical reports