Page 1 of 1

Unattended OPML export

Posted: 04 Aug 2013, 11:28
by JanW
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?

Re: Unattended OPML export

Posted: 04 Aug 2013, 16:30
by limako
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.

Re: Unattended OPML export

Posted: 04 Aug 2013, 19:39
by JanW
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!

Re: Unattended OPML export

Posted: 04 Aug 2013, 20:02
by fox
Just in case, OPML publish url has been a feature for a few years now.

Image

Re: Unattended OPML export

Posted: 07 Aug 2013, 17:33
by JanW
fox wrote:Just in case, OPML publish url has been a feature for a few years now.

Image



That also works! Thanks!

Re: Unattended OPML export

Posted: 01 Jun 2014, 22:19
by kurahan
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

Re: Unattended OPML export

Posted: 01 Jun 2014, 22:33
by fox
I dunno, just tried it and it works fine.

Re: Unattended OPML export

Posted: 01 Jun 2014, 22:52
by kurahan
fox

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

thanks

Re: Unattended OPML export

Posted: 01 Jun 2014, 22:56
by mrc0mmand
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.

Re: Unattended OPML export

Posted: 01 Jun 2014, 23:03
by kurahan
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 :)