Unattended OPML export

Support requests, bug reports, etc. go here. Dedicated servers / VDS hosting only
JanW
Bear Rating Trainee
Bear Rating Trainee
Posts: 3
Joined: 04 Aug 2013, 11:24

Unattended OPML export

Postby JanW » 04 Aug 2013, 11:28

Hello,

Is there a way to export my OPML file unattended? I don't backup my TT-RSS because I export my OPML file once a week by hand, but I would like to automate that process. I would like a solution where I can just curl or wget the file from another location, maybe with a secret token in the URL.

Is there such a feature, an url to call, or something alike, a cron job on the tt-rss server?

User avatar
limako
Bear Rating Trainee
Bear Rating Trainee
Posts: 5
Joined: 09 Nov 2011, 18:31
Contact:

Re: Unattended OPML export

Postby limako » 04 Aug 2013, 16:30

It would probably be easy to write one. Here's one way to approach it: look to see what URL you're at when you download an OPML file, make a copy of the php file that is responsible. Edit the file and strip out everything except for the bit that calls the code that generates the OPML file -- you might need to hack in some stuff that figures out that you're logged in and who you are, so it knows how to call the opml-generating stuff for you. Done. Then just call that page using wget from cron. And it's easy to test: just try to visit the page with a web-browser until all it does is return your opml file.

JanW
Bear Rating Trainee
Bear Rating Trainee
Posts: 3
Joined: 04 Aug 2013, 11:24

Re: Unattended OPML export

Postby JanW » 04 Aug 2013, 19:39

The page would be:

Code: Select all

backend.php?op=opml&method=export&filename=TinyTinyRSS.opml&settings=1


So I'm going to figure out how to get that with curl or so. Thanks for the tip!

User avatar
fox
^ me reading your posts ^
Posts: 6318
Joined: 27 Aug 2005, 22:53
Location: Saint-Petersburg, Russia
Contact:

Re: Unattended OPML export

Postby fox » 04 Aug 2013, 20:02

Just in case, OPML publish url has been a feature for a few years now.

Image

JanW
Bear Rating Trainee
Bear Rating Trainee
Posts: 3
Joined: 04 Aug 2013, 11:24

Re: Unattended OPML export

Postby JanW » 07 Aug 2013, 17:33

fox wrote:Just in case, OPML publish url has been a feature for a few years now.

Image



That also works! Thanks!

kurahan
Bear Rating Trainee
Bear Rating Trainee
Posts: 22
Joined: 03 Feb 2014, 09:48

Re: Unattended OPML export

Postby kurahan » 01 Jun 2014, 22:19

JanW wrote:
fox wrote:Just in case, OPML publish url has been a feature for a few years now.

Image



That also works! Thanks!


Hi

How did you make it work? I am using curl and wget none of them is able to download the opml. The keep giving me user not found. But I can download the opml from the browser (using the same url) fine

User avatar
fox
^ me reading your posts ^
Posts: 6318
Joined: 27 Aug 2005, 22:53
Location: Saint-Petersburg, Russia
Contact:

Re: Unattended OPML export

Postby fox » 01 Jun 2014, 22:33

I dunno, just tried it and it works fine.

kurahan
Bear Rating Trainee
Bear Rating Trainee
Posts: 22
Joined: 03 Feb 2014, 09:48

Re: Unattended OPML export

Postby kurahan » 01 Jun 2014, 22:52

fox

I tried both https and non-https links, I cannot seem to make it work. Do you mind sharing your cli?

thanks

mrc0mmand
Bear Rating Trainee
Bear Rating Trainee
Posts: 16
Joined: 06 Feb 2014, 21:49

Re: Unattended OPML export

Postby mrc0mmand » 01 Jun 2014, 22:56

kurahan wrote:fox

I tried both https and non-https links, I cannot seem to make it work. Do you mind sharing your cli?

thanks


Do you use quotation marks for URL in wget/curl? curl "http://yourttrssinstance.tld/opml.php?op=publish&key=somerandomkey" should help.

kurahan
Bear Rating Trainee
Bear Rating Trainee
Posts: 22
Joined: 03 Feb 2014, 09:48

Re: Unattended OPML export

Postby kurahan » 01 Jun 2014, 23:03

mrc0mmand wrote:
kurahan wrote:fox

I tried both https and non-https links, I cannot seem to make it work. Do you mind sharing your cli?

thanks


Do you use quotation marks for URL in wget/curl? curl "http://yourttrssinstance.tld/opml.php?op=publish&key=somerandomkey" should help.



Aha, that was it. Thanks mrc0mmand, you sure know your trade :)


Return to “Support”

Who is online

Users browsing this forum: No registered users and 7 guests