Giter Site home page Giter Site logo

akrennmair / newsbeuter Goto Github PK

View Code? Open in Web Editor NEW
780.0 50.0 100.0 10.23 MB

Newsbeuter is an open-source RSS/Atom feed reader for text terminals.

Home Page: http://www.newsbeuter.org/

License: MIT License

Makefile 0.65% C++ 97.57% Shell 0.67% Ruby 0.94% Perl 0.17%
rss-reader c-plus-plus feed-reader rss

newsbeuter's Introduction

ABANDONED! An actively maintained fork is available in newsboat repo

Newsbeuter Build Status Coverage Status

by Andreas Krennmair [email protected]

Newsbeuter is an RSS feed reader for the text console. Zed Shaw called it "The Mutt of Feed Readers".

It is designed to run on Unix-like operating systems such as GNU/Linux and FreeBSD. NetBSD is currently not supported, due to technical limitations.

Downloading

You can download the latest version of newsbeuter from the following website: http://www.newsbeuter.org/

Alternatively, you can check out the latest version from the newsbeuter Git repository (hosted on GitHub):

git clone git://github.com/akrennmair/newsbeuter.git

Dependencies

Newsbeuter depends on a number of libraries, which need to be installed before newsbeuter can be compiled.

Debian unstable comes with ready-to-use packages for these dependencies.

Installation

Compiling and installing newsbeuter is as simple as:

make
make install

(And if you ever need to uninstall it, use make uninstall.)

Tests

If you're a developer, here's how you can run the test suite:

make -j5 PROFILE=1 all test
(cd test && TMPDIR=/dev/shm ./test --order rand)

Note the use of ramdisk as TMPDIR: some of our tests require temporary files, which degrades the performance quite a bit if TMPDIR isn't in-memory.

Contact

Andreas Krennmair [email protected]

Support

License

Newsbeuter is licensed under the MIT/X Consortium License. See the file LICENSE for further details.

newsbeuter's People

Contributors

ahitrin avatar akrennmair avatar aniranc avatar arlon1 avatar arvedarved avatar carno avatar da2x avatar der-lyse avatar dirb avatar donkult avatar dschoepe avatar ft avatar gs93 avatar ittner avatar jspricke avatar kastian avatar kisom avatar minoru avatar ni0n avatar nosuck avatar orner avatar qsn avatar richq avatar skn avatar t-8ch avatar tkerdonc avatar tsipinakis avatar uqs avatar vaygr avatar x4121 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

newsbeuter's Issues

Keep unread items when using keep-articles-days

I'd like to keep the size of cache.db reasonable by deleting all read items after n days.

Currently, using keep-articles-days will delete unread items which I don't want to delete – they are unread for a reason. An option like "keep-unread yes" would be useful in this case.

Macro to use imagemagick to display image urls in article

Using Newsbeuter 2.1 on Ubuntu 64-bit 10.04

In the newsbeuter documentation an example is given of a macro to change the program to handle image urls

http://www.newsbeuter.org/doc/newsbeuter.html#_macro_support

The given macro is

macro i set browser "feh %u"; open ; set browser "elinks %u"

which open the url with feh and then changes the browser to elinks

However I want to open an image url linked to from the article, and not the url associated with the article, such as url #2 in the article is an image url which I want to open using ImageMagick. I tried the following macro command --

macro i set browser "display" ; goto-url ; set browser "google-chrome"

However this macro always opens the image url in google chrome. Only when I use the following macro is the image url opened in ImageMagick

macro i set browser "display" ; goto-url

However that leaves ImageMagick as the default browser and I need to change the browser back to google chrome for which I need to execute another macro.

Is there anyway I can use one macro to open an image url linked in the article (not associated with the article) in ImageMagick (or any other image viewer such as feh) and then change the browser back to google chrome?

Update:

In fact the macro command does not execute the given commands sequentially. For example in my config file I have the following lines

browser "google-chrome"
macro i goto-url ; set browser "display %u"

If I open an image url using the macro the image is opened in ImageMagick and not in google chrome. The documentation suggests that the commands are executed sequentially, however that is not the case here.

Feature Request:Save multiple feed articles into .txt file, newest first

Saving a article into a single file is already implemented. It can be used by simple pressing the s key.
I would like to export multiple feeds (or all feeds) at once.
With this feature, you could simply copy a .txt file to your ebook reader daily for offline reading of news.

Thinking further, a command line option would be cool, like:

$ newsbeuter --sync-into-file news.txt

which prepends everything thats new on top of this file for reading. A maximum size of 1MB could be defined, and the oldest news gets removed from the file.

Deleting articles is extremely slow, if many articles in feed (was: "BULK-Delete" would be nice)

In newsbeuter 2.7, when I delete many articles by pressing "D"-key for a while, the deleting is very slow.
It's an older/slower computer, but the problem is, I would guess, that each delete makes a single access to the sqlite-database. (connect,delete,disconnect)

It would be better, IMHO, if all delete-operations would be done just in mem, and when leaving a feed (or forcing an operation / syncing with database), that then all delete-operations will be done at once.

This would make the delete operations much faster.

Crash on FreeBSD 8.2

Hi,

if I try to start newsbeuter 2.4 on freebsd 8.2 (stfl v 0.21) it crashes.
Backtrace:

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 8038041c0 (LWP 100265)]
0x0000000801097af6 in stfl_style () from /usr/local/lib/libstfl.so
(gdb) bt
#0  0x0000000801097af6 in stfl_style () from /usr/local/lib/libstfl.so
#1  0x0000000801098a1d in stfl_ipool_create () from /usr/local/lib/libstfl.so
#2  0x00000008010961ec in stfl_form_run () from /usr/local/lib/libstfl.so
#3  0x00000008010950cb in stfl_run () from /usr/local/lib/libstfl.so
#4  0x00000000004d2cb0 in newsbeuter::stfl::form::run (this=0x80380c5f0, 
    timeout=Variable "timeout" is not available.
) at src/stflpp.cpp:37
#5  0x00000000004726ad in newsbeuter::feedlist_formaction::init (
    this=0x8038c1180) at src/feedlist_formaction.cpp:39
#6  0x000000000042d8a7 in newsbeuter::view::run (this=0x7fffffffe860)
    at src/view.cpp:153
#7  0x000000000043d9ec in newsbeuter::controller::run (this=0x7fffffffe590, 
    argc=1, argv=0x7fffffffea00) at src/controller.cpp:586
#8  0x0000000000407dc5 in main (argc=1, argv=0x7fffffffea00)
    at newsbeuter.cpp:29
(gdb)

Keep up the good work this newreader rocks. :-)

Submit new Homebrew fromula for version 2.6

Once version 2.6 is released, the issues from the first submission have been resolved. New dependencies: json-c, and the flags LDFLAGS: -L/usr/local/opt/gettext/lib and CPPFLAGS: -I/usr/local/opt/gettext/include must be set. Tested thoroughly on OS X 10.7 and 10.8, and the current master of newsbeuter version 2.6. should not have any problems being accepted.

TinyTinyRSS not working anymore

Because Google Reader's support is being dropped soon, I've been trying to get TinyTinyRSS working. I can access it online, but when I try and run newsbeuter it hangs after "Loading URLS from Tiny Tiny RSS . . .". I ran

newsbeuter -l 6 -d log

and the log file says that the returns json records me as not logged in:

DEBUG: ttrss_api::run_op(login,...): reply = {"seq":null,"status":1,"content":{"error":"NOT_LOGGED_IN"}}

After looking that the TinyTinyRSS wiki, I noticed that support for the http api has been dropped since 1.6.0. Instead of

http://example.dom/path/to/tt-rss/api/?op=login&user=you&password=xxx

which when I run it through curl, gets me the error message, they want the query to be like this:

curl -d '{"op":"login","user":"you","password":"xxx"}' http://example.dom/tt-rss/api/

When I try this way, I get a json back that is successful.

I would appreciate it if someone could fix this.

newsbeuter -x reload segfaults

Everything else, interactive newsbeuter, even newsbeuter -x print-unread, works fine.

Here is the full gdb output of the backtrace:

$ gdb ./newsbeuter                                                                   
GNU gdb (GDB) 7.6
Copyright (C) 2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-unknown-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /home/sources/newsbeuter-2.6/newsbeuter...done.
(gdb) run -x reload
Starting program: /home/sources/newsbeuter-2.6/newsbeuter -x reload
warning: no loadable sections found in added symbol-file system-supplied DSO at 0x7ffff7ffa000
warning: Could not load shared library symbols for linux-vdso.so.1.
Do you need "set solib-search-path" or "set sysroot"?
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/libthread_db.so.1".
[New Thread 0x7ffff4e7f700 (LWP 6653)]
[Thread 0x7ffff4e7f700 (LWP 6653) exited]
[New Thread 0x7ffff4e7f700 (LWP 6654)]
[Thread 0x7ffff4e7f700 (LWP 6654) exited]

Program received signal SIGSEGV, Segmentation fault.
0x00000000004325d2 in newsbeuter::view::force_redraw (this=0x7fffffffdcc0) at src/view.cpp:809
809             fa->set_redraw(true);
(gdb) bt
#0  0x00000000004325d2 in newsbeuter::view::force_redraw (this=0x7fffffffdcc0) at src/view.cpp:809
#1  0x0000000000443efb in newsbeuter::controller::reload_all (this=0x7fffffffddf0, unattended=true) at src/controller.cpp:895
#2  0x00000000004474b0 in newsbeuter::controller::execute_commands (this=0x7fffffffddf0, argv=0x7fffffffe1f8, i=2)
    at src/controller.cpp:1327
#3  0x0000000000440d77 in newsbeuter::controller::run (this=0x7fffffffddf0, argc=3, argv=0x7fffffffe1f8) at src/controller.cpp:592
#4  0x00000000004082b5 in main (argc=3, argv=0x7fffffffe1f8) at newsbeuter.cpp:30
(gdb) quit
A debugging session is active.

        Inferior 1 [process 6649] will be killed.

Quit anyway? (y or n) y

I wonder why something like force_redraw is called at all while batch executing newsbeuter with -x.

Proxy settings in config file does not work.

Hi there, I use net-news/newsbeuter-2.2 and with "proxy localhost:8123" in config file newsbueter still connect direct to feeds, but if I first do export http_proxy="localhost:8123" then it work.

multiple url-source?

Is it possible to have 2 url-source - one remote (tt-rss/google reader) and one local?

The main reason is that there are some feeds that tt-rss is not able to parse but newsbeuter is able to!

feature request "send to" like in Google Reader

Hey, in Google Reader, there's an option to set up some urls associated with a button, so I can send an article title, url, image url, etc to a script that I wrote on my own server (or send the url to twitter or what-have-you). Is there a way to do that now with newsbeuter? If not, can we add that option? I love the offline and text-only features of newbeuter, but the "send to" option is something that I use pretty heavily in Google Reader and I'd hate to lose that.

Crash when setting `ignore-article`

Hi all,

First, thanks for the awesome work, I've never been able to read RSS feeds so quickly!

I've been trying to ignore some of my feeds that contain images, to be able to browse them in Tiny Tiny RSS later. The line I added to my config file is :

ignore-article "*" "tags # \"Artistic\""

If I do this, Newsbeuter crashes on startup with this stack trace :

(I also have the full log file if you want, I just don't want to send it to anybody as it contains a lot of private stuff. By the way, you might want to think about warning the user that it displays TT-RSS passwords and session IDs in plain text)

(gdb) run -l 6 -d ~/.newsbeuter/log
Starting program: /Users/fx/Library/Caches/Homebrew/newsbeuter--git/newsbeuter -l 6 -d ~/.newsbeuter/log
Reading symbols for shared libraries ++++++++++................................................ done
Reading symbols for shared libraries ........................ done
XDG: configuration directory '/Users/fx/.config/newsbeuter' not accessible, using '/Users/fx/.newsbeuter' instead.
Starting newsbeuter 2.5...
Loading configuration...done.
Opening cache...done.
Loading URLs from Tiny Tiny RSS...done.
Loading articles from cache...terminate called throwing an exception
Program received signal SIGABRT, Aborted.
0x00007fff884a3ce2 in __pthread_kill ()
(gdb) bt
#0  0x00007fff884a3ce2 in __pthread_kill ()
#1  0x00007fff934fc7d2 in pthread_kill ()
#2  0x00007fff934eda7a in abort ()
#3  0x00007fff871c97bc in abort_message ()
#4  0x00007fff871c6fcf in default_terminate ()
#5  0x00007fff931d51cd in _objc_terminate ()
#6  0x00007fff871c7001 in safe_handler_caller ()
#7  0x00007fff871c705c in std::terminate ()
#8  0x00007fff871c8152 in __cxa_throw ()
#9  0x00000001001150b9 in newsbeuter::matcher::matchop_cont (this=0x10053e740, e=0x10053efc0, item=0x101101c30) at src/matcher.cpp:132
#10 0x0000000100114078 in newsbeuter::matcher::matches_r (this=0x10053e740, e=0x10053efc0, item=0x101101c30) at src/matcher.cpp:190
#11 0x0000000100113dd7 in newsbeuter::matcher::matches (this=0x10053e740, item=0x101101c30) at src/matcher.cpp:65
#12 0x0000000100078af5 in newsbeuter::rss_ignores::matches (this=0x7fff5fbff260, item=0x101101c30) at src/rss.cpp:403
#13 0x00000001000064db in newsbeuter::cache::internalize_rssfeed (this=0x10053f1a0, feed=@0x7fff5fbfed28, ign=0x7fff5fbff260) at src/cache.cpp:438
#14 0x00000001000503ba in newsbeuter::controller::run (this=0x7fff5fbff1b8, argc=5, argv=0x7fff5fbff540) at src/controller.cpp:532
#15 0x0000000100001102 in main (argc=5, argv=0x7fff5fbff540) at newsbeuter.cpp:30

Config not respecting `oldreader-min-items`

I am running the latest master.

I have set oldreader-min-items (in an attempt not to miss items in my feeds when my computer is offline for some time), but it is still only loading 20 items.

I am also getting an HTTP response code error when I try to reload a single feed (I have tried running with log level set to 6, but there is no more information on the error).

Keybindings: search by feed, swap next item / next feed j/k / J/K bindings?

New to newsbeuter, some observations / questions

I'd like to be able to jump to a specific feed within my feeds list. Presently this only seems possible by navigating to it via down-arrow. Some sort of search syntax would be preferable. I've got 50+ feeds, and hopping to specific ones is a bit cumbersome.

Alternatively, an "##G" syntax similar to mutt's would be useful.

If I could set newsbeuter NOT to exit the present feed while in article-view-mode, I'd prefer it.

I also find that the post / feed navigation keys are pretty much precisely the inverse of what I'd expect. "j/k" should navigate between adjacent posts in the current feed, "J/K" should be used for jumping to the next/prior feeds. Yes, there's "n/p", but that takes me off home row.

Otherwise: this is really pretty damned awesome.

date format in POT

Is it possible to include the date format in the pot file, e.g. using strftime format?

: src/controller.cpp:1172 src/itemview_formaction.cpp:99

msgid "Date: " <------ "Date: %a, %e %h ..."
msgstr ""

In that case translators are able to use the correct date format in the translation.

Customize font family and font size

I want to use different fonts for coding and reading.

It seems newsbeuter use the global font settings of the terminal. Is it possible to customize it in config file?

sort-article-order

sort-article-order date-asc

should sort the articles with oldest at the top and the newest at the bottom. At least thats what I thought !

But it lists the newest items first and the oldest at the end.

May be it is bug or you intended it to be like this.

Thank you for the great work,
Devendra

soft-hyphen

When a feed comes with &shy; newsbeuter renders a hyphen, which is not the intention of a soft-hyphen.

can not view content

Open one title, then only bellowing shoen, not content. I guess something wrong with variable $PAGER. when I set pager internal. it can not work, then I set pager less %f, then it works, but less is not a good way.

Feed: Vim scripts update
Title: VimLite 0.8.8.1 -- Make vim as a C/C++ IDE inspired by CodeLite.
Link: http://www.vim.org/scripts/script.php?script_id=3647#0.8.8.1
Date: Sun, 18 Dec 2011 20:24:52 +0800
No content at here.

Stackoverflow feeds aren't marked as read in Google Reader

I've subscribed to a couple of Stackoverflow feeds (like this) in Google Reader and I can read them fine in Newsbeuter but they don't get marked as read by "mark-feed-read" on Google Reader. Newsbeuter do show them as read, only until next sync when they reappear as new again. Reading every article works correctly (read are indeed marked as read in both Newsbeuter and Reader).

Marking as read in Google Reader is the only way to make them be synced as "read" by Newsbeuter. Other than actually read one by one, that is. It happens only with Stackoverflow feeds, and with any of them.

Title, URL parameters not *visibly* passing to bookmark command

Hi,
I love newsbeuter... but after upgrading from the Ubuntu package version (2.4) to the github development version (2.7), then downgrading to 2.6 stable, I've had a problem running the bookmark command.

Simply put it seemed the title and URL were no longer being correctly detected, as they didn't show up in the dialog after hitting ctrl-B. However, after some testing, I figured out that the title and URL were in fact passing correctly from newsbeuter to my bookmarking script, they just are no longer visible in the newsbeuter dialog.

If this is the intended behavior in the new versions, I'd suggest it be reverted, as it seems more natural to know what URL, etc., are being bookmarked. Or I suppose it could be my fault owing to some stupid/ignorant misconfiguration. But if it's a bug, I'm happy to help diagnose.

I'm now running 2.7 on a headless Ubuntu 12.04 LTS, with all dependencies installed from the Ubuntu package repos.

(Additionally, and this may be related, after the upgrade the bookmark script started throwing a "Permission denied" error.)

Thanks.

Google Reader support?

As maybe you know GoogleReader will available only until july 1, 2013.
I'm using newsbeuter to GR (faster and simplier as GR).
Maybe want to know which can we use instead of GR.
I've found http://www.feedly.com/ - but newsbeuter is better :)

I think would be good if you (and the users, and me of course) will find a similar solution and integrate into newsbeuter.

Compile fail - missing unistd.h

There's a few object files not compiling for me because unistd is missing
Needed to add:

include <unistd.h>

to some files to get a build, ie include/utils.h

index 523d763..f74ea29 100644
--- a/include/utils.h
+++ b/include/utils.h
@@ -4,6 +4,7 @@
#include
#include
#include
+#include <unistd.h>

#include <logger.h>
#include <curl/curl.h>

newsbeuter misses new posts not chonologically newest

When a feed includes new posts in between older posts (e.g., when a new blog gets added to an aggregator), newsbeuter does not show the new post in the view. I'm guessing newsbeuter gets the first post, sees that it already has it, and then quits parsing the feed.

Doesn’t set up .config/.local folders und uses .newsbeuter instead

When I start the program for the first time, it doesn’t create the .config folders, but complains:

XDG: configuration directory '/home/philip/.config/newsbeuter' not accessible, using '/home/philip/.newsbeuter' instead.

When I move it to the right place, it now complains that it can’t find the stuff in .local/share.

Shouldn’t it set that up if it doesn’t exist automatically?

Navigating the taglist

I'm on OS X 10.7 and installed newbeuter with homebrew. When I open up the taglist window to select a tag, I can only navigate the tags by hitting the up and down arrows. I would have thought I could use J and K (or whatever else I bind to 'next' and 'prev'). Am I doing some thing wrong or is this not implemented?

Add the possibility to set by default the sort options available as interactive operations

In the config file you can sort the feeds by its first tag, but you can't sort them by the number of unread articles, for example.

The first action that I do each time that newsbeuter finish to catch the news is sort the feeds by the number of unread articles in descendent order. I suppose that most of us prefer this or another order to begin the reading of the articles in a convenient order.

It will be lovely if this could be done automatically by default instead of doing it by hand. I can live without that, but you can make more lazy and happy if I don't have to sort them by hand anymore.

I suggest to make this via the feed-sort-order command in the config file, simply adding more options.

Thanks for your time.

default to tag dialog

Would it be possible to add an option making newsbeuter default to the tag dialog (instead of the full article list) when it starts?

JSON-Api for tt-rss

Since tt-rss v1.6.0 (released on 19.10.2012) it doesn't support the old GET based API anymore.
The recommended way is now JSON.

Using current master (b7f4631) with the new tt-rss make newsbeuter hangs on:

Loading URLs from Tiny Tiny RSS

Messages in log:

[..] loads of OpenSSL stuff
[2012-10-28 18:57:33] DEBUG: utils::retrieve_url(https://baseurl.of/tt-rss/api/?op=login&sid=&password=password&user=user): {"seq":null,"status":1,"content":{"error":"NOT_LOGGED_IN"}}
[2012-10-28 18:57:33] DEBUG: ttrss_api::run_op(login,...): reply = {"seq":null,"status":1,"content":{"error":"NOT_LOGGED_IN"}}

If you need a tt-rss instance to do debugging I would be glad to provide one.

segfault on -x reload

I got a segmentation fault when doing

newsbeuter -x reload

just minutes ago. Can you reproduce? Maybe you want my feeds to reproduce, email me!

newsbeuter Version: 2.6
OS: Arch linux 64 bit
Installed via pacman, not from this git repository!

If you need more information, let me know!

Feature not issue: marrying newsbeuter and rsstail / multitail

So, you're a command-line jocky. You've discovered newsbeuter and, outside of a mutt, it's the best way to read news (inside a mutt, of course, it's too dark to read).

But you'd also like to be able to get a quick "world at a glance" view of your newsfeed, or portions of it, scrolling by, Twitter-like.

There's a tool for that: Folkert van Heusden's "rsstail", which can follow and stream an RSS feed, displaying (pick one or all) title, link, and/or description ("content"). Which is handy in its own way, but if you could follow multiple feeds, and, say, color highlight them, offer scrollback and search, and other goodness, plus reformat things a tad, wouldn't that be even better?

Yes, it is. Folkert van Heusden's "multitail" does almost all of that.

But wait, you say, maintaining yet another set of RSS feeds (even with the awesome OPML export functionality of newsbeuter) is a PITA. I want to be able to do all of this straight from my newsbeuter URLs list without worrying about any of that. Oh, and while you're at it, you know those tags I've created? I want to be able to access those and just follow, say, a specific set of tagged feeds. And instead of printing out "Title:" for each feed title, give me the name of the bloody feed. And fix multitail's gawdawful color highlighting too.

No worries. Say, something like this?

http://i.imgur.com/0PKeNJY.png

Yeah, you say, but got source?

Yep.

Scripts presume ~/.newsbeuter/urls and ~/.multitail.conf


The multitail launch script, 'multitail-newsbeuter'

#!/bin/sh
#
# multitail-rsstail-custom
# Edward Morbius <[email protected]>
# Sun Jan  5 20:55:05 2014
#
# multitail of rsstail of newsbeuter feeds, with custom header rewriting
# and color schemes implemented.
#
# Presumes a local multitail config file and newsbeuter url file.

tagopt=""

while [ $# -gt 0 ]
do 
    tags="$1"
    tagopt="--tags $tags"
    shift
done

eval multitail  -F .multitail --no-load-global-config -CS rsstail $( 
    ~/bin/newsbeuter2rsstail $tagopt ~/.newsbeuter/urls  
    )

newsbeuter2rsstail:

#!/usr/bin/gawk -f
#
# newsbeuter2rsstail
# Edward Morbius <[email protected]>
# Sun Jan  5 19:20:44 2014
#
# Parse a Newsbeuter feed and generate a set of rsstail commands
# suitable for inclusion into multitail
#
# Optional argument:
#    --tags <taglist>       Comma-separated list of tags to select
#                               Match is case insensitive
#
# ----------------------------------------------------------------------

BEGIN {
    # Args parsing
    tagset = 0

    for( i=0; i<ARGC; i++ ) {
    if( ARGV[i] == "--tags") {
        delete ARGV[i] 
        taglist = tolower(ARGV[++i])
        delete ARGV[i] 
        tagmax = split( taglist, tags, ",")
        tagset = 1
    }
    }
}

# Find a feed and work with it.
/^http/ {

    if ( NR > 40 ) exit         # DEBUG
    tagmatch = 0

    # Are we filtering on tags?
    # Match is on any tag (or substring thereof)
    if( tagset == 1 ) {
    feedtags = tolower(substr($0, length($1) + 1))
    for( itag=0; itag <= tagmax; itag++ ) {
        if( match( feedtags, tags[itag] ) > 1) {
        tagmatch = 1 
        }
    }
    }

    if( tagset == 1 && tagmatch != 1) {
    next
    }

    i++     # Increment feed counter
    if( i == 1 ) {
    1==1 
    printf ("-l ")  # multitail's first command arg
    }
    else {
    1 == 1
    printf( "-L " ) # Additional args, consolidated in first
    }

    # Feed is the first element

    # Extract the feed title.

    host = gensub("^https*://([^/]*)/.*", "\\1", "g", $1)
    path = gensub("^https*://[^/]*/(.*$)", "\\1", "g", $1)
    hostfields = split(host, hostpart, "\\.")
    pathfields = split(path, pathpart, "/" )

    # ----------------------------------------
    # Site rules here
    # If you're not happy with the pattern match / feed name, add a rule
    # here according to the site's parameters.
    # ----------------------------------------

    # Blogging sites (more can go here)

    if( match(host, "(dreamwidth|blogspot|blogger)")) {
    feedtitle = hostpart[1]
    }


    # Reddit's subreddits
    else if ( match($1, "reddit.com/r" )) {
    feedtitle = "/" pathpart[1] "/" pathpart[2]
    }
    # Reddit user feeds
    else if ( match($1, "reddit.com/user" )) {
    feedtitle = "/" pathpart[1] "/" pathpart[2]
    }
    # Reddits messages
    else if ( match($1, "reddit.com/message" )) {
    feedtitle = hostpart[2] "-" pathpart[1]
    }

    # Guardian feeds
    else if ( match(host, "theguardian.com" )) {
    if (match(pathpart[1], "theguardian" )) {
        feedtitle = hostpart[2] "-" pathpart[2]
    }
    else feedtitle = hostpart[2] "-" pathpart[1]
    }

    # Additional random sites, examples of matches...
    else if ( match(host, "physics.ucsd.edu" )) {
    feedtitle = pathpart[1]
    }

    else if ( match(host, "blogs.law.harvard.edu" )) {
    feedtitle = pathpart[1]
    }

    # Don Marti
    else if ( match(host, "zgp.org" )) {
    feedtitle = pathpart[1]
    }

    else if(hostfields > 2) {
    feedtitle = hostpart[2] 
    }

    else {
    feedtitle = hostpart[1];
    }

    printf (  "\x22rsstail -n 1 -Z \x27%s:  \x27 -z -u \x27%s\x27 | sed \x27s/:  Title:/:/; s/^ //\x27 \x22 ", feedtitle, $1 )

    # Arguments:
    #  -n 1:  initially load one item
    #  -a :  Show author (not enabled)
    #  -Z <header>:  Add header
    #  -u <feedurl>:  Feed URL
    #
    # The sed bit strips the "Title: " header and cleans leading
    # whitespace.
}

And a modified multitail.conf with betterer syntax highlighting:

# multitail config

# rsstail (http://www.vanheusden.com/rsstail/)
colorscheme:rsstail:RSSTail output (RSS feed reader)
cs_re:cyan::
cs_re:cyan:/
cs_re:blue:^.......... ..:..:..  
cs_re:white:^Title:.*
cs_re:cyan:^Link:.*
cs_re:yellow:^Description:
cs_re:white:^Author:.*
cs_re:yellow:^[-a-z~/]*: 
#
include:/etc/multitail.conf

More:
http://www.reddit.com/r/dredmorbius/comments/1udv6i/further_adventures_in_rss_chrome_reader_extension/

The scripts and some background:

http://www.reddit.com/r/dredmorbius/comments/1udv6i/further_adventures_in_rss_chrome_reader_extension/cek9441

Behavior when RSS enclosure and media:content is available

Currently, when there is an enclosure element and/or one or more media:content elements in an RSS feed, the one last parsed gets set as enclosure_url.
Wouldn't it make sense, to prioritize the enclosure element, which was "designated" by the feed publisher, to be the primary media object associated with the feed's item.

The reason for me to propose this, is the blip.tv RSS feed. It has several versions of the videos, with different quality in a media:group and a playlist file as the last item in the media:group, which doesn't play, because is hasn't valid entries.
Prioritizing the enclosure element, would always give a valid video and IMHO be less "random" than just using the last element parsed.
Edit: a sample RSS feed: http://blip.tv/radio-dead-air/rss/

Breakage of highlight-article with introduction of listnormal_unread

newsbeuter 2.7 introduced two new elements; listnormal_unread and listfocus_unread. As it can be seen on lines 71-73 here I had configured newsbeuter to change the color of articles in a feed based on their url (I have an rss feed based on combined subreddits and want to make some of those subreddits easily identifiable based on their color). This worked perfectly in newsbeuter 2.6, but as of 2.7 the color setting of listnormal_unread and listfocus_unread take precedence, thus, rendering highlight-article ineffective.

It would be nice newsbeuter could have a point based system to see which color setting should take precedence, as this would be more flexible and also allow me to fix an annoyance on my config where highlight-article takes precedence over color listfocus

Newsbeuter unresponsive while running bookmark command

I have a question regarding the use of newsbeuter bookmark command option.

I am using a bash script as the bookmark command. It takes the url, parses it and downloads the targets of certain links in the page using wget. The issue I am facing is that newsbeuter becomes unresponsive until the script finishes execution. Is there anyway for newsbeuter to run the bookmark script in the background while I am able to use it to, say, read other feeds?

bookmark-interactive seems to have no effect

I have tried to set bookmark-interactive to yes and no and always end up getting asked title, url and description questions!

Seems like a weird issue not be not noticed by anyone else so I have feeling it might be an issue at my side, but for the life of me I can't seem to figure out what could be causing it!

Auto refresh

Is it possible to autorefresh the feeds rather than having to do "R" frequently (feeding the addiction, I know)?

Problem when making newsbeuter

Hello,

I am using homebrew on macosx mavericks 10.9 and when it tries to make newsbeuter there is an error that says:

==> make

include <tr1/memory>

     ^

1 error generated.
make: *** [src/colormanager.o] Error 1
make: *** Waiting for unfinished jobs....

Does anyone know how to fix this?

bookmark command argument order

When I want to bookmark an article, I use the key I have bound to the bookmark command, and according to the debug log, the order of the arguments for the command are as such:

cmd = bookmark.sh 'url' 'title'

I set up some macros to be able to send my bookmarks to different destinations, like so:

macro b set bookmark-cmd "~/bin/bookmark2.sh"; bookmark ; set bookmark-cmd "~/bin/bookmark.sh"

When I run the macro ,b, according to the debug log, the arguments have the opposite order:

cmd = bookmark2.sh 'title' 'url'

Also, a side note, I was getting an error with the macro if there wasn't a space between the command 'bookmark' and the trailing ';'.

Two feature requests

I'm using NB with google reader sync, and I'd be very happy with two new features:

  1. the possibility to set up newsbeuter to mark articles automatically as read based on some
    filter criteria(s) (e.g. mark the feed items as read which points to some already seen target URLs)
  2. act on group of filtered item list: filtering the items in a feed then hitting A marks the whole feed as read not only the items which were filtered...

I'd donate (Paypal if possible) for these two.

Thanks in advance,
Zsolt

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.