Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Readers > Amazon Kindle > Kindle Developer's Corner

Notices

Reply
 
Thread Tools Search this Thread
Old 07-31-2013, 04:00 AM   #1
forensic
Junior Member
forensic has much to be proud offorensic has much to be proud offorensic has much to be proud offorensic has much to be proud offorensic has much to be proud offorensic has much to be proud offorensic has much to be proud offorensic has much to be proud offorensic has much to be proud offorensic has much to be proud offorensic has much to be proud of
 
Posts: 1
Karma: 27052
Join Date: Jul 2013
Device: K3W
Introducing Calkin, a simple one-way fetcher server <->kindle (e.g. calibre recipes)

Regards!

Introducing Calkin, a simple Calibre <-> Kindle News feed fetcher and general file deliverer

From the README:
"Features" (or: what is this?):
- First all all: No binary blobs, very small, you can check everything for yourself. You don't have to trust me.
- Calkin relies on Calibre for the fetching of news feeds (rss, or more broadly: recipes)
- "one-way" sync any file (e.g. binaries, pdf, epub, mobi etc.) from a specified location to your kindle (e.g. parts of you library) (it uses md5checksums to reduce bandwitdth)
- Once setup, you just have to have your wifi on and the server (or whatever you are running) on, and you will be provided with fresh news in the background
- This was bourne out of lack of a better alternative (e.g. paid subscription and dependency on even more services and servers), with this just the kindle, your box (and if you want news, the site from which you want to fetch them) have to be online (or rather:connected).
- The Process:
Server: Cron calls fetch.sh -> get's list of recipes, calls calibre, which fetches them. Time is tracked. A file for the Kindle <-> Server communation is generated.
Kindle: Cron on Kindle calls calkin-kindle-sync -> calkin-kindle-sync checks wheather connection to server is possible -> Generates list of files already fetched to (hidden?) location and md5sum of files -> Uploads list to server -> Calls script on server, server generates md5sum of every file contained in defined folder (on server) and checks them against the ones in the kindle list -> Provides download links for kindle -> kindle replaces changed files with new ones, updates home screen.


ONLY Tested on Ubuntu 12.04 TLS (bash version 4.2.45(1)) + Kindle K3W + apache2 + php 4.9.4

Requirements:
-Calibre for your distro
-Newsfeed recipes for Calibre
-VServer, HomeServer, etc., at least Apache2 (sudo apt-get install tasksel,sudo tasksel Web-Server) (or virtual)
-or just a webspace with file access (than you have to upload the files (e.g. via ftp or the like); tweak as you like)
-corresponding port forwarding to Server and Firewall exceptions

-Kindleside: Jailbreak, Usb Network (?)

Known limitations:
-Currently weird filenames (with whitespacesetc.) don't work

INSTALL:
Please read the provided README

Questions? Suggestions?
Attached Files
File Type: zip cal-kindle-bandwidth-hash.zip (17.6 KB, 103 views)

Last edited by forensic; 07-31-2013 at 04:05 AM.
forensic is offline   Reply With Quote
Old 07-31-2013, 04:37 AM   #2
knc1
Going Viral
knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.
 
knc1's Avatar
 
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
calkin-kindle-sync

You are doing all of your file operations directly in flash !
Not a great idea for several reasons.

Stage your file operations -

1) Using a size limited, tmpfs backed, file system -
Do all your file operations that you can in this stage.

2) When a file is completely ready -
Transfer it to flash with a single "mv ... ..." command.

I do not see any handling of IFS in the script.
That may well be part of your filename handling problems.

Another thing to consider about the filename handling -
The file will end up on a FAT32 filesystem, with all that implies.
PLUS
You might want to view the options that file system is mounted with in the Kindle, there may also be characterset problems.
knc1 is offline   Reply With Quote
Advert
Old 07-31-2013, 04:41 AM   #3
NiLuJe
BLAM!
NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.
 
NiLuJe's Avatar
 
Posts: 13,477
Karma: 26012494
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
Have you looked into rsync? It's bundled with USBNetwork, and it pretty much does what you want (ie: one or two way directory sync) without extra round-trips, and a simple rsync server instead of a LAMP setup.

(I might be biased in favor of rsync as a Gentoo user, but, honestly, it rocks! )

Last edited by NiLuJe; 07-31-2013 at 04:49 AM.
NiLuJe is offline   Reply With Quote
Old 07-31-2013, 05:07 AM   #4
knc1
Going Viral
knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.
 
knc1's Avatar
 
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
Quote:
Originally Posted by NiLuJe View Post
Have you looked into rsync? It's bundled with USBNetwork, and it pretty much does what you want (ie: one or two way directory sync) without extra round-trips, and a simple rsync server instead of a LAMP setup.

(I might be biased in favor of rsync as a Gentoo user, but, honestly, it rocks! )
You don't even need the rsync server if you have ssh-pubkey access to the remote file system.
knc1 is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Kindle and Calibre Content Server JoeFloyd Amazon Kindle 26 12-09-2015 11:12 PM
SPCS: Simple PHP Content Server for Calibre Fmstrat Related Tools 6 05-29-2013 07:26 PM
Calibre Server (and Kindle PW) exkitteh Devices 2 03-05-2013 02:55 AM
Updating built-in recipes from command line on headless server? khromov Related Tools 1 07-03-2012 01:47 PM
Free ebook: Introducing Microsoft SQL Server 2008 haridasi Deals and Resources (No Self-Promotion or Affiliate Links) 0 09-17-2008 04:03 AM


All times are GMT -4. The time now is 06:23 AM.


MobileRead.com is a privately owned, operated and funded community.