You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

65 lines
1.6 KiB

  1. #!/bin/sh
  2. # RSS Feed Display Script by Hellf[i]re v0.1
  3. #
  4. # This script is designed for most any RSS Feed. As some feeds may
  5. # not be
  6. # completely compliant, it may need a bit of tweaking
  7. #
  8. # This script depends on curl.
  9. # Gentoo: emerge -av net-misc/curl
  10. # Debian: apt-get install curl
  11. # Homepage: http://curl.haxx.se/
  12. #
  13. # Usage:
  14. # .conkyrc: ${execi [time] /path/to/script/conky-rss.sh}
  15. #
  16. # Applications needed:
  17. # bash, cat, grep, sed, curl
  18. #
  19. # Usage Example
  20. # ${execi 300 /home/youruser/scripts/conky-rss.sh}
  21. #RSS Setup
  22. URI=http://sourceforge.net/export/rss2_keepsake.php?group_id=145591 #URI of RSS Feed
  23. FEEDFILE="/tmp/kicad-svn-`date +%y%m%d-%H%M%S`.rss"
  24. URLFILE="/tmp/kicad-svn-`date +%y%m%d-%H%M%S`.url"
  25. # Get feed and save
  26. EXEC="/usr/bin/curl -s" #Path to curl
  27. `$EXEC $URI &> $FEEDFILE`
  28. # Get commit description
  29. cat $FEEDFILE | \
  30. grep title | \
  31. sed -e 's/[ \t]*//' | \
  32. sed -e '/activity/d' | \
  33. sed -e '/artifact/d' | \
  34. sed -e 's/<title>//' | \
  35. sed -e 's/<\!\[CDATA\[//' | \
  36. sed -e 's/\]\]>//' | \
  37. sed -e 's/<\/title>//'
  38. # Space between descriptions and messages
  39. echo ""
  40. # Get viewvc urls only
  41. cat $FEEDFILE | \
  42. grep link | \
  43. sed -e '/tracker/d' | \
  44. sed -e '/export/d' | \
  45. sed -e 's/[ \t]*//' | \
  46. sed -e 's/<link>//' | \
  47. sed -e 's/<\/link>//' &> $URLFILE
  48. # Get commit messages from urls
  49. exec < $URLFILE
  50. while read LINE
  51. do
  52. curl -s "$LINE" | \
  53. grep vc_log | \
  54. sed -e 's/<td><pre class=\"vc_log\">//' | \
  55. sed -e 's/<\/pre><\/td>//' | \
  56. sed -e '/<style/d'
  57. done
  58. rm /tmp/kicad-svn-*