Help
Difference between revisions of "Log in to Lingua Libre with Pywikibot"
Sriveenkat (talk | contribs) m (fixing link) |
|||
(3 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
− | Here are the steps, to log in to Lingua Libre using [[mw:Special:MyLanguage/Manual:Pywikibot|Pywikibot]]. [[mw:Special:MyLanguage/Manual:Pywikibot/BotPasswords|Manual:Pywikibot/BotPasswords]] may give more details. | + | Here are the steps, to log in to Lingua Libre using [[mw:Special:MyLanguage/Manual:Pywikibot|Pywikibot]]. |
+ | |||
+ | [[mw:Special:MyLanguage/Manual:Pywikibot/BotPasswords|Manual:Pywikibot/BotPasswords]] may give more details. | ||
== Install and configure Pywikibot == | == Install and configure Pywikibot == | ||
− | See [[mw:Special:MyLanguage/ | + | See [[mw:Special:MyLanguage/Manual:Pywikibot/Installation|Manual:Pywikibot/Installation]]. |
== Create bot account with [[Special:BotPasswords]] == | == Create bot account with [[Special:BotPasswords]] == | ||
Line 10: | Line 12: | ||
# At the bottom of the page, click on "Create". | # At the bottom of the page, click on "Create". | ||
# You should arrive on a page like this one.[[File:BotPasswords - Created.png|center|500px]] The red part is the bot password | # You should arrive on a page like this one.[[File:BotPasswords - Created.png|center|500px]] The red part is the bot password | ||
+ | # At different step, you may be redirected to OAuth Wikimedia Commons to log in with your user account. [[File:BotPasswords_-_Commons_login.png|center|500px]] | ||
== Fill user-config.py and user-password.py == | == Fill user-config.py and user-password.py == | ||
Line 40: | Line 43: | ||
Something like "Logged in on lingualibre:lingualibre as PamputtBot." should be displayed. | Something like "Logged in on lingualibre:lingualibre as PamputtBot." should be displayed. | ||
+ | == See also == | ||
+ | {{Technicals}} | ||
[[Category:Lingua_Libre:Help]] | [[Category:Lingua_Libre:Help]] |
Latest revision as of 11:28, 29 September 2023
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
- With your user account (example: Pamputt), go to Special:BotPasswords
- Enter the name of your bot (for example: PamputtBot) and click on "Create".
- 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.
- At the bottom of the page, click on "Create".
- You should arrive on a page like this one. The red part is the bot password
- At different step, you may be redirected to OAuth Wikimedia Commons to log in with your user account.
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.