![]() |
#1 |
Member
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 23
Karma: 8028
Join Date: Sep 2016
Device: Kindle PW1
|
Dropbox client, Seafile client
Please welcome to test my little projects:
https://github.com/trap000d/seafile-kindle-client https://github.com/trap000d/dropbox-kindle-client They both are made as KUAL extensions and work similarly so installation instructions are similar too. In short words: download, unpack to extensions folder, edit config, start KUAL, use. I refrained from implementing daemon mode for several reasons: 1. Almost all the time I keep my Kindles in airplane mode, therefore these scripts when running in background will only eat resources. 2. Frequent notifications are distracting, but without notifications it's not possible to get information about synchronization process. 3. If you remove or replace open document, the result is unpredictable. Longer description Seafile client: Spoiler:
Dropbox client: Spoiler:
What's new: 0.1.2
0.1.3
ToDo: override problems with non-Unicode 'bad' characters in file names:
Download links for current versions: Seafile client: https://github.com/trap000d/seafile-.../v0.1.3.tar.gz Dropbox client: https://github.com/trap000d/dropbox-.../v0.1.3.tar.gz Find new releases here: https://github.com/trap000d/seafile-...lient/releases https://github.com/trap000d/dropbox-...lient/releases Last edited by trap000d; 12-28-2016 at 09:46 PM. Reason: New version 0.1.3 pushed |
![]() |
![]() |
![]() |
#2 |
Evangelist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 416
Karma: 765432
Join Date: Apr 2016
Location: Italy
Device: Kindle PW3 5.8.5.0.1
|
nice work, thanks for sharing
![]() |
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Addict
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 241
Karma: 1001369
Join Date: Sep 2010
Device: prs300, kindle keyboard 3g
|
Hi
I'd appreciate some "help for a dummy" please. I copied the dropbox folder to G:\extensions\ when I open KUAL dropbox sync is in the list. I renamed dropbox.cfg to .old I renamed .example to .cfg I went to my dropbox and (this is where things went wrong i think) I created a new app, which i just called it " my kindle" I copied the token into the dropbox.cfg I ran the sync with log and unsurprisingly it didn't work. The log created in my documents folder is as such Traceback (most recent call last): File "/mnt/us/extensions/dropbox/bin/dbcli.py", line 8, in <module> from requests.packages.urllib3.exceptions import SubjectAltNameWarning ImportError: cannot import name SubjectAltNameWarning As a bog standard user i could do with guidance. I can't even see how you let dropbox know it is my dropbox to sync to (unless dropbox knows from the token) Thanks in advance |
![]() |
![]() |
![]() |
#4 | |
Member
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 23
Karma: 8028
Join Date: Sep 2016
Device: Kindle PW1
|
Hi Scissors,
You did all things absolutely right. I'm just not sure if you have installed Python properly. I assume you've got Kindle 3G device (as it shown in your profile info). Unfortunately I have no one on hand to test and debug (I have only 3 exemplars at home: PW1, PW2 and PW3 resp.). That particular line which has caused an error, actually useless for Dropbox (I've forgot to remove some Seafile client code). Please give a try to a new version (archive attached to this message) and send me log. P.S. As for Dropbox API token. It's a standard authentication and authorization scheme for Dropbox clients (a good alternative to login/password pair). Server recognizes applications of particular user and their credentials by single token. A very brief explanation how it works you may find here: https://www.dropbox.com/developers/r...ce/oauth-guide Quote:
|
|
![]() |
![]() |
![]() |
#5 |
Addict
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 248
Karma: 892441
Join Date: Jul 2010
Device: K2i
|
Thank you very much for your work and this great extension. Sync is faster than with other solutions running on top of Amazons Whispersync in the past.
I only found one shortcoming so far and that is, that files don't get downloaded correctly if there is an unexpected non-standard character (like an umlaut) in the filename. But I was able to easily fix this with a shell script on my Mac (thats used to move files to the Dropbox folder). Also, I managed to get an entire soft-hyphenation and conversion workflow set up using only the command line - so the azw3 file that now ends up in my sync folder already is hyphenated once it reaches the Kindle, after running one simple script. My (macOS) script (save as a .sh file), if some of you wan't to set up something similar: Code:
cd ~/Downloads mv "$(ls -t | grep '\.epub$' |head -1)" ~/Dropbox/ sleep 0.5 cd ~/Dropbox cp "$(ls -t | grep '\.epub$' |head -1)" ~/Dropbox/Books/ cd ~/Dropbox/Books find . -name '*.epub' -exec /Applications/calibre.app/Contents/console.app/Contents/MacOS/calibre-debug -e ~/Documents/kindle-hyphens/main.py {} {} \; sleep 0.5 /Applications/calibre.app/Contents/console.app/Contents/MacOS/ebook-convert "$(ls -t | grep '\.epub$' |head -1 | grep -Po '.*(?=\.)' | sed 's/(\(.*\))//' | sed -e 's/[^A-Za-z0-9._-]/ /g').azw3" --share-not-sync --change-justification justify rm "$(ls -t | grep '\.epub$' |head -1)" sleep 1 killall Terminal To use kindle-hyphens you must have Calibre (with the Modify ePub plugin), Python and lxml installed. To install lxml read the kindle-hyphens readme, or look at this thread: http://stackoverflow.com/questions/1...-mac-os-x-10-9 What the script above does: Takes the most recent epub in ~/Downloads, moves it to ~/Dropbox and copies it to ~/Dropbox/Books , lets kindle-hyphens put soft hyphens in the epub in ~/Dropbox/Books, uses calibre to convert it to an .azw3 (and some | grep | sed magic to remove all special characters and brackets (including the stuff in the brackets) from the filename, then deletes the .epub in ~/Dropbox/Books (.azw3 remains there of course), but leaves the one in ~/Dropbox for archival purposes. Have fun setting up a similar workflow for yourselves. ![]() n. Last edited by notimp; 04-16-2017 at 09:29 AM. |
![]() |
![]() |
Advert | |
|
![]() |
#6 | |
Addict
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 241
Karma: 1001369
Join Date: Sep 2010
Device: prs300, kindle keyboard 3g
|
Quote:
I copied over your new file and set the screen to 40 x 50 (as in the comment) now i get this. Spoiler:
hopefully that means something to you |
|
![]() |
![]() |
![]() |
#7 |
Member
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 23
Karma: 8028
Join Date: Sep 2016
Device: Kindle PW1
|
Hi Notimp,
Thank you. I tested scripts for compatibility with unicode (files with Cyrillic and Chinese characters in names). If you send me an example of name which caused trouble, I'll find where is the problem: in Dropbox, in my scripts or somewhere else. |
![]() |
![]() |
![]() |
#8 |
Member
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 23
Karma: 8028
Join Date: Sep 2016
Device: Kindle PW1
|
Hi Scissors,
Answered to PM |
![]() |
![]() |
![]() |
#9 | |
Addict
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 248
Karma: 892441
Join Date: Jul 2010
Device: K2i
|
Quote:
Mirror: http://www.filefactory.com/file/3snt...pload.biz.epub The file seems to download fine, but then on the device turns out to be a 8kb file with a dropbox api error encoded into it (= error at dropbox' end?) and not the initial epub - if I replace the umlauts (here are some you could test against - öüäÖÜÄß ![]() I'm on a PW3, and the extension works fine for me, btw. edit: And just as a small aside, if you are using Linux and looking at my script - the calibre command line commands should be global on Linux - if you delete the /Applications/calibre.app/Contents/console.app/Contents/MacOS/ parts in the code above, the lines should start working for you - at least thats what Kovid states in the Calibre documentation. ![]() Last edited by notimp; 12-05-2016 at 05:53 PM. |
|
![]() |
![]() |
![]() |
#10 | |
Member
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 23
Karma: 8028
Join Date: Sep 2016
Device: Kindle PW1
|
Hi Notimp,
For me it looks like a problem at Dropbox side. After I've downloaded your file and placed it into Dropbox folder, it has been immediately renamed. Now I've got 2 files here: file with original name ( but zero size), and a new one with name "[name looks exactly like original but I'm not sure](Unicode Encoding Conflict).epub" They explained this behaviour here https://ask.libreoffice.org/en/quest...h-libreoffice/ Quote:
|
|
![]() |
![]() |
![]() |
#11 |
Addict
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 241
Karma: 1001369
Join Date: Sep 2010
Device: prs300, kindle keyboard 3g
|
|
![]() |
![]() |
![]() |
#12 |
Member
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 23
Karma: 8028
Join Date: Sep 2016
Device: Kindle PW1
|
Hi Scissors,
Sorry I've not managed to find the root of problem on your device. Hope you'll have some free time in new year. Unfortunately I can't find any similar device around for testing. Regards, |
![]() |
![]() |
![]() |
#13 |
Addict
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 248
Karma: 892441
Join Date: Jul 2010
Device: K2i
|
Not sure if possible - but, could you have your script activate the Kindles Wifi (- Kindle then auto connects) on start, and deactivate it again once sync is finished? It would be neat to have that functionality. Those extra steps become quite tedious after a while..
![]() |
![]() |
![]() |
![]() |
#14 | |
Going Viral
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
|
Quote:
Give it a try and let us know. |
|
![]() |
![]() |
![]() |
#15 |
Addict
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 248
Karma: 892441
Join Date: Jul 2010
Device: K2i
|
Commands are:
Code:
disable WiFi: lipc-set-prop com.lab126.cmd wirelessEnable 0 enable WiFi: lipc-set-prop com.lab126.cmd wirelessEnable 1 I'll see if I can get it hacked together. ![]() |
![]() |
![]() |
![]() |
Tags |
dropbox, kual, python, seafile |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Seafile Client | trap000d | Kindle Developer's Corner | 20 | 10-03-2016 06:11 PM |
what should I ask my client for next time? | angharad09 | Conversion | 2 | 02-27-2012 05:54 PM |
Touch OPDS client ??? | vlad59 | Kobo Reader | 7 | 12-04-2011 09:36 AM |
Android Email Client | veronica0406 | enTourage Archive | 2 | 11-12-2010 05:23 PM |
Android SFTP (client) | kenjennings | enTourage Archive | 4 | 04-12-2010 01:37 PM |