HOWTO: Usage - Slugger/sdjson-grabber GitHub Wiki
Prereqs
Download or build a zip/tar of the application. Latest official releases are available at bintray. You can also build a zip rather quickly by following the build wiki.
Installation
Simply unzip/untar your distribution to a location of your choosing. For the remainder of this doc, assume you have installed to $ROOT
. This directory is the one that contains the lib
& bin
subdirectories.
Execution
Go to $ROOT/bin/
and run sdjson-grabber
on its own. This will dump all of the command line options to the screen. Please refer to the command line options for the latest usage information.
Popular Commands
$ROOT/bin
)
List your account info (from $ sdjson-grabber --username [id] --password [pwd] info
{
"lastDataUpdate": "2015-03-13T15:21:39Z",
"notifications": [],
"userId": "[id]",
"account": {
"expires": "2015-12-31T08:17:22Z",
"maxLineups": 4,
"messages": []
},
"serverID": "20141201.web.1",
"lineups": [
{
"ID": "CAN-0005995-X",
"uri": "/20141201/lineups/CAN-0005995-X",
"modified": "2015-03-13T05:02:09Z"
},
{
"ID": "CAN-OTA-K7N0A3",
"uri": "/20141201/lineups/CAN-OTA-K7N0A3",
"modified": "2015-03-13T05:02:04Z"
}
],
"code": 0,
"systemStatus": [{
"message": "Lineup response under development. See JSON Developer forums."
,
"status": "Online",
"date": "2015-03-11T18:00:00Z"
}]
}
This command just dumps your account info as seen by the Schedules Direct service. Use this command to ensure that your lineups are properly registered.
Find lineups
$ sdjson-grabber --username [id] --password [pwd] search --country USA --zip-code 90210
Available lineups in 'USA' for zip '90210'
Headend ID Description
==============================================================================
USA-4DTV-DEFAULT 4DTV - Satellite USA
USA-AFN-DEFAULT AFN Satellite - Satellite USA
USA-C-BAND-DEFAULT C-Band USA
USA-CA00053-DEFAULT Time Warner Cable - Cable Beverly Hills
USA-CA00053-X Time Warner Cable - Digital Beverly Hills
USA-CA61222-DEFAULT Mulholland Estates - Cable Beverly Hills
USA-CA66511-X AT&T U-verse TV - Digital Los Angeles
USA-CA67309-DEFAULT Time Warner Cable Sherman Oaks - Cable Westchester
USA-CA67309-X Time Warner Cable Sherman Oaks - Digital Westchester
USA-CA67310-DEFAULT Time Warner Cable City of Los Angeles - Cable Eagle Rock
USA-CA67310-X Time Warner Cable City of Los Angeles - Digital Eagle Rock
USA-DISH803-DEFAULT DISH Los Angeles - Satellite Los Angeles
USA-DITV-DEFAULT DIRECTV - Satellite USA
USA-DITV803-DEFAULT DIRECTV Los Angeles - Satellite Los Angeles
USA-ECHOST-DEFAULT DISH Network - Satellite USA
ZZZ-FTA-DEFAULT Global - Free-to-air satellite Global
USA-GLOBCST-DEFAULT Globecast World TV - Satellite USA
USA-GLRYSTR-DEFAULT GLRYSTR - Satellite USA
USA-RELAYTV-DEFAULT RELAYTV - Satellite USA
USA-OTA-90210 Antenna 90210
Use this command to find lineup ids to add to your account.
Add lineup
$ sdjson-grabber --username [id] --password [pwd] add --id USA-CA67310-X
INFO - Headend(s) added successfully!
Use this command to add a lineup to your account for download. The id options comes from the search results above. Run the info command again to verify the account was registered on the server.
Remove lineup
$ sdjson-grabber --username [id] --password [pwd] delete --id USA-CA67310-X
INFO - Headend(s) deleted successfully!
Use this command to remove a lineup from your account.
Grab your EPG data
$ sdjson-grabber --username [id] --password [pwd] grab
[output suppressed]
Use this command to fetch your epg data into a file called sdjson.epg
. Run this command with -?
on the end to get the full list of command line options. You can direct the output to a different location, tweak download settings, etc. Remember to point subsequent invocations of this command at your existing sdjson.epg
file. Doing so will compute the delta of what you have vs. what's on the server and only download what's needed to keep your cache file in sync with the server.