Am 26.02.2023 um 15:28 schrieb Roy Smith <roy@panix.com>:
I'm not using the bot.py driver, just calling pywikibot.Site() directly. How do I make it read an alternate config file in that situation?_______________________________________________On Feb 26, 2023, at 4:48 AM, info@gno.de wrote:_______________________________________________Hi,
renaming the password cookie file is not a good idea after Pywikibot 8.0.0 was released because each account has its own file. [1]
You may have different user config files which can be used with global -config option e.g. -config:mybot_config. [2]
This new global option was introduced with Pywikibot 7.7 [3]
Best
xqt
[1] https://phabricator.wikimedia.org/rPWBCba56084e12a496bbb4f71dfea0fd88a818c18a81
[2] https://doc.wikimedia.org/pywikibot/master/global_options.html#global-options
[3] https://phabricator.wikimedia.org/rPWBCa02dc8dcf93ebb35e0b24884eddc6a4ff517584a
Von: Bináris <wikiposta@gmail.com>
Gesendet: 24.02.2023 04:27
An: Pywikibot discussion list <pywikibot@lists.wikimedia.org>
Betreff: [pywikibot] Re: Multiple users in user-config.py?Roy Smith <roy@panix.com> ezt írta (időpont: 2023. febr. 24., P, 0:42):My bot needs to be able to run as either of two different accounts depending on the task. DYKToolsBot for most things, DYKToolsAdminBot for specific tasks that need admin rights. How do I do this?I just got up to quickly wirite somewhere that we need separate user-fixes.pys per user, best defined in config.py, and this mail waited me here. :-)So we should have per user configs.An ugly workaround by that time what I did with logins: a Windows batch.ren other.lwp temp.lwp
ren pywikibot.lwp other.lwp
ren temp.lwp pywikibot.lwpIf you start your scripts froma batch (or Linux script), this is no extra pain with user-config.py.
pywikibot mailing list -- pywikibot@lists.wikimedia.org
Public archives at https://lists.wikimedia.org/hyperkitty/list/pywikibot@lists.wikimedia.org/message/QRXUOHVWW2B7L3AIPUCFCZKAYUQHKEPZ/
To unsubscribe send an email to pywikibot-leave@lists.wikimedia.org
pywikibot mailing list -- pywikibot@lists.wikimedia.org
Public archives at https://lists.wikimedia.org/hyperkitty/list/pywikibot@lists.wikimedia.org/message/76VHT2NMNJJ6YVCDO6LDKQ2LJTXYRDTY/
To unsubscribe send an email to pywikibot-leave@lists.wikimedia.org