Hello All,
I got a bricked Kobo Original WiFi (N647) from a friend, and after I revived it with some help from KevinShort :thanks:, I decided to see what the coolest thing I could do with it was.
As many of you know, the new models of Kobo will come with pocket integration built in: engadget.
I thought this was an awesome new feature, because I already use pocket to save interesting articles I see at work so I can read them when I get home. I do IT and webdesign 8-4 so my eyes get pretty strained looking at a computer screen all day. So to me the idea of being able to read those articles later without the clutter and on an e-ink display would be a real life-saver.
So enough about me, onto the goods:
Every day at 4 pm, I have an ePub file wireless delivered to my kobo that has all the articles in my "pocket" marked as unread. Pretty cool if you ask me.
So, how do you do this?
It's a few steps, but I'll try to make it as simple as possible. This how-to should also work for any kobo device AFAIK. (please correct me if I'm wrong)
Step 1: "hack" your kobo to sync with a google drive account using the wonderful guide from this thread. This is the only place there would be a hang-up based on your kobo model, as everything else is web-based. (Side note: I also recommend setting up a separate Gmail account so you can email files to yourself and have them automatically added to your google drive, and therefore automatically added to your kobo. Use this guide)
Step 2: Get your Pocket unread rss feed. By default, this feed is password protected. You have to disable this by going to this link. Your unread rss feed will then be this:
Just replace "USERNAME" with your username.
Step 3:Get the full text version of all the articles in your feed. To do this, go to FeedEnlarger and paste the unread rss feed you got in the last step into the "Enter partial feed URL" field. I would also then change the "Max items" to 10 (the maximum amount allowed) and click "create full text feed". It will redirect you to the new feed with the full text of the articles in your pocket feed. Just copy the whole url and paste it into a notepad, you'll need it later. Mine looks this:
*Note: Yes this service only allows the first 10 items, but I don't ever seem to need more than that, if anyone needs more, look around for other full-text rss feed generators, this one just seemed to work the best for me
Step 4: Set up your own personal rss parser. Oooh, how exciting!
4.a - Ok, all you need for this is a web server capable of running php scripts that doesn't have ads. I already had a server, but if you need a free one this one works just fine for what you need. Again, all you need is a tiny amount of server space with php and no ads, there's probably a few thousand sites that fit the bill.
4.b - After you get your server set up, grab the "rss.zip" file attached to this thread and unzip it. Inside are two files. rss_php.php is from the fine folks over at rssphp.net, you don't need to touch it.
The second file is index.php. All you need to do is open that file up in a text editor. I prefer notepad++, but to each their own. All you need to edit is on line 5 of the file. You just need to replace
with your own FeedEnlarger url you got in step 3. Again, mine looks like this:
4.c: Now, upload both those files to your server and go to wherever you put it. So if you signed up at 000webhost and got a subdomain like myname.net78.net, just upload those 2 files to public_html and then visit http://www.myname.net78.net/index.php. If you did everything right, you should just see some pretty boring looking plain text of the articles you saved in pocket. Save that URL for later.
4.d (Optional): I have the title (lines 21-24) for index.php set to My Pocket - current date. This is important because this will eventually end up being the title of your ePub file, and thus what you see in your kobo as the title. If you're comfortable with the code, you can edit this title to whatever you want.
Having fun yet?
Step 5: Get an ebookglue API key. Go here and just enter any email and password, you don't really need to remember it, all you want is the API key. After you sign-up, click on API Documentation and copy the API Key and save it. It will look something like this:
*Note: ebookglue only allows you to use their API 25 times a month for free, so I only have my digest sent Monday - Friday as to not got over the limit. If you need a digest every day, after the 25th day, just go sign up for a new account and get a new API key.
Step 6: Set up your Google Drive to Download an epub file of your daily digest everyday at a certain time.
6.a:Make sure you're logged into the google account you are using to sync your kobo and then go to this link. Click on "Blank Project"
6.b: Copy and paste this code in:
Replace YOUR-API-KEY with the API key you got in step 5. Replace YOUR-URL with the URL you got in step 4.c. Make sure to include http://www. in front of the domain, even if it is a subdomain. For some reason, I could not get it to work with www. in front.
6.c: This script makes a file named Daily Digest.epub in a folder named Saved Articles. You can change those to whatever you want, just create the folder first in google drive. (These folders mean nothing to the kobo, but it helps keep everything organized I think)
6.d Name the script something and save it.
6.e Set up automatic triggers for this script so you get a daily digest. You can set this up however you want. I wanted mine to go off at the end of every workday.
To set up a trigger, click on the little clock that says "current project's triggers" when you hover over it. Then just set up the triggers the way you want. If you want a daily digest only on certain days like I do, then chose "Time-driven"|"Week timer"|"Every Monday"|"4pm to 5pm" - and then do that for every day of the week you want.
-Save the script again
6.f (optional) If you want to get really fancy, you can have a cover for your daily digest. I made something stupid for mine - http://imgur.com/PmCm4hA. You can do whatever you want for a cover, but to get it to be added in your ebook every day, all you have to do is add this to the end of the ebookglue url in your script:
So the whole thing, if you wanted a cover image, would look like this:
That's it! Simple enough right? :p
Like I said, I wanted a piece of the Pocket on Kobo action, so I came up with a bit of a convoluted and tacky method of doing it, but it works!
Let me know if you have any questions, I'd love to help. Also, let me know if you have any suggestions if I missed something, or made it more difficult than it needs to be (I tend to do that).
Thanks!
I got a bricked Kobo Original WiFi (N647) from a friend, and after I revived it with some help from KevinShort :thanks:, I decided to see what the coolest thing I could do with it was.
As many of you know, the new models of Kobo will come with pocket integration built in: engadget.
I thought this was an awesome new feature, because I already use pocket to save interesting articles I see at work so I can read them when I get home. I do IT and webdesign 8-4 so my eyes get pretty strained looking at a computer screen all day. So to me the idea of being able to read those articles later without the clutter and on an e-ink display would be a real life-saver.
So enough about me, onto the goods:
Every day at 4 pm, I have an ePub file wireless delivered to my kobo that has all the articles in my "pocket" marked as unread. Pretty cool if you ask me.
So, how do you do this?
It's a few steps, but I'll try to make it as simple as possible. This how-to should also work for any kobo device AFAIK. (please correct me if I'm wrong)
Step 1: "hack" your kobo to sync with a google drive account using the wonderful guide from this thread. This is the only place there would be a hang-up based on your kobo model, as everything else is web-based. (Side note: I also recommend setting up a separate Gmail account so you can email files to yourself and have them automatically added to your google drive, and therefore automatically added to your kobo. Use this guide)
Step 2: Get your Pocket unread rss feed. By default, this feed is password protected. You have to disable this by going to this link. Your unread rss feed will then be this:
Code:
http://getpocket.com/users/USERNAME/feed/unread
Step 3:Get the full text version of all the articles in your feed. To do this, go to FeedEnlarger and paste the unread rss feed you got in the last step into the "Enter partial feed URL" field. I would also then change the "Max items" to 10 (the maximum amount allowed) and click "create full text feed". It will redirect you to the new feed with the full text of the articles in your pocket feed. Just copy the whole url and paste it into a notepad, you'll need it later. Mine looks this:
Code:
http://feedenlarger.com/makefulltextfeed.php?url=getpocket.com%2Fusers%2Fzacclay%2Ffeed%2Funread&max=10&links=preserve&exc=&submit=Create+full+text+feed
Step 4: Set up your own personal rss parser. Oooh, how exciting!
4.a - Ok, all you need for this is a web server capable of running php scripts that doesn't have ads. I already had a server, but if you need a free one this one works just fine for what you need. Again, all you need is a tiny amount of server space with php and no ads, there's probably a few thousand sites that fit the bill.
4.b - After you get your server set up, grab the "rss.zip" file attached to this thread and unzip it. Inside are two files. rss_php.php is from the fine folks over at rssphp.net, you don't need to touch it.
The second file is index.php. All you need to do is open that file up in a text editor. I prefer notepad++, but to each their own. All you need to edit is on line 5 of the file. You just need to replace
Code:
$rss->load('PUT FULL TEXT RSS FEED HERE');
Code:
$rss->load('http://feedenlarger.com/makefulltextfeed.php?url=getpocket.com%2Fusers%2Fzacclay%2Ffeed%2Funread&max=10&links=preserve&exc=&submit=Create+full+text+feed');
4.d (Optional): I have the title (lines 21-24) for index.php set to My Pocket - current date. This is important because this will eventually end up being the title of your ePub file, and thus what you see in your kobo as the title. If you're comfortable with the code, you can edit this title to whatever you want.
Having fun yet?
Step 5: Get an ebookglue API key. Go here and just enter any email and password, you don't really need to remember it, all you want is the API key. After you sign-up, click on API Documentation and copy the API Key and save it. It will look something like this:
Code:
lx4afu7chmz75w65heuvaoncszwmhukf
Step 6: Set up your Google Drive to Download an epub file of your daily digest everyday at a certain time.
6.a:Make sure you're logged into the google account you are using to sync your kobo and then go to this link. Click on "Blank Project"
6.b: Copy and paste this code in:
Code:
function myFunction() {
var url = 'https://ebookglue.com/convert?token=YOUR-API-KEY&url=YOUR-URL';
var Blob = UrlFetchApp.fetch(url).getBlob();
var folder = DocsList.getFolder('Saved Articles');
var first = folder.createFile(Blob);
first.rename ('Daily Digest.epub');
}
6.c: This script makes a file named Daily Digest.epub in a folder named Saved Articles. You can change those to whatever you want, just create the folder first in google drive. (These folders mean nothing to the kobo, but it helps keep everything organized I think)
6.d Name the script something and save it.
6.e Set up automatic triggers for this script so you get a daily digest. You can set this up however you want. I wanted mine to go off at the end of every workday.
To set up a trigger, click on the little clock that says "current project's triggers" when you hover over it. Then just set up the triggers the way you want. If you want a daily digest only on certain days like I do, then chose "Time-driven"|"Week timer"|"Every Monday"|"4pm to 5pm" - and then do that for every day of the week you want.
-Save the script again
6.f (optional) If you want to get really fancy, you can have a cover for your daily digest. I made something stupid for mine - http://imgur.com/PmCm4hA. You can do whatever you want for a cover, but to get it to be added in your ebook every day, all you have to do is add this to the end of the ebookglue url in your script:
Code:
&cover=URL-OF-COVER-IMAGE
Code:
function myFunction() {
var url = 'https://ebookglue.com/convert?token=YOUR-API-KEY&url=YOUR-URL&cover=URL-OF-COVER-IMAGE';
var Blob = UrlFetchApp.fetch(url).getBlob();
var folder = DocsList.getFolder('Saved Articles');
var first = folder.createFile(Blob);
first.rename ('Daily Digest.epub');
}
Like I said, I wanted a piece of the Pocket on Kobo action, so I came up with a bit of a convoluted and tacky method of doing it, but it works!
Let me know if you have any questions, I'd love to help. Also, let me know if you have any suggestions if I missed something, or made it more difficult than it needs to be (I tend to do that).
Thanks!