diff --git a/.conky/rss.pl b/.conky/rss.pl new file mode 100644 index 0000000..2a77ffe --- /dev/null +++ b/.conky/rss.pl @@ -0,0 +1,63 @@ +#!/usr/bin/perl -w + +############################ +# Creator: Jeff Israel // modified by Akamaru (https://PonyWave.de) +# +# Script: ./simple-rss-reader-v3.pl +# Version: 3.001 +# +# Coded for for Wikihowto http://howto.wikia.com +# +# Description: This code downloads an RSS feed, +# extracts the lines, +# cleans them up lines, +# prints the pretty lines +# exits on max-lines +# Usage: +# .conkyrc: ${execi [time] /path/to/script/simple-rss-reader-v3.pl} +# +# Usage Example +# ${execi 300 /path/to/script/simple-rss-reader-v3.pl} +# + +use LWP::Simple; + + +############################ +# Configs +# + +#$rssPage = "http://tvrss.net/feed/combined/"; +$rssPage = "http://yagyuu.local/rss/atom.xml"; +$numLines = 5; +$maxTitleLenght = 55; + +########################### +# Code +# + +# Downloading RSS feed +my $pageCont = get($rssPage); + +# Spliting the page to lines +@pageLines = split(/\n/,$pageCont); + +# Parse each line, strip no-fun data, exit on max-lines +$numLines--; #correcting count for loop +$x = 0; +foreach $line (@pageLines) { + if($line =~ /\<title\>/){ # Is a good line? + #print "- $line\n"; + $lineCat = $line; + $lineCat =~ s/.*\<title\>//; + $lineCat =~ s/\<\/title\>.*//; + $lineCat =~ s/\[.{4,25}\]$//; # strip no-fun data ( [from blaaa] ) + $lineCat = substr($lineCat, 0, $maxTitleLenght); + print "- $lineCat \n"; + $x++; + } + if($x > $numLines) { + last; #exit on max-lines + } + +} \ No newline at end of file diff --git a/.conkyrc b/.conkyrc index 1403484..5bb680f 100644 --- a/.conkyrc +++ b/.conkyrc @@ -72,6 +72,8 @@ ${color2}Glurak${color1}(${fs_type /home/akamaru/Festplatten/Glurak/})${alignr}$ ${color2}Karnimani${color1}(${fs_type /home/akamaru/Festplatten/Karnimani/})${alignr}${color3}${fs_size /home/akamaru/Festplatten/Karnimani/}>${color4}${fs_used /home/akamaru/Festplatten/Karnimani/}${color1}${alignr}${fs_bar 8,75 /home/akamaru/Festplatten/Karnimani/} ${color2}(${fs_used_perc /home/akamaru/Festplatten/Karnimani/}%) ${color2}Mautzi${color1}(${fs_type /home/akamaru/Festplatten/Karnimani/})${alignr}${color3}${fs_size /home/akamaru/Festplatten/Mautzi/}>${color4}${fs_used /home/akamaru/Festplatten/Mautzi/}${color1}${alignr}${fs_bar 8,75 /home/akamaru/Festplatten/Mautzi/} ${color2}(${fs_used_perc /home/akamaru/Festplatten/Mautzi/}%) ${color2}Pikachu${color1}(${fs_type /home/akamaru/Festplatten/Pikachu/})${alignr}${color3}${fs_size /home/akamaru/Festplatten/Pikachu/}>${color4}${fs_used /home/akamaru/Festplatten/Pikachu/}${color1}${alignr}${fs_bar 8,75 /home/akamaru/Festplatten/Pikachu/} ${color2}(${fs_used_perc /home/akamaru/Festplatten/Pikachu/}%) +${color0}RSS $hr: +${color2}${execi 1 /home/akamaru/.conky/rss.pl} ${color0}Netzwerk $hr: ${color4}WLAN${color2} ${alignr}${color2}IP ${addr wlan0} ${color2}Download ${downspeed wlan0}/s ${alignr} $alignr Upload ${upspeed wlan0}/s diff --git a/README.md b/README.md index 0c66fb3..3dac4b6 100644 --- a/README.md +++ b/README.md @@ -5,4 +5,4 @@ My Naira Conky Theme [Get conky](https://github.com/brndnmtthws/conky) --------------------------------------------------- -![http://img.akamaru.de/di/Y70K/TeamViewer_2016-03-10_23-22-00.png](http://img.akamaru.de/di/Y70K/TeamViewer_2016-03-10_23-22-00.png) +![http://img.akamaru.de/di/RU97/TeamViewer_2016-03-15_14-43-33.png](http://img.akamaru.de/di/RU97/TeamViewer_2016-03-15_14-43-33.png)