Last active
August 29, 2015 14:05
-
-
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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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