Skip to content

Instantly share code, notes, and snippets.

@jadedgnome
Last active August 29, 2015 14:05
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 jadedgnome/53c55ed450bad9240231 to your computer and use it in GitHub Desktop.
Save jadedgnome/53c55ed450bad9240231 to your computer and use it in GitHub Desktop.
rename the ouputted html file from redditPostArchiver with the reddit thread title. https://github.com/sJohnsonStoever/redditPostArchiver
ran(){
TITLE=$(curl --head -ILs http://redd.it/$1 |grep -i Location |grep -v /tb/| cut -d '/' -f 8)
SUBREDDIT=$(curl --head -ILs http://redd.it/$1 |grep -i location |grep -v /tb/| cut -d '/' -f 5)
python ~/bin/redditPostArchiver/archiver.py $1
mv $1.html $1_\[$SUBREDDIT\]_$TITLE.html
echo $PWD/$1_\[$SUBREDDIT\]_$TITLE.html
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment