I use calibre ( http://calibre-ebook.com/ ) , a simple recipe and crontab to create a daily 'reading list' ebook for my kindle3.
The recipe uses the TinyTinyRSS published articles RSS feed which then gets emailed to the device.
This solution works well except that the calibre recipe blindly picks up the last two days worth of articles.
I would like to be able to un-publish the articles in TinyTinyRSS using the API so that they won't get picked up again once processed.
Hoping that makes sense , any help would be appreciated.
Thanks
[Fixed] Bash Script to un-publish articles
- markwaters
- Bear Rating Trainee
- Posts: 32
- Joined: 20 May 2008, 13:10
- Location: France
- Contact:
[Fixed] Bash Script to un-publish articles
Last edited by markwaters on 03 Jun 2012, 19:35, edited 1 time in total.
Re: [Help] Bash Script to un-publish articles
Are you looking for a shell script to un-publish one specific article? Or "all published articles"?
I played with the api a little, and it should be simple enough to un-publish a specific article with the "updateArticle" method.
The later might be more difficult (I don't see that "all published articles" is available though the api.)
You mentioned "shell script", so are you really looking for a straight bourne shell script, or will a php or perl script do?
I played with the api a little, and it should be simple enough to un-publish a specific article with the "updateArticle" method.
The later might be more difficult (I don't see that "all published articles" is available though the api.)
You mentioned "shell script", so are you really looking for a straight bourne shell script, or will a php or perl script do?
Re: [Help] Bash Script to un-publish articles
I've got a working Perl script that will unpublish articles through the API.
Nothing extra needed in the API since the "getHeadlines" method can return the published entries.
I just want to do a little more testing before I post it. I'm having trouble marking articles as "published".
Nothing extra needed in the API since the "getHeadlines" method can return the published entries.
I just want to do a little more testing before I post it. I'm having trouble marking articles as "published".
- markwaters
- Bear Rating Trainee
- Posts: 32
- Joined: 20 May 2008, 13:10
- Location: France
- Contact:
Re: [Help] Bash Script to un-publish articles
I was thinking of a bash script as thats what I am most familiar with but would be grateful for anything , perhaps this will give me the encouragement to learn a little Perl.
I only need it to unpublish all articles as I would like them all cleared down each daily run of calibre.
For history , sharing and searching I post all the links to a status.net microblog.
When you want another tester just say.
Thanks for sorting this out.
I only need it to unpublish all articles as I would like them all cleared down each daily run of calibre.
For history , sharing and searching I post all the links to a status.net microblog.
When you want another tester just say.
Thanks for sorting this out.
- fox
- ^ me reading your posts ^
- Posts: 6318
- Joined: 27 Aug 2005, 22:53
- Location: Saint-Petersburg, Russia
- Contact:
Re: [Help] Bash Script to un-publish articles
gmargo wrote:I just want to do a little more testing before I post it. I'm having trouble marking articles as "published".
This should be straightforward.
https://github.com/gothfox/Tiny-Tiny-RS ... .java#L218
Re: [Help] Bash Script to un-publish articles
Thanks. I had the unpublishing down, thanks to your wiki and the corresponding source code. My real problem was in generating test cases. From the web interface, the 'S' key toggles the 'published' flag. But there is no visual feedback (at least on the combined-display-mode) so after hitting 'S' several times, the published list never seemed quite right, at least until a feed reset. Hence confusion.
Anyway, attached here is my first version of a Perl script to unpublish articles via the API.
I'd be honored if you'd consider including it in the utils/ directory, as an example of API access from Perl.
Anyway, attached here is my first version of a Perl script to unpublish articles via the API.
I'd be honored if you'd consider including it in the utils/ directory, as an example of API access from Perl.
- Attachments
-
- unmark_published.pl.gz
- Unmark published files with Perl through API. Demos API.
- (2.24 KiB) Downloaded 138 times
- fox
- ^ me reading your posts ^
- Posts: 6318
- Joined: 27 Aug 2005, 22:53
- Location: Saint-Petersburg, Russia
- Contact:
Re: [Help] Bash Script to un-publish articles
I did something which was long overdue and created a "contrib" repo at github for all the submitted third party stuff, including plugins. Added your file in there too, thanks!
https://github.com/gothfox/tt-rss-contrib
https://github.com/gothfox/tt-rss-contrib
- markwaters
- Bear Rating Trainee
- Posts: 32
- Joined: 20 May 2008, 13:10
- Location: France
- Contact:
Re: [Help] Bash Script to un-publish articles
Thanks guys , this is working a treat.
Who is online
Users browsing this forum: No registered users and 4 guests