Reply To: Making productive use of the XScreenSaver to display text instead of Conky

Forum › Forums › General › Tips and Tricks › Making productive use of the XScreenSaver to display text instead of Conky › Reply To: Making productive use of the XScreenSaver to display text instead of Conky

#10364
Anonymous

    Different from “not interested”, I just would not choose this presentation mechansism. Xscreensaver is (openGL?) cpu-intensive, and I would not be keen on adding long-running processes (rsstail+xscreensaver). For rss, the QuiteRSS application is my “right tool for the job”. I don’t care what 10 things (titles) the NYT or whatever source wants to shove in front of my attention. QuiteRSS (or Tiny Tiny rss) enables filtering out the items I’m not interested in. Inability to temporarily pause the scrolling would annoy me, and the autoscrolling at any speed would be a headache or at least a distraction.

    “AntiX doesn’t come with anywhere the user can add a program to the path”

    That statement is incorrect, and underscores a problem in arriving at a solution. Some basic linux+bash remedial reading is in order.
    ~/.profile
    ~/.bashrc
    IMO, there’s nothing wrong/bad about placing custom scripts in /usr/local/bin but if “portability” is a worry, place ’em in /bin or /usr/bin
    or… (across all you installations) edit .bashrc+.profile, appending PATH with your chosen custom location.

    A line in one posts above shows “calling sh to exec a #!/bin/bash script”.
    You need to read/learn that’s ill-advised, and why so.
    Besides, on antiX, does your system even have an “sh” command???
    (check it: IIRC, “sh” and “ash” are symlinks to “dash”, which you’ll usually not want to use instead of bash)

    Also multiple consecutive “echo echo” lines (without -ne, are prone to breakage if the material contains backslash character)
    should be replaced by a single printf statement (e.g. printf “NYT \n\n” )
    Could, or should? Partly it’s a matter of coding style. Should, because it helps reduce clutter, better allowing to “see the forest thru the trees”.
    Forest? Yes. So I would strive to replace pidof and killall and who shot the sherriff spread out across mutiple scripts with a single script.
    rsstail is probably NOT the ideal tool for the job. cURL or other rss-retrieving commands can similarly autoparse and strip out the xml tags to leave plain text.
    commands “diff”, “comm”, “sort”, “uniq” are available to handle/discard “old” items from prior runs.

    “I guess I did it just for my own learning and for my systems”

    and I nosed in b/c whatever I’ve learned, if I don’t use it every day, I get rusty. Looking at old scripts, and scripts by other people, jogs the memory {smiley}

    “examples (like using sed and awk and grep), and python”

    Great, because you’ll gain recognition of available tools suited for a broader application scope. Surely retrieving and parsing rss feeds is already a “solved problem” and various tools exists to serve as lego bricks, toward (optionally) sending the output to text-to-speech — personal assistant, instead of scrolling screenreader.

    For this xcreensaver presentation, toward deciding what-should-happen-in-what-order, maybe it would be helpful for you to tinker with using the “expect” command? (websearch “linux expect command”) http://www.lifewire.com/linus-unix-command-expect-2201096

    python: a lot of possibilities are available via use of “scapy” and “beautifulsoup” and “urllib”. Beyond just rss feeds, the news gatherer+presenter would also be able to selectively retrieve from webpages.