Results 1 to 4 of 4

Thread: Conky and Rss Feed

Hybrid View

  1. #1
    Join Date
    Feb 2013

    Conky and Rss Feed

    Hi all.
    I hope I'm posting this in the right place.

    I am in the process of writing my new conky script, and I am wanting to put a "word of the day" script in.
    So I decided I could just use conky's built in rss function for this
    ${color}${rss 720 item_titles 1}
    And this works great for the title, however when i use it for the descrtipton (ie definition)
    ${color}${rss 720 item_desc 1}
    I end up with 2 problems that I'd like to sort out.

    1. Description is too long and there fore stretches conky across my whole screen. no ability to word wrap the rss feed
    2. the rss function in conky doesn't format so you end up with something like below in your conky including all symbols "<b>" etc
    <p><b>Placid</b> (plac·id) <i>adj.</i>* 1. Satisfied; complacent.* 2. Undisturbed by tumult or disorder; calm or quiet.</p>
    So what I am wondering is does any1 have a way I could use either a bash script or curl to parse this info back into my conky script.

    Any help is appreciated (I am very new to scripting)
    Last edited by PantherStu; March 14th, 2013 at 01:27 AM. Reason: Marked solved

  2. #2
    Join Date
    Feb 2008
    Ubuntu 12.04 Precise Pangolin

    Re: Conky and Rss Feed


    You can definitely use Lua[1] or Bash[2] to process the RSS a little before displaying it. If I remember correctly, there is very good support for Lua scripts in Conky, and the language has a load of relevant features.. [3]

    Parsing RSS in bash might be a bit of a headache, although your needs aren't too complicated. Perhaps a simple solution might be easier![4]

    Hope that helps!


  3. #3
    Join Date
    Feb 2013

    Re: Conky and Rss Feed

    Beautiful, Thanks
    After reading through posts you linked to, this is what I ended up with in my conkyrc
    Word of the Day
    ${color}${font Sawasdee:bold:size=14}${rss 300 item_titles 1}${font}
    ${execi 300  curl -s | grep description |sed -e :a -e 's/<[^>]*>//g;/</N' |sed -e 's/[ \t]*//' |sed -e 's/\(.*\)/ \1/' |sed -e 's/\.//' |sed -e 's/\"//' |sed -e 's/\"//' |head -n $((1 + 2)) |tail -n $((1))|fold -s50}
    which looks like

    Thanks for all the help

  4. #4
    Join Date
    May 2012
    a planet far away
    Ubuntu Studio 12.04 Precise Pangolin

    Re: Conky and Rss Feed

    imagine what it would look like if you had oxy-moronic pics in the background


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts