nathans / spigot Goto Github PK
View Code? Open in Web Editor NEWSpigot controls the flow of aggregated syndication feeds to pump.io accounts.
License: GNU General Public License v3.0
Spigot controls the flow of aggregated syndication feeds to pump.io accounts.
License: GNU General Public License v3.0
I'm moving to a newer machine. How could i migrate my spigot instance without having to republish all the articles that have been published.
I tried to rsync my spigot folder, then made a pip install.
Enable cron but when i test it with spygot.py, i get:
Traceback (most recent call last): File "/usr/local/bin/spigot.py", line 537, in spigot_post.post_items() File "/usr/local/bin/spigot.py", line 461, in post_items verifier_callback=simple_verifier) File "/usr/local/lib/python2.7/dist-packages/pypump/pypump.py", line 131, in __init__ self.oauth_request() File "/usr/local/lib/python2.7/dist-packages/pypump/pypump.py", line 384, in oauth_request result = self.verifier_callback(self.construct_oauth_url()) File "/usr/local/lib/python2.7/dist-packages/pypump/pypump.py", line 391, in construct_oauth_url if response.is_redirect: AttributeError: 'Response' object has no attribute 'is_redirect'
Any suggestion on the migration process?
Thanks in advance.
right now, spigot throws the DB and config file in ./
. that seems wrong. that should be, in my opinion, $XDG_CONFIG_HOME
(.config/spigot.json
) and $XDG_CACHE_HOME
(~/.cache/spigot.db
).
see also:
https://live.gnome.org/GnomeGoals/XDGConfigFolders
http://standards.freedesktop.org/basedir-spec/latest/
so i tried to configure spigot here, and failed, probably in part because of #3, but i am not sure what is happening.
here's what spigot extracted from my blog: https://identi.ca/anarcat/note/altAWMO8S5-o6wLPApu6Zw
if you look at the blog list, this post is from 8 months ago! https://anarc.at/blog/
why didn't it publish later articles? why this one? and why only this one? i was hoping it would play "catchup" with the feed at least...
trying to run the feed again, it did something weird: it posted 3 more posts:
https://identi.ca/anarcat/note/kLMcdy9AR3ehanfVG4fzNQ
https://identi.ca/anarcat/note/kSCKJhGkS16tlFd5qPoeSw
https://identi.ca/anarcat/note/QFwbEfODSxWdtHvkX42cqg
https://identi.ca/anarcat/note/Dm6rLmfKQAStxsNHUuYXNQ
https://identi.ca/anarcat/note/BxvO7aqNTr6W3W7QIX2m_w
notice that one post showed up twice. none of those is the most recent post.
what's going on here?
Hi!
I'm trying to get spigot working with python 2.7 (*buntu 16.04 derivate), but seems that it won't take off.
Pypump won't ask/generate the authentication credentials from the pump site.
I've seen that python 2.6 is a requirement, not sure if it's stone hard requirement, i believe it isn't since trusty already has python 2.7, but so far it seems so, which got me thinking.
Maybe we can build a docker image specific to spigot, then maintain that, this could help spigot deployment on new platforms.
I'll look this up, but if you have any ideas i would welcome them.
Cheers!
For example in this feed "FSFEs role in the Bacula project" does not have a link: https://fsfe.org/news/news.en.rss. For a unique identified all RSS items should have the "guid" tag. This could be used instead of the link for a unique identifier (or when the link is missing).
Traceback (most recent call last):
File "/home/mats/virtualenv/spigot/bin/spigot.py", line 535, in <module>
spigot_feed.poll_feeds()
File "/home/mats/virtualenv/spigot/bin/spigot.py", line 365, in poll_feeds
self.scan_feed(url)
File "/home/mats/virtualenv/spigot/bin/spigot.py", line 385, in scan_feed
link = p.entries[i].link
File "/home/mats/virtualenv/spigot/local/lib/python2.7/site-packages/feedparser.py", line 400, in __getattr__
raise AttributeError, "object has no attribute '%s'" % key
AttributeError: object has no attribute 'link'
the spigot documentation seems to indicate the software will somehow auto-configure itself with reasonable defaults, or at least ask me for stuff I can understand. while it does a great jobs at significant parts of that (e.g. oauth), other parts, for me, are totally mysterious and basically unusable.
here's a confused myself trying the configuration at first:
[1009]anarcat@angela:~$ spigot.py
No configuration file now, running welcome wizard.
2016-01-26 11:26:44,823 WARNING: Could not load configuration file
Adding feed...
Feed URL: https://anarc.at/blog/index.rss
Account Webfinger ID (e.g. [email protected]): [email protected]
anarcat
Minimum time between posts (minutes): 30
Spigot formats your outgoing posts based on fields in the feed
being scanned. Specify the field name surrounded by the '%'
character to have it replaced with the corresponding value for
the item (e.g. %title% or %link%).
The following fields are present in an example item in
this feed:
updated
published_parsed
links
title
tags
summary_detail
comments
summary
guidislink
title_detail
link
published
id
updated_parsed
Next you will be prompted for the message format and
optional title format for outgoing posts.
Message format: summary
Title format (optional): title
now, those are, I believe, fairly correct answers. they just so happen to be also proper defaults, in my opinion. i have no idea what the "minimum time between posts" does or why i need to configure that. there should be a default, like 30 or 60 minutes than can be overriden when the configuration wizard is force ran.
the same goes for all those fields: why do i have to figure out what all those fields do? also, notice i did a mistake of forgetting the % signs in the fields? well, that's because the list of fields doesn't have them... there's an RSS standard: it assigns clear semantics to each links and while I appreciate I can customize that, it shouldn't forced on me and reasonable defaults should be used from the start.
take for example https://github.com/chaica/feed2tweet/: it just hardcodes which fields it uses. and i'm fine with that. while I can understand some users may want to customize that, i shouldn't be forced to customize this (and try to learn the RSS standard details along the way) to configure this...
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.