Git Product home page Git Product logo

canto-next's Introduction

Canto Daemon

This is the RSS backend for Canto clients.

Canto-curses is the default client at:

http://github.com/themoken/canto-curses

Requirements

Debian / Ubuntu
- python3
- python3-feedparser

Arch (Py3 is default)
- python
- python-feedparser

Install

From this directory, run

    $ sudo python3 setup.py install

If you're a systemd user you can easily run it on startup

    $ systemctl --user enable canto-daemon

Or start it manually with

    $ systemctl --user start canto-daemon

By default, user sessions start on login, and end on logoff stopping daemons. This is good behavior, but if you don't want canto-daemon to stop when you log out (to keep gathering news) enable "lingering" for your account.

    $ loginctl enable-linger <username>

This will start one session for you on boot that will last until shutdown.

canto-next's People

Contributors

frat3rius avatar themoken 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

canto-next's Issues

Prepend tag header with extra tags

Hi!

I'd like to prepend my tag headers with the list of extra tags. I've achieved this by hacking tag.py like so:

diff --git a/canto_curses/tag.py b/canto_curses/tag.py
index ef2e3c0..f314abd 100644
--- a/canto_curses/tag.py
+++ b/canto_curses/tag.py
@@ -306,6 +306,9 @@ class Tag(list):

         # Make sure to strip out the category from category:name
         tag = self.tag.split(':', 1)[1]
+        extra = self.callbacks["get_tag_conf"](self)['extra_tags']
+        if extra:
+            tag = ", ".join(extra) + " -- " + tag

         unread = len([s for s in self\
                 if "canto-state" not in s.content or\

Can this be achieved with the current code somehow? I saw a format is defined, but haven't had the time to figure out how it works. That would be best, since even if someone wants to do this, they won't necessarily want it exactly like me.

canto didn't displayed TUI

Hi,

After setting some new locales and font settings to Archlinux x64, canto-curses was not able to display his text UI.
Logs from daemon are available here : http://ix.io/18z3

thanks for your time,

PE

XMPP (RFC 6120), PubSub (XEP-0060) and Atom Over XMPP (RFC 4287)

Greetings!

My name is Schimon and I am a champion of Syndication and XMPP.

For those of you who are not famiiliar, XMPP (previously Jabber) is a messaging system with open standards. XMPP is extensible via XEP.

I will discuss about XEP-0060: Publish-Subscribe.

Almost a couple of decades ago, a discussion arose about incorporating Atom (RFC 4287) with XMPP PubSub, which is really easy because both are XML data.

One of the major benefits of utilizing PubSub is native Push Notifications (yes, that technique was much before HTML5) which do not require HTTP pulling.

That would be a great feature to have Canto to utilize XMPP PubSub natively!

See a proof of concept I have made to parse PubSub nodes as Atom Syndication Format.

https://datatracker.ietf.org/meeting/66/materials/slides-66-atompub-1.pdf
https://codeberg.org/poezio/slixmpp/issues/3526

Cheers,
Schimon

Pip build doesn't declare feedparser as a dependency

Specifically evidenced by this:

koz@Azis ~ $ sudo -u canto pip show Canto
Name: Canto
Version: 0.9.7
Summary: Next-gen console RSS/Atom reader
Home-page: http://codezen.org/canto-ng
Author: Jack Miller
Author-email: [email protected]
License: GPLv2
Location: /home/canto/.local/lib/python3.6/site-packages
Requires: 

This is clearly incorrect, as canto-daemon relies on feedparser to do its work. By contrast, consider the examples given in the docs for pip show. Sure enough, manual execution fails in the expected manner:

koz@Azis ~ $ sudo -u canto bash -c 'PATH=/home/canto/.local/bin:${PATH} canto-daemon -v --port=3333 --cache=on'
Traceback (most recent call last):
  File "/home/canto/.local/bin/canto-daemon", line 3, in <module>
    from canto_next.canto_backend import CantoBackend
  File "/home/canto/.local/lib/python3.6/site-packages/canto_next/canto_backend.py", line 18, in <module>
    from .fetch import CantoFetch
  File "/home/canto/.local/lib/python3.6/site-packages/canto_next/fetch.py", line 16, in <module>
    import feedparser
ModuleNotFoundError: No module named 'feedparser'

Yet another hook request (and question about ssh)

It would be great to have a hook which will work upon pressing 'g' (upon opening an article in a web-browser). Then one can form his own RSS feed based upon the items he reads (I am basically posting cool articles to my friends and it takes much time... it would be quite an optimisation to post them just an rss :D)

And I have question about ssh: it takes too long to get contents and everything lagging (over LAN). Should it be like this?
I did on server:
canto-daemon -p 31000
I did on client:
canto-curses -a 192.168.100.33 -p 31000

(I am connecting just via LAN, not via ssh. The question is how to do it via ssh and will it be faster than lan and etc.)

UPD: And canto-curses sometimes outputs errno 111 - connection refused

Daemon never deletes any of the items

This is more a question than an issue.

File .canto-ng/feeds grows and grows until it reaches the point when I couldn't download it over ssh and client breaks and do not work. Then I delete this file and it starts all over again.

I guess this is because of the option I set:
:keep_unread = [True|False]

I am never reading news through the reader itself, I choose interesting topics and press 'g' (open through web-server). Is that why daemon never deletes all old stuff? Will it delete the old stuff if I set this to False? And will I miss anything if this will be set to False, but daemon will work 24/7 on my raspbery PI server?

Btw. I am marking all the news as 'read' (they change color and dissapear from the client view configured with filter)

inoreader support ?

Hi !

Is there interest, or even someone working on, support for inoreader as backend ?

Cheers

json.decoder.JSONDecodeError: Expecting value: line 13 column 5 (char 296)

heres my config, I probably screwed up something here. You should totally check for valid JSON

{
    "defaults": {
        "global_transform": "filter_read",
        "keep_time": 86400,
        "keep_unread": false,
        "rate": 10
    },
    "feeds": [
        {
            "name": "ctftime running ctfs",
            "url": "https://ctftime.org/event/list/running/rss/"
        }
    ],
    "tags": {
      # here
    }
}

daemon log

Traceback (most recent call last):
  File "/usr/bin/canto-daemon", line 7, in <module>
    c = CantoBackend()
  File "/usr/lib/python3.10/site-packages/canto_next/canto_backend.py", line 125, in __init__
    self.get_config()
  File "/usr/lib/python3.10/site-packages/canto_next/canto_backend.py", line 794, in get_config
    config.parse()
  File "/usr/lib/python3.10/site-packages/canto_next/config.py", line 135, in parse
    self.read_config()
  File "/usr/lib/python3.10/site-packages/canto_next/config.py", line 152, in read_config
    self.json = json.load(c)
  File "/usr/lib/python3.10/json/__init__.py", line 293, in load
    return loads(fp.read(),
  File "/usr/lib/python3.10/json/__init__.py", line 346, in loads
    return _default_decoder.decode(s)
  File "/usr/lib/python3.10/json/decoder.py", line 337, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/usr/lib/python3.10/json/decoder.py", line 355, in raw_decode
    raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 13 column 5 (char 296)

Problem with shelf

Sometimes my daemon does not start and I get this error in the log:

12:56:53 : CANTO-DAEMON -> Exiting on exception:
12:56:53 : CANTO-DAEMON -> 
Traceback (most recent call last):
  File "/usr/lib/python3.2/shelve.py", line 111, in __getitem__
    value = self.cache[key]
KeyError: 'http://github.com/blog.atom'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.2/dist-packages/canto_next/canto_backend.py", line 786, in start
    self.init()
  File "/usr/local/lib/python3.2/dist-packages/canto_next/canto_backend.py", line 124, in init
    self.get_config()
  File "/usr/local/lib/python3.2/dist-packages/canto_next/canto_backend.py", line 771, in get_config
    self.conf.parse()
  File "/usr/local/lib/python3.2/dist-packages/canto_next/config.py", line 101, in parse
    self.instantiate()
  File "/usr/local/lib/python3.2/dist-packages/canto_next/config.py", line 299, in instantiate
    feed["url"], feed["rate"], feed["keep"], **kws)
  File "/usr/local/lib/python3.2/dist-packages/canto_next/feed.py", line 106, in __init__
    self.index()
  File "/usr/local/lib/python3.2/dist-packages/canto_next/feed.py", line 231, in index
    self.update_contents = self.shelf[self.URL]
  File "/usr/local/lib/python3.2/dist-packages/canto_next/storage.py", line 44, in __getitem__
    r = self.shelf[name]
  File "/usr/lib/python3.2/shelve.py", line 114, in __getitem__
    value = Unpickler(f).load()
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xdc in position 3648: invalid continuation byte

Traceback (most recent call last):
  File "/usr/local/bin/canto-daemon", line 7, in <module>
    c = CantoBackend()
  File "/usr/local/lib/python3.2/dist-packages/canto_next/canto_backend.py", line 806, in __init__
    self.start()
  File "/usr/local/lib/python3.2/dist-packages/canto_next/canto_backend.py", line 801, in start
    self.exit()
  File "/usr/local/lib/python3.2/dist-packages/canto_next/server.py", line 116, in exit
    for conn, t in self.connections:
AttributeError: 'CantoBackend' object has no attribute 'connections'

Deleting the feeds database file fixes this, but I don't want to keep doing that. This usually happens when I copy the feed database file between computers or the daemon/client crashes, although I haven't narrowed it down between those two. I don't suspect the machine change, sincle shelves are independent of architecture as are pickles as far as I know.

Object of type 'timedelta' is not JSON serializable

Hello, I found a lot of these error messages in my log. I tested it with other feed reader there the feeds seem to work.

Exception in thread Fetch: https://feeds.metaebene.me/forschergeist/opus:
Traceback (most recent call last):
File "/usr/lib/python3.6/threading.py", line 916, in _bootstrap_inner
self.run()
File "/usr/lib/python3.6/site-packages/canto_next/fetch.py", line 141, in run
update_contents = json.loads(json.dumps(update_contents))
File "/usr/lib/python3.6/json/init.py", line 231, in dumps
return _default_encoder.encode(obj)
File "/usr/lib/python3.6/json/encoder.py", line 199, in encode
chunks = self.iterencode(o, _one_shot=True)
File "/usr/lib/python3.6/json/encoder.py", line 257, in iterencode
return _iterencode(o, 0)
File "/usr/lib/python3.6/json/encoder.py", line 180, in default
o.class.name)
TypeError: Object of type 'timedelta' is not JSON serializable

dead?

is this unmaintained? last release is 3 yrs ago, and latest commit to master is 2 yrs ago.

pypi sdist for release 0.9.8 missing

Hi! I package canto-daemon (or canto-next, or canto) for Arch Linux.

Unfortunately the latest release 0.9.8 is missing as an sdist tarball on pypi. It would be very awesome if you could upload it.

btw: all homepage links on the pypi projects for canto/canto-next/canto-curses time out.

Very poor ARM performance

I'm getting severe delays and outright non-responsiveness when running canto-daemon on ARM. This manifests itself as the server eating huge resources due to spawning a large number of threads, and the client communication is slow to the point of unusability.

TypeError: 'NoneType' object is not iterable

This happens once in a while:

Traceback (most recent call last):
  File "/usr/bin/canto-remote", line 7, in <module>
    c = CantoRemote()
  File "/usr/lib/python3.5/site-packages/canto_next/remote.py", line 95, in __init__
    self.handle_args()
  File "/usr/lib/python3.5/site-packages/canto_next/remote.py", line 573, in handle_args
    r = func()
  File "/usr/lib/python3.5/site-packages/canto_next/remote.py", line 549, in cmd_status
    print("%s" % sum([self._numstate(tag, state) for tag in t ]))
TypeError: 'NoneType' object is not iterable

Which causes some issues when using canto-remote status in a conky field. Conky itself doesn't mind, but i3bar crashes with something about incorrect JSON.

Feature request: tt-rss sync plugin

It would be really nice to have a plugin for syncing with tt-rss-compatible sync services and servers.

It seems to be mentioned quite a bit for syncing recently, with the scheduled Google Reader shutdown. It would be wonderful to use it to sync canto with other readers.

It would be awesome to have a plugin for both the server and the client, for client syncing, and for using canto as a sync server too!

More info about syncing stuff here

Data format compatibility with other RSS-readers.

So when I'm at another house with my friends which are using MS Windows, I need to install VirtualBox, Linux and canto-curses in order to just simply read the news, meanwhile a friend of mine simply evil-smiling and using android app to read his rss. So I want to use RSS on the go (with my smartphone/another OS), but it's impossible with canto (because it's only ncurses and linux). Is it possible to implement / or make plugin for compatibility with other RSS readers?

Corrupted feeds file

Got this problem two times now. Dunno how I achieved it.
Trying to start canto-curses and all I get is a empty screen.

Checking the daemon log provides the following:

02:42:43 : SHELF -> Failed to JSON load, old shelf?
02:42:43 : SHELF -> Failed to migrate old shelf: db type could not be determined
Traceback (most recent call last):
File "/usr/lib/python3.5/site-packages/canto_next/storage.py", line 48, in open
self.cache = json.load(fp)
File "/usr/lib/python3.5/json/init.py", line 265, in load
return loads(fp.read(),
File "/usr/lib/python3.5/gzip.py", line 274, in read
return self._buffer.read(size)
File "/usr/lib/python3.5/gzip.py", line 461, in read
if not self._read_gzip_header():
File "/usr/lib/python3.5/gzip.py", line 409, in _read_gzip_header
raise OSError('Not a gzipped file (%r)' % magic)
OSError: Not a gzipped file (b'f\xec')

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/bin/canto-daemon", line 7, in
c = CantoBackend()
File "/usr/lib/python3.5/site-packages/canto_next/canto_backend.py", line 123, in init
self.get_storage()
File "/usr/lib/python3.5/site-packages/canto_next/canto_backend.py", line 796, in get_storage
self.shelf = CantoShelf(self.feed_path)
File "/usr/lib/python3.5/site-packages/canto_next/storage.py", line 27, in init
self.open()
File "/usr/lib/python3.5/site-packages/canto_next/feed.py", line 102, in _fl
return fn(*args)
File "/usr/lib/python3.5/site-packages/canto_next/storage.py", line 53, in open
s = shelve.open(self.filename, "r")
File "/usr/lib/python3.5/shelve.py", line 243, in open
return DbfilenameShelf(filename, flag, protocol, writeback)
File "/usr/lib/python3.5/shelve.py", line 227, in init
Shelf.init(self, dbm.open(filename, flag), protocol, writeback)
File "/usr/lib/python3.5/dbm/init.py", line 88, in open
raise error[0]("db type could not be determined")
dbm.error: db type could not be determined

Removing feeds file makes canto responsive again. But still the question how it could end like this

Mind if I add XDG?

I want to add XDG folder support to Canto. Mind if I submit the patch upstream?

got decoding str is not supported

Hi, I just installed canto and I think this must be very simple to solve but I could not find any reference to it.

This is what I get in my daemon-log:

18:50:22 : CANTO-FETCH -> Empty feed, attempt to update.
18:50:22 : CANTO-FETCH -> Empty feed, attempt to update.
18:50:22 : CANTO-FETCH -> Empty feed, attempt to update.
18:50:22 : CANTO-FETCH -> Empty feed, attempt to update.
18:50:22 : CANTO-FETCH -> ERROR: try to parse http://rss.slashdot.org/slashdot/Slashdot, got decoding str is not supported
18:50:22 : CANTO-FETCH -> ERROR: try to parse http://reddit.com/.rss, got decoding str is not supported
18:50:22 : CANTO-FETCH -> ERROR: try to parse http://codezen.org/canto-ng/feed/, got decoding str is not supported

I added one new URL and has the same problem.

Thank you,

EDIT:

I have traced to problem to feedparser but I could not solve it.

I first thought it was a problem of str vs bytes so I appended .encode() to the URL. Then the error became:

17:24:06 : CANTO-FETCH -> Empty feed, attempt to update.
17:24:06 : CANTO-FETCH -> No content in http://codezen.org/canto-ng/feed/: :2πŸ‘Ž Document is empty

and like this with every possible feed.

Then I tried to use feedparser directly following the examples in http://pythonhosted.org/feedparser/introduction.html but those did not work either:

exemple 1:

import feedparser
d = feedparser.parse('http://feedparser.org/docs/examples/atom10.xml')
Traceback (most recent call last):
File "", line 1, in
File "/usr/lib64/python3.2/site-packages/feedparser-5.1.3-py3.2.egg/feedparser.py", line 3745, in parse
saxparser.parse(source)
File "/usr/lib64/python3.2/site-packages/drv_libxml2.py", line 189, in parse
eltName = (_d(reader.NamespaceUri()),
File "/usr/lib64/python3.2/site-packages/drv_libxml2.py", line 70, in _d
return _decoder(s)[0]
File "/usr/lib64/python3.2/encodings/utf_8.py", line 16, in decode
return codecs.utf_8_decode(input, errors, True)
TypeError: 'str' does not support the buffer interface

example 2:

import feedparser
d = feedparser.parse('http://feedparser.org/docs/examples/atom10.xml'.encode())
d
{'feed': {}, 'encoding': 'utf-8', 'bozo': 1, 'version': '', 'namespaces': {}, 'entries': [], 'bozo_exception': SAXParseException('Do cument is empty\n',)}

See the difference when using bytes and str.

I have canto-next and feedparser from their git repo.

Can anyone else reproduce this problem?

Fetching of read stuff

Next issue, which is a bit cumbersome to track down.

Monday the daemon was last running (Marked feeds like the ones from canto as read (not for the first time...))
Today I had the stuff from the canto feed again as unread in the list.

Following observations: (Example feed from codezen.org/canto-ng (Currently 10 items))

Starting new canto-daemon session, mark all those feeds as read.
Quiting curses gui, and starting again. Those feeds do not appear.

Killing daemon session , starting a new one. No feed items from canto.

Starting daemon session with new IP. Still no feed-items

Same for rebooting between canto-daemon sessions.

But it seems if some days go by I get this stuff again.
What could be left as culprits? time_keep running out in case of "check if it's gone from the feed but still there"?
Or some other date change?

Ubuntu Trusty Package install does not work

W: Failed to fetch http://codezen.org/debian/dists/trusty/Release  Unable to find expected entry 'main/binary-i386/Packages' in Release file (Wrong sources.list entry or malformed file)

canto-remote kill failed

canto-remote kill failed with an error about an another canto-daemon running.

The daemon was started by the curses interface, the computer had no internet access.
Dunno what about others scenarios (internet connection, etc).
Need to test that, but currently not near my machines with an working internet-connection.

So, hopefully it's easy to reproduce and not one strange occurance.

No module named 'canto_next'

Hello,

I get this error message on stderr after updating my arch linux.

$ canto-daemon -D /home/$HOME/.config/canto
Traceback (most recent call last):
  File "/bin/canto-daemon", line 3, in <module>
    from canto_next.canto_backend import CantoBackend
ModuleNotFoundError: No module named 'canto_next'

There were a lot of python updates.

pacman.log:
[...]
[2018-08-07 09:45] [ALPM] upgraded python (3.6.6-1 -> 3.7.0-3)
[2018-08-07 09:45] [ALPM] upgraded python-msgpack (0.5.6-1 -> 0.5.6-2)
[2018-08-07 09:45] [ALPM] upgraded python-appdirs (1.4.3-1 -> 1.4.3-2)
[2018-08-07 09:45] [ALPM] upgraded python-pyparsing (2.2.0-1 -> 2.2.0-2)
[2018-08-07 09:45] [ALPM] upgraded python-six (1.11.0-1 -> 1.11.0-3)
[2018-08-07 09:45] [ALPM] upgraded python-packaging (17.1-1 -> 17.1-2)
[2018-08-07 09:45] [ALPM] upgraded python-setuptools (1:39.2.0-2 -> 1:39.2.0-3)
[2018-08-07 09:45] [ALPM] upgraded python-cairo (1.17.0-1 -> 1.17.0-2)
[2018-08-07 09:45] [ALPM] upgraded python-dbus-common (1.2.8-1 -> 1.2.8-2)
[2018-08-07 09:45] [ALPM] upgraded python-dbus (1.2.8-1 -> 1.2.8-2)
[2018-08-07 09:45] [ALPM] upgraded python-gobject (3.28.3-1 -> 3.28.3-2)
[2018-08-07 09:45] [ALPM] upgraded python-entrypoints (0.2.3-1 -> 0.2.3-2)
[2018-08-07 09:45] [ALPM] upgraded python-ply (3.11-1 -> 3.11-2)
[2018-08-07 09:45] [ALPM] upgraded python-pycparser (2.18-1 -> 2.18-2)
[2018-08-07 09:45] [ALPM] upgraded python-cffi (1.11.5-1 -> 1.11.5-2)
[2018-08-07 09:45] [ALPM] upgraded python-idna (2.7-2 -> 2.7-3)
[2018-08-07 09:45] [ALPM] upgraded python-asn1crypto (0.24.0-1 -> 0.24.0-2)
[2018-08-07 09:45] [ALPM] upgraded python-cryptography (2.2.2-1 -> 2.3-1)
[2018-08-07 09:45] [ALPM] upgraded python-jeepney (0.3.1-1 -> 0.3.1-2)
[2018-08-07 09:45] [ALPM] upgraded python-secretstorage (3.0.1-1 -> 3.0.1-2)
[2018-08-07 09:45] [ALPM] upgraded python-keyring (13.2.1-1 -> 13.2.1-2)
[2018-08-07 09:45] [ALPM] upgraded python-nbxmpp (0.6.6-1 -> 0.6.6-2)
[2018-08-07 09:45] [ALPM] upgraded python-pyasn1 (0.4.3-1 -> 0.4.3-2)
[2018-08-07 09:45] [ALPM] upgraded python-pyopenssl (18.0.0-1 -> 18.0.0-2)
[2018-08-07 09:45] [ALPM] upgraded python-pyenchant (2.0.0-2 -> 2.0.0-3)
[2018-08-07 09:45] [ALPM] upgraded python-chardet (3.0.4-1 -> 3.0.4-2)
[2018-08-07 09:45] [ALPM] upgraded python-attrs (18.1.0-1 -> 18.1.0-2)
[2018-08-07 09:45] [ALPM] upgraded python-protobuf (3.5.2-1 -> 3.6.0.1-1)
[2018-08-07 09:45] [ALPM] upgraded python-axolotl-curve25519 (0.4.1.2-1 -> 0.4.1.2-2)
[2018-08-07 09:45] [ALPM] upgraded python-axolotl (0.1.42-1 -> 0.1.42-2)
[2018-08-07 09:45] [ALPM] upgraded python-colorama (0.3.9-1 -> 0.3.9-2)
[2018-08-07 09:45] [ALPM] upgraded python-crypto (2.6.1-5 -> 2.6.1-6)
[2018-08-07 09:45] [ALPM] upgraded python-dateutil (2.7.3-1 -> 2.7.3-2)
[2018-08-07 09:45] [ALPM] upgraded python-eyed3 (1:0.8-3 -> 1:0.8-4)
[2018-08-07 09:45] [ALPM] upgraded python-sgmllib (5.2.1-2 -> 5.2.1-3)
[2018-08-07 09:45] [ALPM] upgraded python-feedparser (5.2.1-2 -> 5.2.1-3)
[2018-08-07 09:45] [ALPM] upgraded python-pillow (5.2.0-1 -> 5.2.0-2)
[2018-08-07 09:45] [ALPM] upgraded python-psutil (5.4.6-1 -> 5.4.6-2)
[2018-08-07 09:45] [ALPM] upgraded python-qrcode (6.0-1 -> 6.0-2)
[2018-08-07 09:45] [ALPM] upgraded python-regex (2018.07.11-1 -> 2018.07.11-2)
[2018-08-07 09:45] [ALPM] upgraded python-urllib3 (1.23-1 -> 1.23-2)
[2018-08-07 09:45] [ALPM] upgraded python-requests (2.19.1-1 -> 2.19.1-2)
[2018-08-07 09:45] [ALPM] upgraded python-tabulate (0.8.2-1 -> 0.8.2-2)
[2018-08-07 09:45] [ALPM] upgraded python-unidecode (1.0.22-1 -> 1.0.22-2)
[2018-08-07 09:45] [ALPM] upgraded python-urwid (2.0.1-1 -> 2.0.1-2)
[2018-08-07 09:45] [ALPM] upgraded python2-cairo (1.17.0-1 -> 1.17.0-2)
[2018-08-07 09:45] [ALPM] upgraded python2-dbus (1.2.8-1 -> 1.2.8-2)
[2018-08-07 09:45] [ALPM] upgraded python2-gobject (3.28.3-1 -> 3.28.3-2)
[2018-08-07 09:45] [ALPM] upgraded python2-gobject2 (2.28.7-1 -> 2.28.7-2)
[2018-08-07 09:45] [ALPM] upgraded python2-numpy (1.14.5-1 -> 1.15.0-2)
[2018-08-07 09:45] [ALPM] upgraded python2-olefile (0.45.1-1 -> 0.45.1-2)
[2018-08-07 09:45] [ALPM] upgraded python2-pillow (5.2.0-1 -> 5.2.0-2)
[2018-08-07 09:45] [ALPM] upgraded python2-psutil (5.4.6-1 -> 5.4.6-2)
[2018-08-07 09:45] [ALPM] upgraded python2-simplejson (3.16.0-1 -> 3.16.0-2)
[2018-08-07 09:45] [ALPM] upgraded python2-six (1.11.0-1 -> 1.11.0-3)
[2018-08-07 09:46] [ALPM] upgraded python2-urwid (2.0.1-1 -> 2.0.1-2)
[...]

user password for Jira RSS feed

Configure user and password for url (Jira2) do not work for me. ":2:942: mismatched tag". User and password as args in url (Jira1) works fine

https://confluence.atlassian.com/display/JIRA/Receiving+Search+Results+as+an+RSS+Feed

{
    "CantoCurses": {
        "browser": {
            "path": "lynx"
        }
    },
    "defaults": {
        "global_transform": "None",
        "keep_time": 86400,
        "keep_unread": false,
        "rate": 10
    },
    "feeds": [
        {
            "name": "Jira1",
            "url": "https://jira.3s.intern/activity?maxResults=10&streams=key+IS+UNIX&providers=issues+thirdparty&os_authType=basic&os_username=benny&os_password=secret"
        },
        {
            "name": "Jira2",
            "password": "secret",
            "url": "https://jira.3s.intern/activity?maxResults=10&streams=key+IS+UNIX&providers=issues+thirdparty&os_authType=basic",
            "user": "benny"
        }
    ]
}

16:01:56 : CANTO-DAEMON -> canto-daemon 0.9.0
16:01:56 : CANTO-DAEMON -> verbosity = 1
16:01:56 : CANTO-DAEMON -> conf_dir = /home/kjellgrb/.canto-ng/
16:01:56 : PLUGINS -> [plugin] pushbullet - DISABLED
16:01:56 : SHELF -> Shelf opened: <shelve.DbfilenameShelf object at 0x7f68640307f0>
16:01:56 : CONFIG -> Read /home/kjellgrb/.canto-ng//conf
16:01:56 : CONFIG -> Parsed into: {'CantoCurses': {'browser': {'path': 'lynx'}}, 'feeds': [{'url': 'https://jira.3s.intern/activity?maxResults=10&streams=key+IS+UNIX&providers=issues+thirdparty&os_authType=basic&os_username=benny&os_password=secret', 'name': 'Jira1'}, {'url': 'https://jira.3s.intern/activity?maxResults=10&streams=key+IS+UNIX&providers=issues+thirdparty&os_authType=basic', 'password': 'secret', 'user': 'benny', 'name': 'Jira2'}], 'defaults': {'keep_time': 86400, 'keep_unread': False, 'global_transform': 'None', 'rate': 10}}
16:01:56 : CONFIG -> Validated: {'CantoCurses': {'browser': {'path': 'lynx'}}, 'feeds': [{'url': 'https://jira.3s.intern/activity?maxResults=10&streams=key+IS+UNIX&providers=issues+thirdparty&os_authType=basic&os_username=benny&os_password=secret', 'name': 'Jira1'}, {'url': 'https://jira.3s.intern/activity?maxResults=10&streams=key+IS+UNIX&providers=issues+thirdparty&os_authType=basic', 'password': 'secret', 'user': 'benny', 'name': 'Jira2'}], 'defaults': {'keep_time': 86400, 'keep_unread': False, 'rate': 10, 'global_transform': 'None'}}
16:01:56 : CANTO-DAEMON -> Listening on unix socket: /home/kjellgrb/.canto-ng//.canto_socket
16:01:56 : SERVER -> Spawned connection monitor thread.
16:01:56 : CANTO-FETCH -> Started thread for feed https://jira.3s.intern/activity?maxResults=10&streams=key+IS+UNIX&providers=issues+thirdparty&os_authType=basic&os_username=benny&os_password=secret
16:01:56 : FEED -> Fetched previous content for https://jira.3s.intern/activity?maxResults=10&streams=key+IS+UNIX&providers=issues+thirdparty&os_authType=basic&os_username=benny&os_password=secret.
16:01:56 : FEED -> Item not over keep_time (86400): urn:uuid:51ad59f9-f9c0-3ea4-9c70-517d8d45ec60
16:01:56 : FEED -> Item not over keep_time (86400): urn:uuid:d525cf67-d314-31ab-b1a1-f072cb620920
16:01:56 : FEED -> Item not over keep_time (86400): urn:uuid:e29efeeb-d79d-3532-ad08-3362eca2d4bb
16:01:56 : FEED -> Item not over keep_time (86400): urn:uuid:f5099065-7a90-3478-8f05-59e8996dff6a
16:01:56 : FEED -> Item not over keep_time (86400): urn:uuid:a56ad22a-03cc-3df8-974b-3c43acc68892
16:01:56 : FEED -> Item not over keep_time (86400): urn:uuid:f8db34c4-bf17-37b3-8077-b38ec648a2f4
16:01:56 : FEED -> Item not over keep_time (86400): urn:uuid:c6656fd5-c8e1-35cb-a08b-b903ab041a6d
16:01:56 : FEED -> Item not over keep_time (86400): urn:uuid:a2a2d9c2-f3e1-3a44-b682-01da68c6973c
16:01:56 : FEED -> Item not over keep_time (86400): urn:uuid:3b65cd43-53fd-3fe3-80a2-ccf21eee7ba9
16:01:56 : FEED -> Item not over keep_time (86400): urn:uuid:c6a472c6-2e9d-3ac6-bfe5-23fd2a7570e7
16:01:56 : CANTO-FETCH -> Started thread for feed https://jira.3s.intern/activity?maxResults=10&streams=key+IS+UNIX&providers=issues+thirdparty&os_authType=basic
16:01:56 : CANTO-DAEMON -> Beginning to serve...
16:01:56 : FEED -> Fetched previous content for https://jira.3s.intern/activity?maxResults=10&streams=key+IS+UNIX&providers=issues+thirdparty&os_authType=basic.
16:01:56 : CANTO-FETCH -> Started thread for feed https://jira.3s.intern/activity?maxResults=10&streams=key+IS+UNIX&providers=issues+thirdparty&os_authType=basic&os_username=benny&os_password=secret
16:01:57 : CANTO-FETCH -> Started thread for feed https://jira.3s.intern/activity?maxResults=10&streams=key+IS+UNIX&providers=issues+thirdparty&os_authType=basic
16:01:57 : CANTO-FETCH -> No content in https://jira.3s.intern/activity?maxResults=10&streams=key+IS+UNIX&providers=issues+thirdparty&os_authType=basic: <unknown>:2:942: mismatched tag
16:01:59 : CANTO-FETCH -> Parsed https://jira.3s.intern/activity?maxResults=10&streams=key+IS+UNIX&providers=issues+thirdparty&os_authType=basic&os_username=benny&os_password=secret
16:01:59 : CANTO-FETCH -> Plugins complete.
16:01:59 : FEED -> Fetched previous content for https://jira.3s.intern/activity?maxResults=10&streams=key+IS+UNIX&providers=issues+thirdparty&os_authType=basic&os_username=benny&os_password=secret.
16:02:00 : SHELF -> Unloaded.
16:02:00 : SHELF -> Synced.
16:02:00 : SHELF -> Successfully trimmed db
16:02:00 : SHELF -> Shelf opened: <shelve.DbfilenameShelf object at 0x7f686213b048>

Feature request: action upon new rss item (notification plugin)

Hello! Can you help me with a plugin which will do smth (create a file, for example) when new rss item is added?

Firstly, I'm posting it here and not in the canto-curses section because I'm intended to write a plugin which will act when new rss item is pulled. But my current implementation involves canto-curses side. So, currently I’m using this way:

I’ve added one more line:

os.sytem('touch /tmp/rssitems')

right after the line

call_hook('items_added', [ self, added ] )

into canto_curses/tag.py file. But it’s not working properly. The file created even when canto-curses filter removes already read news.

Please help me at least to find proper spot in your code where I should add os.system('touch filename') line to work only when new rss item is added. Although, plugin-way will be more proper in this situation.

P.S. It is me who needs file to be created for notification, other people could always write

os.system("notify-send 'new rss ololo'")

request: socks/http proxy

Hello,

first of all canto is the feed reader I ever dreamed of! The usability is one kind of a flow. Thanks for that!

One thing I miss is that canto do not have the ability to communicate through a (socks) proxy. It would be cool to have this ability.
But there is some downside. I experienced that not all feeds work with the proxy settings of other feed readers e.g. the feed of the wiki in my LAN so it should be possible to make an exception for single feeds.

I will become a patron hope this increases the motivation for this feature a little bit ;-)

Edit: Maybe python considers environment variables like here.

Installation instructions for Debian

The website lists this command to add the signature key:

curl http://codezen.org/static/canto-pub.gpg | sudo apt-key add –

But I think it should be:

curl http://codezen.org/static/canto-pub.gpg | sudo apt-key add -

The website uses an n-dash, but a terminal only understands the command with a hyphen on the end.

I also had to add the architecture to the source line like this: deb [arch=amd64] http://codezen.org/debian xenial main, or it would complain about missing i386 sources.

Keep a limited number of items in each feed.

As in the title, I'd like to have something like default_keep in 0.7, to keep a limited number of items.

I've seen the keep (and rate, but that's not related to this issue) attributes in CantoFeed, but I don't see right away where they are used. Setting them does not seem to make a difference. Is this not implemented yet?

Also, are read items ever removed? Is there something akin to never_discard from the previous version?

Cannot change update interval

I cannot change update interval in canto-curses or canto-remote. Canto manual says that update interval can be change by
:set update.auto.enabled False
:set update.auto.interval 36000

However, canto-daemon ignores these settings. This is visible from network capture dump - daemon very often connects to rss feeds even after settings are changed and daemon is restarted. I suspect that default update value is too low.

By the way, the config/setting part of canto is completely broken - there is now way to look at settings and change them. For example, after setting update changes via :set in canto-curses, these settings are not visible from canto-remote config. Also, the remote config command does not allow to inspect settings. Neither does :help command in curses allows to inspect available settings. Currently, users have no idea what settings are and how they can be changed.

I see only 1 solution to the update problem now - just shut down the daemon after update.

Question: canto-daemon/next vs no network

I've got a small question.

Following case:
The daemon is started and fetching via a cron-job. But now and then I don't have a connection to the internet.
If that's the case, canto-daemon will start at the requested time and tries to fetch. This will of course fail. I would assume the daemon would try again after the cron job kicks in or I would manually force the update or whatever update (in the config) time is given.
But as it failed the daemon tries now every minute feeds to get the content which spikes the cpu to 100% until I kill it (And need to do everytime after the cronjob comes into action)

So, my question is, can/should this behaviour changed within canto or do I need to find a solution on my side? Or am I overseeing something?

Dependency conflict for arch linux AUR archive.

When you run yaourt -S "canto-next-git canto-curses-git" you get dependency conflict because canto-curses-git installs canto-daemon as depencency, and then you try to install canto-next-git which is conflicting with canto-daemon and throws "canto-next-git and canto-daemon are in conflics". I solved this problem by installing first canto-next-git and only then canto-curses-git. But is there any solution to install these both using oneline-command?

Proxy / PAC

I am working in an environment that is protected with a pac-file based proxy-setting.
Firefox asks me to provide credentials, when I load a new page.
Liferea doesn't support it altogether. That's why I tried canto.
Is it possible to add the link to the pac file somewhere?
Or is this unsupported either?

rgds,
Markus

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.