Re: Conky Help
These lines in conky will extract the headlines from news.yahoo.com
it depends on how variable the site is to whether this will always work...
you could probably successfully scroll each line i would think (you would want to remove the fold command from each line before scrolling it)
TOP STORIES
${font Sans:size=10}${color1}${execi 60 curl 'http://news.yahoo.com' | grep -n '<!-- COKE -->' | sed -n 1p | awk -F'<!-- COKE -->' '{print $1}' | awk -F' ' '{print $2}' | sed "s|'|'|g" | sed 's|"|"|g' | sed 's|—|-|g' | fold -sw 40}
${font Sans:size=10}${color1}${execi 60 curl 'http://news.yahoo.com' | grep -n '<!-- COKE -->' | sed -n 2p | awk -F'<!-- COKE -->' '{print $1}' | awk -F' ' '{print $2}' | sed "s|'|'|g" | sed 's|"|"|g' | sed 's|—|-|g' | fold -sw 40}
${font Sans:size=10}${color1}${execi 60 curl 'http://news.yahoo.com' | grep -n '<!-- COKE -->' | sed -n 3p | awk -F'<!-- COKE -->' '{print $1}' | awk -F' ' '{print $2}' | sed "s|'|'|g" | sed 's|"|"|g' | sed 's|—|-|g' | fold -sw 40}
OTHER NEWS
${font Sans:size=10}${color1}${execi 60 curl 'http://news.yahoo.com' | grep -n '<!-- COKE -->' | sed -n 4p | awk -F'<!-- COKE -->' '{print $1}' | awk -F'"> ' '{print $2}' | sed "s|'|'|g" | sed 's|"|"|g' | sed 's|—|-|g' | fold -sw 40}
${font Sans:size=10}${color1}${execi 60 curl 'http://news.yahoo.com' | grep -n '<!-- COKE -->' | sed -n 4p | awk -F'<!-- COKE -->' '{print $2}' | awk -F'"> ' '{print $2}' | sed "s|'|'|g" | sed 's|"|"|g' | sed 's|—|-|g' | fold -sw 40}
${font Sans:size=10}${color1}${execi 60 curl 'http://news.yahoo.com' | grep -n '<!-- COKE -->' | sed -n 4p | awk -F'<!-- COKE -->' '{print $3}' | awk -F'"> ' '{print $2}' | sed "s|'|'|g" | sed 's|"|"|g' | sed 's|—|-|g' | fold -sw 40}
${font Sans:size=10}${color1}${execi 60 curl 'http://news.yahoo.com' | grep -n '<!-- COKE -->' | sed -n 4p | awk -F'<!-- COKE -->' '{print $4}' | awk -F'"> ' '{print $2}' | sed "s|'|'|g" | sed 's|"|"|g' | sed 's|—|-|g' | fold -sw 40}
${font Sans:size=10}${color1}${execi 60 curl 'http://news.yahoo.com' | grep -n '<!-- COKE -->' | sed -n 4p | awk -F'<!-- COKE -->' '{print $5}' | awk -F'"> ' '{print $2}' | sed "s|'|'|g" | sed 's|"|"|g' | sed 's|—|-|g' | fold -sw 40}Last edited by mrpeachy (2010-07-23 00:30:48)
I have a blog, it's mostly about conky and lua stuff... go here.
