A step-by-step guide to import starred articles from feedly

Howtos, instructions and links to related software. Do not ask questions here.
w00dst0ck
Bear Rating Trainee
Bear Rating Trainee
Posts: 2
Joined: 24 Jun 2014, 15:48

A step-by-step guide to import starred articles from feedly

Postby w00dst0ck » 24 Jun 2014, 16:35

I will descibe the steps to migrate your starred articles from feedly to Tiny Tiny RSS.

1. Create your own feedly developer access token

You need a feedly developer access token to access the API.
It can be requested here at https://feedly.com/v3/auth/dev


2. Export your starred items as json file starred.json with your generated access token and user id

Open a shell and use curl to access the feedly api

shell> curl -X GET -H "Authorization: OAuth ACCESS-TOKEN" -H "Content-Type: application/json" "http://cloud.feedly.com/v3/streams/contents?streamId=user/USERID/tag/global.saved&count=10000" > starred.json


3. Edit the TTRSS plugin googlereaderimport

Create a backup of the file plugins/googlereaderimport/init.php

Open the file plugins/googlereaderimport/init.php in an editor of your choice and change the following lines:

Line 116:

Code: Select all

$updated = date('Y-m-d h:i:s', $item['updated']);
with

Code: Select all

// $updated = date('Y-m-d h:i:s', $item['updated']);
$updated = date('Y-m-d h:i:s', mb_substr($item['published'], 0, 10));


Line 117:

Code: Select all

$last_marked = date('Y-m-d h:i:s', mb_substr($item['crawlTimeMsec'], 0, 10));
with

Code: Select all

// $last_marked = date('Y-m-d h:i:s', mb_substr($item['crawlTimeMsec'], 0, 10));
$last_marked = date('Y-m-d h:i:s', mb_substr($item['crawled'], 0, 10));


Line 142:

Code: Select all

if (is_array($item['categories'])) {
        foreach ($item['categories'] as $cat) {
with

Code: Select all

// if (is_array($item['categories'])) {
//        foreach ($item['categories'] as $cat) {
if (is_array($item['keywords'])) {
        foreach ($item['keywords'] as $cat) {



4. Enable the plugin googlereaderimport

* Go to [Preferences / Plugins]
* Enable the plugin googlereaderimport
* Reload Tiny Tiny RSS


5. Import starred.json file

* Go to [Preferences / Feeds / Import starred or shared items from Google Reader]
* Select your File starred.jjson
* Import your items

DONE!!! *** It works for me but you will use it on your own risk! ***
If you would test it with just one starred item, you can exchange the count=10000 with count=1 at the export process.

Have fun - w00dst0ck :wink:

kidwell220
Bear Rating Trainee
Bear Rating Trainee
Posts: 1
Joined: 30 Dec 2015, 23:31

Re: A step-by-step guide to import starred articles from feedly

Postby kidwell220 » 30 Dec 2015, 23:37

Thanks for a terrific how-to. Worked like a charm for me. It is worth noting that feedly API caps stream output at 1000 items, so if you have more than 1000 items starred (I did), you'll need to run the command a second time with the additional "continuation" option specified (see here: http://developer.feedly.com/v3/streams/ ... f-a-stream). This is much easier than the feedly docs make it sound, just search your first export (as above) in starred.json for "continuation" (include quote marks in the search). This will lead you to a string like the following: "13f42cdaed6:1e4:45421b83".

My command was

curl -X GET -H "Authorization: OAuth ... tag/global.saved&count=1000&continuation=13f42cdaed6:1e4:45421b83"

You'll need to run this for each batch of 1000, swapping out the continuation string for each new value provided.

Just input each of these json files into a separate "Import starred ... from google reader" and when you're done you'll have all the stars.


Return to “Knowledge Base”

Who is online

Users browsing this forum: No registered users and 1 guest