About:Vanibots: Difference between revisions

(Created page with "What is a bot What language are they written in etc etc === Vanipedia bots in use === # # # # # Category:Help Pages")
 
mNo edit summary
 
Line 1: Line 1:
What is a bot
A bot is a small program that edits Vanipedia's pages, in a similar way a human would, only in mass quantities. An algorithm, or the logic coded into it, makes it repeat the same task for a large amount of pages. This saves hours of editing work, and the need to check for mistakes, as a bot performs 100% accurately in comparison to a human, when acting on the exact instructions given to it. A human has a limited capacity and waking hours, while a bot can run overnight also, taking advantage of low web traffic rather than loading the web server with requests at daytime.


What language are they written in
Bots are written in the Python language, using a framework called Pywikibot, which is compatible with a MediaWiki installation, such as the one used to build Vanipedia. The library conveniently encapsulates the MediaWiki API and all reading and writing operations.


etc
Bots edit on behalf of the Vanibot user, which has clearance for reading and writing. It requires a special password to run a bot. Edits are also visible on "User Contributions" -> for Vanibot.


etc
Running a bot locally, on a terminal program, runs the risk of stopping the work of the bot while in the middle, when the local machine is shutting down. Thus bots that run repeatedly are regularly and automatically scheduled by the cron command, each with its own interval or number of days, and a fixed hour, preferably at night. It is also possible to run a bot this way once and forget.
 
If you would like to suggest an idea for a new bot, or you would like to report a bot for unusual or other behavior, please write to Elad Stern at <span class="quotelink"><tt>eladst@<span style="display:none">no spam, thanks-</span>gmail.com</tt></span>.


=== Vanipedia bots in use ===
=== Vanipedia bots in use ===
#
# #0004: CategoryManager - Puts all categories in Vaniquotes under the "All Categories" master category. Runs every 5 days
#
# #0005: NavigationArranger - Ensures navigation bars for "Previous/Next Page - Video" are present in all international transcript pages, in the order they are categorized, as new ones are added. Captions are English by default or in the appropriate language. Runs every 3 days. To add captions in your own language, write to <span class="quotelink"><tt>eladst@<span style="display:none">no spam, thanks-</span>gmail.com</tt></span>.
#
# #0019: LinkReviser - Re-directs links that point to an incomplete reference, such as 13.2, where the actual title is 13.1-2. Changes links to point to a version in the page's own language, if such a translation exists in Vanisource. Runs every 14 days, now offline for repairs.
#
# #0012: DevanagariBot - Adds a Devanagari section to translated editions of Bhagavad-gita As It Is. More publications are planned in the coming future.
#
# #0009: VerseLayoutMaker - Makes sure all the Sanskrit terms in the synonyms section of each verse appear in italics. Additional editorial changes can be integrated.
# #0020: VersionCompareLinker - Links pages of all enabled publications to the Vanisource Version Compare feature's page.
# #0021: NumRangeRTLMaker - Changes numerical ranges for right-to-left languages, such as Hebrew: 13-15 to appear as 15-13. Page titles remain consistent with English. In links, only the caption for the user is changed, rather than the name of the page.
# #0023: VideoLocalizer - Re-directs embedded YouTube video player codes in each recorded conversation/etc. page to show the hard-coded subtitles version, so that the text appears independently of the device.
# #0025: NectarDropConnector - Similar to NavigationArranger (#0005) but connects adjacent Nectar Drops with navigation bars by compilation order.
# #0026: CCNav - Changed the old navigation in Vanisource Caitanya-Caritarmrta, that formerly appeared distorted due to missing extensions while upgrading the system.
# #0027: CCMirror - Used to mirror Caitanya-Caritarmrta 1996 content into the 1975 edition, structuring the publication section before compilation of updated content.
# #0029: AudioPlacer - Added audio files to the entire list of Srila Prabhupada's lectures, conversations and letters from 1996.
'''[https://docs.google.com/spreadsheets/d/1W1f_LTx58Msk6uEPLEr9ZeHM5SmRFTiZ8ZGEKE-TLXk/edit#gid=0 For the full list click here]'''
 
Bots are located in the pywikibot installation directory at /var/www/vanimedia/vanibots/pywikibot. More precisely, each bot file is placed inside pywikibot/scripts, as vani####.py. The first bot is named vani0001.py and so on. Log files are also named vani####.log, respectively. The component file for logging is called bot_logger.py. Other related files are there per each bot.


[[Category:Help Pages]]
[[Category:Help Pages]]
[[Category:TechTeam Tools]]

Latest revision as of 16:36, 6 October 2019

A bot is a small program that edits Vanipedia's pages, in a similar way a human would, only in mass quantities. An algorithm, or the logic coded into it, makes it repeat the same task for a large amount of pages. This saves hours of editing work, and the need to check for mistakes, as a bot performs 100% accurately in comparison to a human, when acting on the exact instructions given to it. A human has a limited capacity and waking hours, while a bot can run overnight also, taking advantage of low web traffic rather than loading the web server with requests at daytime.

Bots are written in the Python language, using a framework called Pywikibot, which is compatible with a MediaWiki installation, such as the one used to build Vanipedia. The library conveniently encapsulates the MediaWiki API and all reading and writing operations.

Bots edit on behalf of the Vanibot user, which has clearance for reading and writing. It requires a special password to run a bot. Edits are also visible on "User Contributions" -> for Vanibot.

Running a bot locally, on a terminal program, runs the risk of stopping the work of the bot while in the middle, when the local machine is shutting down. Thus bots that run repeatedly are regularly and automatically scheduled by the cron command, each with its own interval or number of days, and a fixed hour, preferably at night. It is also possible to run a bot this way once and forget.

If you would like to suggest an idea for a new bot, or you would like to report a bot for unusual or other behavior, please write to Elad Stern at eladst@no spam, thanks-gmail.com.

Vanipedia bots in use

  1. #0004: CategoryManager - Puts all categories in Vaniquotes under the "All Categories" master category. Runs every 5 days
  2. #0005: NavigationArranger - Ensures navigation bars for "Previous/Next Page - Video" are present in all international transcript pages, in the order they are categorized, as new ones are added. Captions are English by default or in the appropriate language. Runs every 3 days. To add captions in your own language, write to eladst@no spam, thanks-gmail.com.
  3. #0019: LinkReviser - Re-directs links that point to an incomplete reference, such as 13.2, where the actual title is 13.1-2. Changes links to point to a version in the page's own language, if such a translation exists in Vanisource. Runs every 14 days, now offline for repairs.
  4. #0012: DevanagariBot - Adds a Devanagari section to translated editions of Bhagavad-gita As It Is. More publications are planned in the coming future.
  5. #0009: VerseLayoutMaker - Makes sure all the Sanskrit terms in the synonyms section of each verse appear in italics. Additional editorial changes can be integrated.
  6. #0020: VersionCompareLinker - Links pages of all enabled publications to the Vanisource Version Compare feature's page.
  7. #0021: NumRangeRTLMaker - Changes numerical ranges for right-to-left languages, such as Hebrew: 13-15 to appear as 15-13. Page titles remain consistent with English. In links, only the caption for the user is changed, rather than the name of the page.
  8. #0023: VideoLocalizer - Re-directs embedded YouTube video player codes in each recorded conversation/etc. page to show the hard-coded subtitles version, so that the text appears independently of the device.
  9. #0025: NectarDropConnector - Similar to NavigationArranger (#0005) but connects adjacent Nectar Drops with navigation bars by compilation order.
  10. #0026: CCNav - Changed the old navigation in Vanisource Caitanya-Caritarmrta, that formerly appeared distorted due to missing extensions while upgrading the system.
  11. #0027: CCMirror - Used to mirror Caitanya-Caritarmrta 1996 content into the 1975 edition, structuring the publication section before compilation of updated content.
  12. #0029: AudioPlacer - Added audio files to the entire list of Srila Prabhupada's lectures, conversations and letters from 1996.

For the full list click here

Bots are located in the pywikibot installation directory at /var/www/vanimedia/vanibots/pywikibot. More precisely, each bot file is placed inside pywikibot/scripts, as vani####.py. The first bot is named vani0001.py and so on. Log files are also named vani####.log, respectively. The component file for logging is called bot_logger.py. Other related files are there per each bot.