| 1 |
From Steven Black's posting: |
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
This is a simple shell script I created to easily add RSS feeds from within Firefox, etc. |
| 6 |
|
| 7 |
The user-interface is handled through third-party tools, falling back to BASH built-ins if on a TTY and sane defaults if not on a TTY. If you run the script from an xterm with --check it will check for the available interfaces and print the details. |
| 8 |
|
| 9 |
Usable X-based dialog tools include: kdialog, gtkdialog, Xdialog. Xdialog won't look as good as either kdialog or gtkdialog. ("zenity" is not supported as it is missing core features required.) |
| 10 |
|
| 11 |
Usable TTY-based dialog tools include: dialog (preferred), whiptail (not as good-looking or full-functioning as dialog), BASH is also well-supported. |
| 12 |
|
| 13 |
As mentioned previously, there are sane defaults and with no available user-interface it works in "automated" mode. (--help produces arguments.) |
| 14 |
|
| 15 |
For the title, it uses 'curl' to do a quick-download of the feed to try to get the proper title. (It usually works.) If it can't be determined from the feed, it tries to mangle the URL to get something of a usable default. If even that fails, it falls back to "Unknown". |
| 16 |
|
| 17 |
It supports the genre/group, but at this time it doesn't present a list of the currently in-use options. It is on my list of things to add, but I've been so lax on adding support for it that I'm making it available before I add it. |
| 18 |
|
| 19 |
It also supports both active and inactive feeds. These are handled by commenting out the feed in the ~/.podget/serverlist file. If running in automated mode, the feeds are inactive with an "Unknown" genre/group. (If it is automated, it is expected that you will need to manually tweak the title and group/genre.) |
| 20 |
|
| 21 |
If you add an existing feed, you can edit the title, genre/group, and activate/deactivate the feed. If you change the title or genre/group of a feed, it will automatically move the underlying directory if possible. (It tries to move the directory, if the directory already exists, it does nothing.) |
| 22 |
|
| 23 |
Additionally, it supports "inactivity tags". These are simple one-word reasons for why a feed is deactivated. These are handled by adding the word directly to the comment character in the serverlist. I use it to mark when a podiobook is completely downloaded ("DONE"), when I've finished reading a completed podiobook ("READ"), and when I've abandoned a feed ("QUIT"). |
| 24 |
|
| 25 |
So I have things like the following in my serverlist: |
| 26 |
|
| 27 |
#### Scott Sigler |
| 28 |
http://feeds.feedburner.com/scottsigler Horror Scott Sigler |
| 29 |
#READ http://www.podiobooks.com/title/infected/feed Horror Scott Sigler, Infected |
| 30 |
|
| 31 |
There's no user-interface to set the inactivity tag, (it needs to be set directly in the serverlist file) but if you reference the URL again it will present it to you. |
| 32 |
|
| 33 |
If I run podget-add-feed with the first URL, it will present a dialog like: |
| 34 |
|
| 35 |
Found <http://feeds.feedburner.com/scottsigler> in Horror as "Scott Sigler". It is active. Change this? |
| 36 |
|
| 37 |
For the second URL, it would say: |
| 38 |
|
| 39 |
Found <http://www.podiobooks.com/title/infected/feed> in Horror as "Scott Sigler, Infected". It is inactive (READ). Change this? |
| 40 |
|
| 41 |
If the inactivity tag were not defined, the whole " (...)" section would be missing, as you would expect. |
| 42 |
|
| 43 |
Oh, and when editing an existing feed it does not move the feed within the file. It's an in-place sed-based operation. This means that if I ran the command on either of the above-mentioned URLs, they would remain in the "Scott Sigler" section of my serverlist. It's a human-readable file, so it is expected that it would have human-centered structure. |
| 44 |
|
| 45 |
I have Firefox set to display the feed within the browser. I can then choose to add it as a text feed using some other software, or I can select "podget-add-feed" and it will allow me to set it up for podget. |