Skip to content

Instantly share code, notes, and snippets.

@andyreagan
Created September 26, 2014 00:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save andyreagan/ea8cb742314a7876aad6 to your computer and use it in GitHub Desktop.
Save andyreagan/ea8cb742314a7876aad6 to your computer and use it in GitHub Desktop.
Leveraging the phantom-crowbar to steal vector graphics, on the daily
# index
phantom-crowbar http://hedonometer.org/index.html timeseries $(gdate +%Y-%m-%d -d "today")/index-timeseries.svg
phantom-crowbar http://hedonometer.org/index.html?date=$(gdate +%Y-%m-%d -d "yesterday") modalsvg $(gdate +%Y-%m-%d -d "today")/index-shift.svg
# books
phantom-crowbar http://hedonometer.org/books.html?book=frankenstein booktimeseriessvg $(gdate +%Y-%m-%d -d "today")/books-timeseries-frankenstein.svg
phantom-crowbar http://hedonometer.org/books.html?book=frankenstein shiftsvg $(gdate +%Y-%m-%d -d "today")/books-shift-frankenstein.svg
# us maps
phantom-crowbar http://hedonometer.org/maps.html?time=Last%207%20Days mapsvg $(gdate +%Y-%m-%d -d "today")/maps-map.svg
phantom-crowbar http://hedonometer.org/maps.html?time=Last%207%20Days shiftsvg $(gdate +%Y-%m-%d -d "today")/maps-shift.svg
phantom-crowbar http://hedonometer.org/maps.html?time=Last%207%20Days barchartsvg $(gdate +%Y-%m-%d -d "today")/maps-bars.svg
# us sankey
phantom-crowbar http://hedonometer.org/statesankey.html sankeysvg $(gdate +%Y-%m-%d -d "today")/statesankey-sankey.svg
# city sankey
phantom-crowbar http://hedonometer.org/citysankey.html?ref=2013&comp=2014 sankeysvg $(gdate +%Y-%m-%d -d "today")/citysankey-sankey.svg
# city list
phantom-crowbar http://hedonometer.org/cities2.html barChart $(gdate +%Y-%m-%d -d "today")/cities2-list.svg
phantom-crowbar http://hedonometer.org/cities2.html shiftsvg $(gdate +%Y-%m-%d -d "today")/cities2-shift.svg
for FILE in $(\ls -1 $(gdate +%Y-%m-%d -d "today")); do
OLDFILE=$(gdate +%Y-%m-%d -d "today")/$FILE
NEWFILE=$(gdate +%Y-%m-%d -d "today")/${FILE%.svg}.pdf
inkscape -f $OLDFILE -A $NEWFILE
done
@andyreagan
Copy link
Author

Wow Andy, slick. How can I get the phantom crowbar?

@andyreagan
Copy link
Author

Oh thanks Andy, it's over in the phantom-crowbar repo

@mrfrank8176
Copy link

where's the Like button?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment