Skip to content

Instantly share code, notes, and snippets.

@MitchRatquest
Last active September 13, 2016 18:44
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 MitchRatquest/7856e9291c5a40ee2b179e71e8455247 to your computer and use it in GitHub Desktop.
Save MitchRatquest/7856e9291c5a40ee2b179e71e8455247 to your computer and use it in GitHub Desktop.
#!/bin/sh
#wget -O NOR http://www.northofreality.com/tales/2016/7/4/the-inner-hologram 2>/dev/null && grep 'blog-item-content ' NOR | sed 's/<\/p>/\n/g' | sed 's/<p>/\n/g'| sed 's/<div class=\"blog.*div class=\"sqs-block-content">//g'| sed 's/<\/div><\/div>.*//g' | sed 's/\.\&nbsp;/\./g'
#used to practice sed
#load front page, grab newest story
newest=$( wget -O NOR http://www.northofreality.com/ 2>/dev/null && grep '\/tales\/[0-9]\{4\}\/[0-9]*\/[0-9]*\/[^#]*' NOR -m 1 | sed 's/<a href="//g' | sed 's/#.*//g' | sed 's/ //g')
#grab newest story and format for terminal
wget -O NOR http://www.northofreality.com$newest 2>/dev/null && grep 'blog-item-content ' NOR | sed 's/<\/p>/\n/g' | sed 's/<p>/\n/g'| sed 's/<div class=\"blog.*div class=\"sqs-block-content">//g'| sed 's/<\/div><\/div>.*//g' | sed 's/\.\&nbsp;/\./g'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment