Package: autoseeder-cli
AutoseederThe autoseeder-cli tools allow you to interact easily with the
Autoseeder API to submit new URLs and check the status of existing URLs.Installationpipinstallautoseeder-cliUsagePlease Note:Only Python 3.6+ are officially supported by
autoseeder-cli. Python 2.7 has reached EOL and will not be supported.For each of these tools, before use you should configure the following
as environment variables:AUTOSEEDER_BASE_URL  The URL that the Autoseeder service resides at [e.g.: https://your.instance.hostname/autoseeder/]
AUTOSEEDER_TOKEN     Token to authenticate with - recommended methodLinux/MacOS bash shell:exportAUTOSEEDER_BASE_URL=https://your.instance.hostname/autoseeder/exportAUTOSEEDER_TOKEN='35999b9065…'Windows Powershell:$env:AUTOSEEDER_BASE_URL = "https://your.instance.hostname/autoseeder/"
$env:AUTOSEEDER_TOKEN = "35999b9065…"Windows Command Prompt:set AUTOSEEDER_BASE_URL=https://your.instance.hostname/autoseeder/
set AUTOSEEDER_TOKEN=35999b9065…Commands available:autoseeder-cli get_tokenRequired Environment VariablesAUTOSEEDER_USERAUTOSEEDER_PASSAUTOSEEDER_BASE_URLvia CLILog in to autoseeder and obtain an API token. Note that if you’ve been
supplied with a token string to use already, you do not need to do this.Linux/MacOS command line:AUTOSEEDER_USER=josephpilgrimAUTOSEEDER_PASS=onthetrailAUTOSEEDER_BASE_URL=https://oregon.usa/autoseeder/exportAUTOSEEDER_TOKEN=$(autoseeder-cliget_token)via Python libimportosimportautoseeder_cliusername=os.environ.get('AUTOSEEDER_USER')password=os.environ.get('AUTOSEEDER_PASS')base_url=os.environ.get('AUTOSEEDER_BASE_URL')api=autoseeder_cli.AutoseederTokenGetter(user=username,password=password,base_url=base_url)print('API token:{}'.format(api.get_token()))autoseeder-cli submitRequired Environment VariablesAUTOSEEDER_TOKENAUTOSEEDER_BASE_URLvia CLIautoseeder-cli submit <url> [--seed-region=<seed-region>]Submit a single URL to Autoseeder for seeding. You can optionally select
a geographic region to limit seeding activity to.Arguments: * required * –seed-region=<R1,R2,R3> one or more ISO-3166
two-character country identifier, separated by commas.Command line:autoseeder-clisubmithttps://exampledata.net/--seed-region=AU,NZvia Python libimportosimportautoseeder_clitoken=os.environ.get('AUTOSEEDER_TOKEN')base_url=os.environ.get('AUTOSEEDER_BASE_URL')submitter=autoseeder_cli.AutoseederSubmitter(token=token,base_url=base_url)response=submitter.submit_url('http://example.com',seed_region='AU')uuid=response.get('uuid')print('URL trackable via{}'.format(uuid))autoseeder-cli listautoseeder-cli list [--limit=<limit>] [--desc]Required Environment VariablesAUTOSEEDER_TOKENAUTOSEEDER_BASE_URLvia CLIPresents a report of URLs you’ve submitted and their status.You may find it helpful to filter and format the output with thejq
tool.Linux/MacOS command line:# show last 100autoseeder-clilist--limit100# filter down with jqautoseeder-clilist--limit100|\jq'.[] | \
        select(.statistics != null) | \
       [ .statistics[].canoncical_url, .statistics[].status ]'Windows command line:REMshowlast100autoseeder-clilist--limit100REMfilterdownwithjqautoseeder-clilist--limit100|jq".[]| select(.statistics != null)| [.statistics[].canonical_url, .statistics[].status]"via Python libimportosimportautoseeder_clitoken=os.environ.get('AUTOSEEDER_TOKEN')base_url=os.environ.get('AUTOSEEDER_BASE_URL')lister=autoseeder_cli.AutoseederLister(token=token,base_url=base_url)urls=lister.get_url_list()forurlinurls:print(url['url'])autoseeder-cli find_urlsRequired Environment VariablesAUTOSEEDER_TOKENAUTOSEEDER_BASE_URLvia CLIFinds URLs matching a search term, and provides their Universally Unique
Identifiers (UUIDs) for further actions (e.g.view).Command line:autoseeder-clifind_urls'example.com'via Python libimportosimportautoseeder_clitoken=os.environ.get('AUTOSEEDER_TOKEN')base_url=os.environ.get('AUTOSEEDER_BASE_URL')searcher=autoseeder_cli.AutoseederSearcher(token=token,base_url=base_url)uuids=searcher.find_urls('example.com')foruuidinuuids:print(uuid)autoseeder-cli viewRequired Environment VariablesAUTOSEEDER_TOKENAUTOSEEDER_BASE_URLvia CLIPresents a report of a single URL via its associated Universally unique
identifier (UUID) or specific URL.Command line:# view by URL UUIDautoseeder-cliview2118f16a-3270-4e63-88dc-24b6097739ab# UUID is sample only
# partial URL string which must match only one registered URLautoseeder-cliviewexample.com/myurlvia Python libimportautoseeder_cli# 2118f16a-3270-4e63-88dc-24b6097739ab is a SAMPLE ONLY, would map to a seeded URL you previously submittedviewer=autoseeder_cli.AutoseederURLView(token=token,base_url=myinstance_url)url_data=viewer.view('2118f16a-3270-4e63-88dc-24b6097739ab')forurlinurl_data:print(url['url'])autoseeder-cli get_csvautoseeder-cli get_csv <output_file>Required Environment VariablesAUTOSEEDER_TOKENAUTOSEEDER_BASE_URLvia CLIPresents a report of URLs you’ve submitted and their status in a CSV
representation.Command line:autoseeder-cliget_csvautoseeder_latest.csvautoseeder-cli save_screenshotRequired Environment VariablesAUTOSEEDER_TOKENAUTOSEEDER_BASE_URLvia CLIYou probably don’t want to use this - it retrieves a single image (png
format), referenced by the screenshot unique identifier.Command line:autoseeder-clisave_screenshot2118f16a-3270-4e63-88dc-24b6097739ab./example.org/indexpage.pngautoseeder-cli save_screenshotsRequired Environment VariablesAUTOSEEDER_TOKENAUTOSEEDER_BASE_URLvia CLIRetrieves a one or more screenshots, referenced by the unique identifier
for a URL.All images will be saved into the specified output path. If the
specified path does not already exist a directory will be created.Command line:autoseeder-clisave_screenshots2118f16a-3270-4e63-88dc-24b6097739ab./example.org/summary_screenshotsautoseeder-cli save_screenshots_allWarning: Images may contain sensitive information.Required Environment VariablesAUTOSEEDER_TOKENAUTOSEEDER_BASE_URLWarning: Images may contain sensitive information.via CLIWarning: Images may contain sensitive information.Retrieves a one or more screenshots, referenced by the unique identifier
for a URL.All images will be saved into the specified output path. If the
specified path does not already exist a directory will be created.Warning: Images may contain sensitive information.Command line:autoseeder-clisave_screenshots_all2118f16a-3270-4e63-88dc-24b6097739ab./example.org/detailed_screenshots