You are not logged in.

#1 2016-06-01 17:00:56

damo
....moderator....
Registered: 2015-08-20
Posts: 6,734

[SOLVED]Conky help - formatting rss output?

Instead of running a separate conky I am trying to output an rss feed within another one. To position it I am trying to use '${goto 300}', but only the first line of the output is indented as desired.

Searching has come up with some options, but neither is working so far

1) Use 'sed' to add the goto at the beginning of each line of the output, but this has no effect. (Conky syntax help needed here I think 8o )

${rss http://forums.bunsenlabs.org/extern.php?action=feed&type=rss 1 item_titles 6 | sed 's/^/${goto 300}/'}

2) Add the goto text within a script

#!/bin/bash

# extract text between "CDATA[" and "]]" (Post title text)
# cut first line with tail
# keep first 6 lines from result of tail
URL="https://forums.bunsenlabs.org/extern.php?action=feed&type=atom"
curl -s "$URL" | grep "<title" | grep -o -P '(?<=CDATA\[).*(?=\]\])'| tail -n +2 | head -n 6 | sed 's/^/${goto 300}/'

Run this in the conky with

${execi 10 $HOME/.config/conky/scripts/BL-rssfeed.sh}

The text is being added to each line, but the ouput on screen is not indented, and appears as eg

${goto 300}June 2016 Screenshots

Last edited by damo (2016-06-01 20:45:29)


Be Excellent to Each Other...
The Bunsenlabs Lithium Desktop » Here
FORUM RULES and posting guidelines «» Help page for forum post formatting
Artwork on DeviantArt  «» BunsenLabs on DeviantArt

Offline

#2 2016-06-01 19:32:20

ohnonot
...again
Registered: 2015-09-29
Posts: 5,592

Re: [SOLVED]Conky help - formatting rss output?

^ the last bit is easily explained. you have to use execpi.

apart from that i'm not quite sure what you're trying to achieve. several rss feeds side by side, horizontally? i made a proof-of-concept script can do that for conky, but it will make your head smoke.

Offline

#3 2016-06-01 20:45:08

damo
....moderator....
Registered: 2015-08-20
Posts: 6,734

Re: [SOLVED]Conky help - formatting rss output?

ohnonot wrote:

^ the last bit is easily explained. you have to use execpi.

Thanks for that - I guess I would have got to it eventually! All sorted now smile

${execpi 10 $HOME/.config/conky/scripts/BL-rssfeed.sh}

It is a single feed, with 6 lines displayed. I want them to appear in a particular x-position in the conky, ie all with the same indent from the left of the window, and now I can wink

Last edited by damo (2016-06-01 20:46:30)


Be Excellent to Each Other...
The Bunsenlabs Lithium Desktop » Here
FORUM RULES and posting guidelines «» Help page for forum post formatting
Artwork on DeviantArt  «» BunsenLabs on DeviantArt

Offline

Board footer

Powered by FluxBB