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 09-21-2014, 03:28 PM   #91
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,491
Karma: 26012494
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
Was that time spent building the json db (Updating collections ...) or waiting for ccat (Sending commands ...)? If it's the latter, building the json db from a powerful host won't change much (i.e., ccat is the bottleneck, and since you'll always have to go through it…).

Last edited by NiLuJe; 09-21-2014 at 03:31 PM.
NiLuJe is offline   Reply With Quote
Old 09-22-2014, 01:30 AM   #92
mobusr
Enthusiast
mobusr began at the beginning.
 
Posts: 25
Karma: 10
Join Date: Sep 2014
Device: pw2
Quote:
Originally Posted by NiLuJe View Post
Was that time spent building the json db (Updating collections ...) or waiting for ccat (Sending commands ...)? If it's the latter, building the json db from a powerful host won't change much (i.e., ccat is the bottleneck, and since you'll always have to go through it…).
i have no idea, i just ran KUAL and selected librarysync -> create collection from folders structure and it was displaying something like 'creating collections from directory structure ... ' for 3+ hours..
mobusr is offline   Reply With Quote
Advert
Old 09-22-2014, 01:44 AM   #93
barsanuphe
Connoisseur
barsanuphe writes the songs that make the whole world sing.barsanuphe writes the songs that make the whole world sing.barsanuphe writes the songs that make the whole world sing.barsanuphe writes the songs that make the whole world sing.barsanuphe writes the songs that make the whole world sing.barsanuphe writes the songs that make the whole world sing.barsanuphe writes the songs that make the whole world sing.barsanuphe writes the songs that make the whole world sing.barsanuphe writes the songs that make the whole world sing.barsanuphe writes the songs that make the whole world sing.barsanuphe writes the songs that make the whole world sing.
 
Posts: 77
Karma: 40008
Join Date: Aug 2014
Location: Paris, France
Device: PW2, Kobo H20, Kobo Aura One
Then it should be while building the json, going through the folders. It should switch to something like "Sending commands" when doing the actual updating...
barsanuphe is offline   Reply With Quote
Old 09-22-2014, 02:50 AM   #94
mobusr
Enthusiast
mobusr began at the beginning.
 
Posts: 25
Karma: 10
Join Date: Sep 2014
Device: pw2
i've also tried - https://github.com/foxsen/collectionSync it seems doesn't work anymore..

@baranuphe, i'm scraping now whole lot of books, it should create a .json i guess?

it seems librarian doesn't like '%' in filenames, can you fix this?

also, is there any way to continue import (not start from scratch) with librarian?

if i run librarian --scrape -i it starts again from the start ... ?

ehm, what's the point of converting books from .mobi to .epub?
when you send to kindle they are converted again back to .mobi?
i kinda don't get for what this is made for ..

would be just nice to get a tool to make same 'generate .json file based on the directory tree' on the desktop PC.

EDIT: i'm just looking into librariansync/generate_collections.py file and trying to adopt it to the PC to generate db on it but i'm not that good in python so help is highly appreciated.

EDIT2: so i've installed usbnet on my PW2 and gave a try CollectionSync script from the telnet it seems to be working but have some bugs (with dashes in name of the folders/files), most of the time it takes to update the final collections on the homescreen of the kindle with some java app called (PerformPostBatch.class) but it works MUCH faster comparing to librarianSync, so roughly 3920 books with 360 collections (actually about 400 folders, but some didnt work of the problem above) took about ~10 minutes.

the other bug I encountered kindle's home crashed as well for some reason, so had to reboot from console )

also it seems to not create sub-collections like CM, e.g. folder1\folder2\some_book.mobi so you get folder1 collection inside it folder2 collection hidden on the home page, but I think its doable to modify the script to make it work properly or just integrate this script functionality into the librarian (which would be quite nice).

Last edited by mobusr; 09-22-2014 at 04:40 AM.
mobusr is offline   Reply With Quote
Old 09-22-2014, 01:00 PM   #95
barsanuphe
Connoisseur
barsanuphe writes the songs that make the whole world sing.barsanuphe writes the songs that make the whole world sing.barsanuphe writes the songs that make the whole world sing.barsanuphe writes the songs that make the whole world sing.barsanuphe writes the songs that make the whole world sing.barsanuphe writes the songs that make the whole world sing.barsanuphe writes the songs that make the whole world sing.barsanuphe writes the songs that make the whole world sing.barsanuphe writes the songs that make the whole world sing.barsanuphe writes the songs that make the whole world sing.barsanuphe writes the songs that make the whole world sing.
 
Posts: 77
Karma: 40008
Join Date: Aug 2014
Location: Paris, France
Device: PW2, Kobo H20, Kobo Aura One
So:
1. scraping isn't importing, it'll just copy files scattered in a drive into the import folder.
2. I'll see about the "%" character in filenames
3. importing can be resumed, not scraping.
4. at some point I decided to only have epubs in the library. It's easier to work with as a format and, I guess, by its open nature, more future-proof.
5. you could look at list_folder_contents() in kindle_contents.py to have an idea of how to build your offline script to generate the json.
6. I don't really get why you would get such a difference in terms of speed. Maybe it's a memory thing? how are your files organized? lots of folders/subfolders or a few folders with a lot of files?
7. nested folders do not work in later firmwares, so I dropped support for that during a rewrite.
barsanuphe is offline   Reply With Quote
Advert
Old 09-22-2014, 01:28 PM   #96
mobusr
Enthusiast
mobusr began at the beginning.
 
Posts: 25
Karma: 10
Join Date: Sep 2014
Device: pw2
Quote:
Originally Posted by barsanuphe View Post
So:
1. scraping isn't importing, it'll just copy files scattered in a drive into the import folder.
2. I'll see about the "%" character in filenames
3. importing can be resumed, not scraping.
4. at some point I decided to only have epubs in the library. It's easier to work with as a format and, I guess, by its open nature, more future-proof.
5. you could look at list_folder_contents() in kindle_contents.py to have an idea of how to build your offline script to generate the json.
6. I don't really get why you would get such a difference in terms of speed. Maybe it's a memory thing? how are your files organized? lots of folders/subfolders or a few folders with a lot of files?
7. nested folders do not work in later firmwares, so I dropped support for that during a rewrite.
6. Well about 3920 files in 401 folders. I've also made in the root 6 main folders (categories). So structure is documentsROOT -> 6 folders -> 401 folders total. In every subfolder there are files in between of 1 to 200 or so.
I think the main issue is converting mobi to epub.
7. Ahh, didn't know that. What they've changed there? I've looked into /var/local/cc.db and collections structure is pretty much in Collections table, each Collection is in Entries with Collection type. I'm interested in just updating the sqlite3 db and restarting amazon's launcher, is it possible ? (without whole device restart).
mobusr is offline   Reply With Quote
Old 09-22-2014, 02:00 PM   #97
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 mobusr View Post
- - - -
EDIT2: so i've installed usbnet on my PW2 and gave a try CollectionSync script from the telnet it seems to be working but have some bugs (with dashes in name of the folders/files), most of the time it takes to update the final collections on the homescreen of the kindle with some java app called (PerformPostBatch.class) but it works MUCH faster comparing to librarianSync, so roughly 3920 books with 360 collections (actually about 400 folders, but some didnt work of the problem above) took about ~10 minutes.

- - - -
That is an (intentional) artifact of CollectionSync being written for Chinese.
Details in the "readme" document and change log at the link you posted earlier.

From what I could see at a brief look-through, its not the '-' but the preceding and trailing space in ' - '.
*nix doesn't like spaces in file and path names - you have to escape them or quote the string that has them.
knc1 is offline   Reply With Quote
Old 09-22-2014, 02:58 PM   #98
barsanuphe
Connoisseur
barsanuphe writes the songs that make the whole world sing.barsanuphe writes the songs that make the whole world sing.barsanuphe writes the songs that make the whole world sing.barsanuphe writes the songs that make the whole world sing.barsanuphe writes the songs that make the whole world sing.barsanuphe writes the songs that make the whole world sing.barsanuphe writes the songs that make the whole world sing.barsanuphe writes the songs that make the whole world sing.barsanuphe writes the songs that make the whole world sing.barsanuphe writes the songs that make the whole world sing.barsanuphe writes the songs that make the whole world sing.
 
Posts: 77
Karma: 40008
Join Date: Aug 2014
Location: Paris, France
Device: PW2, Kobo H20, Kobo Aura One
Quote:
Originally Posted by mobusr View Post
6. Well about 3920 files in 401 folders. I've also made in the root 6 main folders (categories). So structure is documentsROOT -> 6 folders -> 401 folders total. In every subfolder there are files in between of 1 to 200 or so.
I think the main issue is converting mobi to epub.
LibrarianSync, on the Kindle, does not convert anything. It just crawls your folders to create the collections.
barsanuphe is offline   Reply With Quote
Old 09-23-2014, 01:51 AM   #99
kaznelson
Old Kaz
kaznelson ought to be getting tired of karma fortunes by now.kaznelson ought to be getting tired of karma fortunes by now.kaznelson ought to be getting tired of karma fortunes by now.kaznelson ought to be getting tired of karma fortunes by now.kaznelson ought to be getting tired of karma fortunes by now.kaznelson ought to be getting tired of karma fortunes by now.kaznelson ought to be getting tired of karma fortunes by now.kaznelson ought to be getting tired of karma fortunes by now.kaznelson ought to be getting tired of karma fortunes by now.kaznelson ought to be getting tired of karma fortunes by now.kaznelson ought to be getting tired of karma fortunes by now.
 
kaznelson's Avatar
 
Posts: 206
Karma: 1064151
Join Date: May 2010
Device: PocketBook Era
Quote:
Originally Posted by barsanuphe View Post
2. I'll see about the "%" character in filenames
Can make automatic replacement of unrecognised symbols in filename on "_"?

PS: I don't have problems from "%"...

Last edited by kaznelson; 09-23-2014 at 01:57 AM.
kaznelson is offline   Reply With Quote
Old 09-24-2014, 05:18 PM   #100
barsanuphe
Connoisseur
barsanuphe writes the songs that make the whole world sing.barsanuphe writes the songs that make the whole world sing.barsanuphe writes the songs that make the whole world sing.barsanuphe writes the songs that make the whole world sing.barsanuphe writes the songs that make the whole world sing.barsanuphe writes the songs that make the whole world sing.barsanuphe writes the songs that make the whole world sing.barsanuphe writes the songs that make the whole world sing.barsanuphe writes the songs that make the whole world sing.barsanuphe writes the songs that make the whole world sing.barsanuphe writes the songs that make the whole world sing.
 
Posts: 77
Karma: 40008
Join Date: Aug 2014
Location: Paris, France
Device: PW2, Kobo H20, Kobo Aura One
@mobusr
I've added a new script to the git repo: tools/offline_folder_export.py that basically creates the collections.json file necessary to build folder-based collections. You can run this on your PC on your local mirror of files, copy your files over to your kindle and collections.json to the extensions folder, and rebuild/update your collections with LibrarianSync.
barsanuphe is offline   Reply With Quote
Old 09-24-2014, 06:12 PM   #101
mobusr
Enthusiast
mobusr began at the beginning.
 
Posts: 25
Karma: 10
Join Date: Sep 2014
Device: pw2
Quote:
Originally Posted by barsanuphe View Post
@mobusr
I've added a new script to the git repo: tools/offline_folder_export.py that basically creates the collections.json file necessary to build folder-based collections. You can run this on your PC on your local mirror of files, copy your files over to your kindle and collections.json to the extensions folder, and rebuild/update your collections with LibrarianSync.
wow thanks! will test this and report back.
mobusr is offline   Reply With Quote
Old 09-26-2014, 02:56 AM   #102
barsanuphe
Connoisseur
barsanuphe writes the songs that make the whole world sing.barsanuphe writes the songs that make the whole world sing.barsanuphe writes the songs that make the whole world sing.barsanuphe writes the songs that make the whole world sing.barsanuphe writes the songs that make the whole world sing.barsanuphe writes the songs that make the whole world sing.barsanuphe writes the songs that make the whole world sing.barsanuphe writes the songs that make the whole world sing.barsanuphe writes the songs that make the whole world sing.barsanuphe writes the songs that make the whole world sing.barsanuphe writes the songs that make the whole world sing.
 
Posts: 77
Karma: 40008
Join Date: Aug 2014
Location: Paris, France
Device: PW2, Kobo H20, Kobo Aura One
@mobusr
What exactly was wrong with having "%" in filenames?
barsanuphe is offline   Reply With Quote
Old 09-27-2014, 07:10 AM   #103
barsanuphe
Connoisseur
barsanuphe writes the songs that make the whole world sing.barsanuphe writes the songs that make the whole world sing.barsanuphe writes the songs that make the whole world sing.barsanuphe writes the songs that make the whole world sing.barsanuphe writes the songs that make the whole world sing.barsanuphe writes the songs that make the whole world sing.barsanuphe writes the songs that make the whole world sing.barsanuphe writes the songs that make the whole world sing.barsanuphe writes the songs that make the whole world sing.barsanuphe writes the songs that make the whole world sing.barsanuphe writes the songs that make the whole world sing.
 
Posts: 77
Karma: 40008
Join Date: Aug 2014
Location: Paris, France
Device: PW2, Kobo H20, Kobo Aura One
Following a discussion with frakman1, latest version allows for regular expressions in collections.json, for quick sorting into collections of files whose filenames follow known patterns.
barsanuphe is offline   Reply With Quote
Old 09-27-2014, 04:48 PM   #104
mobusr
Enthusiast
mobusr began at the beginning.
 
Posts: 25
Karma: 10
Join Date: Sep 2014
Device: pw2
@barsanuphe

I think all my problems related to LibrarianSync is because I synced git repo from Windows system so git added nasty ^M at the end of each line ..

I ran today few hours ago 'Export Collections function' and it ran for over 10 hours.

So I thought it was something wrong and decided to run same command through the ssh..

I had in the terminal something like:

Code:
command not found
after editing generate_collections.py to make sure it's /usr/bin/env python instead of /usr/bin/env python2.7 it worked .. and was done after 38.52s...

I'm gonna test your script now for creating collections.json file on localhost.. and report back.. sorry for longness!
mobusr is offline   Reply With Quote
Old 09-27-2014, 04:51 PM   #105
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,491
Karma: 26012494
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
@mobusr: Err, that doesn't make sense. When did you install Python, and which version of the package did you use?

EDIT: That is, unless the shebang itself was mangled by carriage returns. But then just dos2unix'ing it should be enough, the python2.7 symlink has been there as long as the python one, so moving from one to the other wouldn't change anything, which is what I was getting at .

Last edited by NiLuJe; 09-27-2014 at 04:56 PM.
NiLuJe is offline   Reply With Quote
Reply

Tags
kindle collections, librariansync


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Vocabulary builder and flash card feature on old kindle 2/3/dx? dark.knight1 Kindle Developer's Corner 12 10-10-2015 01:12 PM
Vocabulary builder bobafruit Kindle Developer's Corner 25 09-04-2015 01:46 AM
Free (nook/Kindle/iTunes/DRM-free) Legacy Builder [Xtian Business Leadership Advice] ATDrake Deals and Resources (No Self-Promotion or Affiliate Links) 0 10-13-2014 02:44 AM
Vocabulary Builder for Kindle Paperwhite 1 pxpxpx Amazon Kindle 2 02-16-2014 06:07 PM
SBPubX Builder tmaynard Fictionwise eBookwise 16 11-20-2008 12:35 PM


All times are GMT -4. The time now is 09:15 PM.


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