User:GreenC/software/iabget

iabget is a CLI program to the IABot API.

Requirements

 * GNU Awk 4.1+ (standard POSIX tool)
 * PHP 7+ (possibly earlier ok)
 * jq 1.5+ (possibly earlier ok)
 * GNU timeout and wget

Setup

 * Copy iabget.awk to a directory.
 * Add a symlink ie.
 * Edit iabget and configure
 * Set hash-bang line to location of GNU awk
 * Edit the "SETUP" section
 * Set paths to programs
 * The "bell" is optional and can be ignored/blanked
 * Follow directions for obtaining Oauth keys
 * Create custom agent string
 * Location of cookie file
 * Location of cookie file


 * Bot Permissions are required in the IABot tool. Request from an IABOt admin.

Usage
iabget - InternetArchiveBot API command-line interface

-a            Action (see API doc): searchpagefromurl searchurlfrompage searchurldata modifyurl submitbotjob (use with -f not -p) getbotjob getbotqueue logout -p         Parameter=value string (see API doc). Separating & between paramters should be {&} to disambig from & in URLs eg. -p "urlid=55{&}archiveurl=http://.." -f          Filename containing the postdata encoded; or article encoded -l          Wiki language code (default: en). Valid is "wikidata" -d             Turn on debugging. 1 = level1 2 = level2 -e                     Send error msgs to stdout (default: stderr) -w                     Show raw JSON -h                     help

Examples: iabget -a getbotqueue -p displayqueued -w iabget -a getbotjob -p id=200 -w iabget -a searchurlfrompage -p pageids=4589