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-27-2014, 04:54 PM   #106
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
wha...? I'm not following what went wrong, but at least it works now?
barsanuphe is offline   Reply With Quote
Old 09-27-2014, 04:56 PM   #107
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
What exactly was wrong with having "%" in filenames?
Try adding into filename '^%', e.g:

'test ^%.mobi'
mobusr is offline   Reply With Quote
Advert
Old 09-27-2014, 04:57 PM   #108
mobusr
Enthusiast
mobusr began at the beginning.
 
Posts: 25
Karma: 10
Join Date: Sep 2014
Device: pw2
Quote:
Originally Posted by barsanuphe View Post
wha...? I'm not following what went wrong, but at least it works now?
yes, it worked.

let me rephrase what I did:

I've cloned your git repo on windows, so each file had inside at each line carriage returns ^M, that's why it wasnt working on kindle.
mobusr is offline   Reply With Quote
Old 09-27-2014, 05:12 PM   #109
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.
really impressive!

Code:
time ./offline_folder_export.py /mnt/books/

real	0m2.138s
user	0m0.214s
sys	0m1.803s
mobusr is offline   Reply With Quote
Old 09-27-2014, 06:10 PM   #110
mobusr
Enthusiast
mobusr began at the beginning.
 
Posts: 25
Karma: 10
Join Date: Sep 2014
Device: pw2
btw, where do i need to put collections.json on kindle generated by offline script?


EDIT: nvm, collections.json should be in /mnt/us/extensions/

Last edited by mobusr; 09-27-2014 at 06:24 PM.
mobusr is offline   Reply With Quote
Advert
Old 09-27-2014, 06:22 PM   #111
mobusr
Enthusiast
mobusr began at the beginning.
 
Posts: 25
Karma: 10
Join Date: Sep 2014
Device: pw2
Quote:
Originally Posted by NiLuJe View Post
@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 .
Yes, that was the problem.

I did install python. It's in /usr/bin/python on kindle.
mobusr is offline   Reply With Quote
Old 09-27-2014, 07:01 PM   #112
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: The exact same symlink also exists for python, python2 & python2.7, which is what made me wonder.

Code:
LIST="/usr/bin/python /usr/bin/python2 /usr/bin/python2.7"
for var in ${LIST} ; do
    ln -fs "/mnt/us/python/bin/python2.7" "${var}"
done
NiLuJe is offline   Reply With Quote
Old 09-27-2014, 08:26 PM   #113
mobusr
Enthusiast
mobusr began at the beginning.
 
Posts: 25
Karma: 10
Join Date: Sep 2014
Device: pw2
Quote:
Originally Posted by NiLuJe View Post
@mobusr: The exact same symlink also exists for python, python2 & python2.7, which is what made me wonder.

Code:
LIST="/usr/bin/python /usr/bin/python2 /usr/bin/python2.7"
for var in ${LIST} ; do
    ln -fs "/mnt/us/python/bin/python2.7" "${var}"
done
yeah, i got these..

for some reason which python2.7 gives me nothing tho
mobusr is offline   Reply With Quote
Old 09-28-2014, 06:03 AM   #114
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: Huh. Is the python2.7 symlink actually there and sane, or is it broken?
NiLuJe is offline   Reply With Quote
Old 09-28-2014, 08:14 AM   #115
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
Oops - again - need coffee

Last edited by knc1; 09-28-2014 at 08:17 AM.
knc1 is offline   Reply With Quote
Old 09-28-2014, 08:29 AM   #116
mobusr
Enthusiast
mobusr began at the beginning.
 
Posts: 25
Karma: 10
Join Date: Sep 2014
Device: pw2
Quote:
Originally Posted by NiLuJe View Post
@mobusr: Huh. Is the python2.7 symlink actually there and sane, or is it broken?
Code:
[root@kindle root]# ls -al /usr/bin/python*
lrwxrwxrwx    1 root     root            28 Apr  2 21:37 /usr/bin/python -> /mnt/us/python/bin/python2.7
lrwxrwxrwx    1 root     root            28 Apr  2 21:37 /usr/bin/python2 -> /mnt/us/python/bin/python2.7
lrwxrwxrwx    1 root     root            28 Apr  2 21:37 /usr/bin/python2.7 -> /mnt/us/python/bin/python2.7
[root@kindle root]# which python
[root@kindle root]# which python2.7
[root@kindle root]# which python2
[root@kindle root]#
mobusr is offline   Reply With Quote
Old 09-28-2014, 08:46 AM   #117
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
Code:
[root@kindle root]# ls -al /usr/bin/python*
lrwxrwxrwx    1 root     root            28 Apr  2 21:37 /usr/bin/python -> /mnt/us/python/bin/python2.7
lrwxrwxrwx    1 root     root            28 Apr  2 21:37 /usr/bin/python2 -> /mnt/us/python/bin/python2.7
lrwxrwxrwx    1 root     root            28 Apr  2 21:37 /usr/bin/python2.7 -> /mnt/us/python/bin/python2.7
[root@kindle root]# which python
[root@kindle root]# which python2.7
[root@kindle root]# which python2
[root@kindle root]#
That may just be the behavior of that version of Busybox Ash.

See if that Ash can "which" any other symlinks.

- - - -

OR try the most recent busybox build (in the ARMhf on Kindle tar ball).
Yes, you can run that version of Ash and all/any of the existing Kindle image files.
The "HowTo" page shows how to switch command line interpreters.

Last edited by knc1; 09-28-2014 at 08:49 AM.
knc1 is offline   Reply With Quote
Old 09-28-2014, 09:05 AM   #118
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
Good thing we rely on env and not which in the shebang then ;p.

(Namely because env is always a proper tool, whereas which is often a shell builtin).
NiLuJe is offline   Reply With Quote
Old 09-28-2014, 09:37 AM   #119
mobusr
Enthusiast
mobusr began at the beginning.
 
Posts: 25
Karma: 10
Join Date: Sep 2014
Device: pw2
Quote:
Originally Posted by knc1 View Post
That may just be the behavior of that version of Busybox Ash.

See if that Ash can "which" any other symlinks.
it works for bash, but not for python:
Code:
[root@kindle root]# which bash
/bin/bash
[root@kindle root]# ls -al /bin/bash
lrwxrwxrwx    1 root     root             7 Apr 23 12:50 /bin/bash -> busybox
basically works ONLY for every symlink pointed to busybox.

Quote:
- - - -
OR try the most recent busybox build (in the ARMhf on Kindle tar ball).
Yes, you can run that version of Ash and all/any of the existing Kindle image files.
The "HowTo" page shows how to switch command line interpreters.
will try this later, thanks
mobusr is offline   Reply With Quote
Old 09-28-2014, 12:05 PM   #120
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
Will try this later, thanks
I am mostly retired from (new) Kindle development (lack of time).

But that project to run (concurrently) two system libc's I do want to get finished - sometime.

There is one "known problem" at the moment -
LuaJit - needs to include the Amazon module paths in its loader search path.
(OR - require'full path/name' - which looks sort of ugly and can break easily)

Ah, Nano does work just fine.
knc1 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 08:37 AM.


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