- Notifications
You must be signed in to change notification settings - Fork2
Awk library for the MediaWiki API
License
greencardamom/MediaWikiAwkAPI
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
UPDATE (June 2018) -- this project no longer maintained.BotWikiAwk is a newer project that includes expanded libraries and tools. Library functions are in library.awk (replacing mwapi.awk) and updated JSON functions are in json.awk (replacing json2var.awk)
by User:Green Cardamom at en.wikipedia.orgMay 2015 (1.0)MIT license
A library of functions in GNU Awk for accessing the MediaWiki API.For building applications in Awk that use the MediaWiki API.Supports read/download API functions only, not write.
There are 2 library files and 1 example program (backlinks.awk).
mwapi.awk
The API and other functions for building Wikipedia bots and scripts.
json2var.awk
Json parser. Given a json file, return a single variable with the values needed.Depending on the API call, you'll customize a couple lines in parse_value() to extract the fields you want.
backlinks.awk
This shows all the backlinks (ie. "Special:What Links Here") for a page. It also shows how to use the "continue" command to load > 500 items.To run:awk -bE backlinks.awk
A complete application, "Backlinks Watchlist" is athttps://github.com/greencardamom/Backlinks-Watchlist
Wikigethttps://github.com/greencardamom/Wikiget
WebArchiveMergehttps://github.com/greencardamom/WebArchiveMerge
WaybackMedic (version 0 is pure awk, 1+ is awk + nim)https://github.com/greencardamom/WaybackMedic
About
Awk library for the MediaWiki API
Resources
License
Uh oh!
There was an error while loading.Please reload this page.