Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Readers > Kobo Reader > Kobo Developer's Corner

Notices

Reply
 
Thread Tools Search this Thread
Old 02-16-2013, 12:06 PM   #46
PeterT
Grand Sorcerer
PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.
 
PeterT's Avatar
 
Posts: 12,119
Karma: 73448614
Join Date: Nov 2007
Location: Toronto
Device: Nexus 7, Clara, Touch, Tolino EPOS
Quote:
Originally Posted by dgvirtual View Post
I tried the first method, and, unfortunately, it does not work all the time.

It works the first time, or maybe untill you add any annotations or read any of the documents you uploaded. Then, the Kobo ereader creates two more folders with the same name, and the script gets confused as to where to put the books fetched from the gmail account. Here is the tree view of the file structure inside the virtual sd card (read of another Grive installation on my linux box), for you to understand what I mean:

Code:
dg@bala:~/tmp/GriveKobo$ tree
.
├── Digital Editions
│** ├── Annotations
│** │** └── KoboGrive
│** │**     └── book1.epub.annot
│** └── Manifest
│**     └── KoboGrive
│**         ├── book1.epub.xml
│**         ├── book2.rtf
│**         └── book3.epub
├── koboExtStorage
│** ├── dict
│** ├── images
│** └── kepub
└── KoboGrive
    ├── book4.epub
    ├── book5.epub
    ├── book6.epub
    ├── book1.epub
    └── book2.rtf
The two KoboGrive folders we within the Digital Editions directory are a part of how ADE works
PeterT is offline   Reply With Quote
Old 02-16-2013, 04:01 PM   #47
moffattm
Addict
moffattm ought to be getting tired of karma fortunes by now.moffattm ought to be getting tired of karma fortunes by now.moffattm ought to be getting tired of karma fortunes by now.moffattm ought to be getting tired of karma fortunes by now.moffattm ought to be getting tired of karma fortunes by now.moffattm ought to be getting tired of karma fortunes by now.moffattm ought to be getting tired of karma fortunes by now.moffattm ought to be getting tired of karma fortunes by now.moffattm ought to be getting tired of karma fortunes by now.moffattm ought to be getting tired of karma fortunes by now.moffattm ought to be getting tired of karma fortunes by now.
 
moffattm's Avatar
 
Posts: 333
Karma: 1440670
Join Date: Jul 2010
Location: Auckland, New Zealand
Device: Kobo Original, Kobo Glo
Quote:
Originally Posted by spMatti View Post
Hi

I developed hack to synchronize Kobo Touch with Google Drive. It uses open source Linux client called grive (https://github.com/Grive/grive). When the eReader is online files are automatically synchronized. You can find download link and installation instructions from https://github.com/softapalvelin/kobo-grive-sync.

I wrote about it in http://blog.softapalvelin.com/2013/0...h-ereader.html if you want to read more.
Thank you spMatti for this awesome hack!

I didn't know about Google Apps Script, but now that I do I can think of lots of (non-Kobo related) uses for it. I particularly like the time-driven triggers to automate tasks.
moffattm is offline   Reply With Quote
Old 02-17-2013, 11:51 AM   #48
dgvirtual
Enthusiast
dgvirtual plays well with othersdgvirtual plays well with othersdgvirtual plays well with othersdgvirtual plays well with othersdgvirtual plays well with othersdgvirtual plays well with othersdgvirtual plays well with othersdgvirtual plays well with othersdgvirtual plays well with othersdgvirtual plays well with othersdgvirtual plays well with others
 
dgvirtual's Avatar
 
Posts: 30
Karma: 2848
Join Date: Feb 2013
Location: Lithuania
Device: Kobo Glo
Wink

Quote:
Originally Posted by PeterT View Post
The two KoboGrive folders we within the Digital Editions directory are a part of how ADE works
I realize that. My point was, that the google apps script cannot choose correctly between the three folders/labels, and kobo ereader does not look for ebooks within the ADE folder.
dgvirtual is offline   Reply With Quote
Old 02-17-2013, 12:12 PM   #49
Mrs_Often
Wizard
Mrs_Often ought to be getting tired of karma fortunes by now.Mrs_Often ought to be getting tired of karma fortunes by now.Mrs_Often ought to be getting tired of karma fortunes by now.Mrs_Often ought to be getting tired of karma fortunes by now.Mrs_Often ought to be getting tired of karma fortunes by now.Mrs_Often ought to be getting tired of karma fortunes by now.Mrs_Often ought to be getting tired of karma fortunes by now.Mrs_Often ought to be getting tired of karma fortunes by now.Mrs_Often ought to be getting tired of karma fortunes by now.Mrs_Often ought to be getting tired of karma fortunes by now.Mrs_Often ought to be getting tired of karma fortunes by now.
 
Mrs_Often's Avatar
 
Posts: 1,775
Karma: 2694823
Join Date: Dec 2011
Location: The Netherlands
Device: Kobo Touch, Glo, Clara HD
Quote:
Originally Posted by dgvirtual View Post
I realize that. My point was, that the google apps script cannot choose correctly between the three folders/labels, and kobo ereader does not look for ebooks within the ADE folder.
How and why did the Digital Editions folders get there anyway? They seem to save annotations files but I never made annotations. You might think that they're put there automatically to be ready for the possibility of annotations, but I just synced a couple of times and the Digital Editions have not been put back after I deleted them...
Mrs_Often is offline   Reply With Quote
Old 02-17-2013, 06:06 PM   #50
davidfor
Grand Sorcerer
davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.
 
Posts: 24,908
Karma: 47303748
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
Quote:
Originally Posted by Mrs_Often View Post
How and why did the Digital Editions folders get there anyway? They seem to save annotations files but I never made annotations. You might think that they're put there automatically to be ready for the possibility of annotations, but I just synced a couple of times and the Digital Editions have not been put back after I deleted them...
The contents of the "Digital Editions" directory is maintained by ADE on the device. When you read an epub or PDF, it is opened with ADE. That creates two files. One is under the annotations directory, one in the manifest. The files have the same name and path as the book being read with "annot" or "xml" added as the extension.

In dgvirtual's tree listing, it means that "KoboGrive/book1.epub" has been opened at some time. I don't know why "book2.rtf" and "book3.epub" are there, but he does say he changed some names.

But, I didn't know the "Digital Editions" directory was created on the SD card. It does make sense to do it that way. I haven't seen one on my cards, but I haven't looked for it before. Unfortunately, a quick test with 2.4.0 didn't create the directory or the files for an epub on the card. The files directory and files are still being created on the main memory. But, the annotations for the epub on the SD card only went into the database.
davidfor is offline   Reply With Quote
Old 02-18-2013, 03:39 AM   #51
Mrs_Often
Wizard
Mrs_Often ought to be getting tired of karma fortunes by now.Mrs_Often ought to be getting tired of karma fortunes by now.Mrs_Often ought to be getting tired of karma fortunes by now.Mrs_Often ought to be getting tired of karma fortunes by now.Mrs_Often ought to be getting tired of karma fortunes by now.Mrs_Often ought to be getting tired of karma fortunes by now.Mrs_Often ought to be getting tired of karma fortunes by now.Mrs_Often ought to be getting tired of karma fortunes by now.Mrs_Often ought to be getting tired of karma fortunes by now.Mrs_Often ought to be getting tired of karma fortunes by now.Mrs_Often ought to be getting tired of karma fortunes by now.
 
Mrs_Often's Avatar
 
Posts: 1,775
Karma: 2694823
Join Date: Dec 2011
Location: The Netherlands
Device: Kobo Touch, Glo, Clara HD
Aaahh thanks for that explanation. I didn't know the epub reader was ADE itself. I thought Adobe was sneaking in and being malicious. Well the Digital Editions directory makes sense then.

Strange, are you saying the virtual SD card gets the Digital Editions directory, but a real physical SD seems to store its Digital Editions directory in main memory? Weird.

spMatti might it be possible to include in the script the possibility to assign one Google Drive folder (+ parent?) to by synced? This would solve all the mess. dgvirtual suggests a handy work around but as he says himself (oh, wait, she??) it is a lot of bother to have another account and another in-between.*


*NB I still haven't sent my kobo gmail account another ebook attachment to get sucked into Google Drive so I haven't actually seen the confusion of the Google script as to where to put the attachment. If all it knows is "Put it in the Gmail folder," (mine automatically puts them in a Gmail folder, not a KoboGrive folder) it might be worth telling it to put it in the /Gmail folder, not the /Digital Editions/Gmail...
Mrs_Often is offline   Reply With Quote
Old 02-18-2013, 03:45 AM   #52
Mrs_Often
Wizard
Mrs_Often ought to be getting tired of karma fortunes by now.Mrs_Often ought to be getting tired of karma fortunes by now.Mrs_Often ought to be getting tired of karma fortunes by now.Mrs_Often ought to be getting tired of karma fortunes by now.Mrs_Often ought to be getting tired of karma fortunes by now.Mrs_Often ought to be getting tired of karma fortunes by now.Mrs_Often ought to be getting tired of karma fortunes by now.Mrs_Often ought to be getting tired of karma fortunes by now.Mrs_Often ought to be getting tired of karma fortunes by now.Mrs_Often ought to be getting tired of karma fortunes by now.Mrs_Often ought to be getting tired of karma fortunes by now.
 
Mrs_Often's Avatar
 
Posts: 1,775
Karma: 2694823
Join Date: Dec 2011
Location: The Netherlands
Device: Kobo Touch, Glo, Clara HD
I noticed when syncing, if books are downloaded form Google Drive, the device will process contents immediately, even if the sync to the Kobo servers hasn't finished yet.

Is this OK? Would it not be safer to process content after the sync has completed?
Mrs_Often is offline   Reply With Quote
Old 02-18-2013, 07:20 AM   #53
davidfor
Grand Sorcerer
davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.
 
Posts: 24,908
Karma: 47303748
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
Quote:
Originally Posted by Mrs_Often View Post
Strange, are you saying the virtual SD card gets the Digital Editions directory, but a real physical SD seems to store its Digital Editions directory in main memory? Weird.
I haven't tried grive, so I don't know about the virtual SD card. I haven't seen a Digital Editions directory on my real SD cards. But, I also didn't find the annotations file in the main memory. They seem to be only in the database. Books in the main memory get an annotations file and database entries.
davidfor is offline   Reply With Quote
Old 02-18-2013, 08:23 AM   #54
spMatti
Member
spMatti is a marvel to beholdspMatti is a marvel to beholdspMatti is a marvel to beholdspMatti is a marvel to beholdspMatti is a marvel to beholdspMatti is a marvel to beholdspMatti is a marvel to beholdspMatti is a marvel to beholdspMatti is a marvel to beholdspMatti is a marvel to beholdspMatti is a marvel to behold
 
Posts: 20
Karma: 11978
Join Date: Feb 2013
Location: Finland
Device: Kobo Touch
Quote:
Originally Posted by Mrs_Often View Post
spMatti might it be possible to include in the script the possibility to assign one Google Drive folder (+ parent?) to by synced? This would solve all the mess. dgvirtual suggests a handy work around but as he says himself (oh, wait, she??) it is a lot of bother to have another account and another in-between.*
That would require change in grive (and grive isn't developed by me). Also I looked it once and it looked quite difficult.

Problem in the "send to google drive" script is that it uses DocsList.getFolder function that is quite unreliable in my opinion. It would be way easier to rewrite the script using DocsList.getFolderByID.

Edit: Here is the source code for "send to google drive" script.

Last edited by spMatti; 02-18-2013 at 08:31 AM. Reason: Added link to the script source code
spMatti is offline   Reply With Quote
Old 02-18-2013, 08:28 AM   #55
spMatti
Member
spMatti is a marvel to beholdspMatti is a marvel to beholdspMatti is a marvel to beholdspMatti is a marvel to beholdspMatti is a marvel to beholdspMatti is a marvel to beholdspMatti is a marvel to beholdspMatti is a marvel to beholdspMatti is a marvel to beholdspMatti is a marvel to beholdspMatti is a marvel to behold
 
Posts: 20
Karma: 11978
Join Date: Feb 2013
Location: Finland
Device: Kobo Touch
Quote:
Originally Posted by Mrs_Often View Post
I noticed when syncing, if books are downloaded form Google Drive, the device will process contents immediately, even if the sync to the Kobo servers hasn't finished yet.

Is this OK? Would it not be safer to process content after the sync has completed?
Good point. I don't know if it is OK. I haven't tested receiving books from Kobo and Google Drive in the same sync. Unfortunately I don't know how to detect when sync to the Kobo servers is finished. I will add this to issue list.
spMatti is offline   Reply With Quote
Old 02-18-2013, 09:58 AM   #56
Mrs_Often
Wizard
Mrs_Often ought to be getting tired of karma fortunes by now.Mrs_Often ought to be getting tired of karma fortunes by now.Mrs_Often ought to be getting tired of karma fortunes by now.Mrs_Often ought to be getting tired of karma fortunes by now.Mrs_Often ought to be getting tired of karma fortunes by now.Mrs_Often ought to be getting tired of karma fortunes by now.Mrs_Often ought to be getting tired of karma fortunes by now.Mrs_Often ought to be getting tired of karma fortunes by now.Mrs_Often ought to be getting tired of karma fortunes by now.Mrs_Often ought to be getting tired of karma fortunes by now.Mrs_Often ought to be getting tired of karma fortunes by now.
 
Mrs_Often's Avatar
 
Posts: 1,775
Karma: 2694823
Join Date: Dec 2011
Location: The Netherlands
Device: Kobo Touch, Glo, Clara HD
Quote:
Originally Posted by spMatti View Post
That would require change in grive (and grive isn't developed by me). Also I looked it once and it looked quite difficult.

Problem in the "send to google drive" script is that it uses DocsList.getFolder function that is quite unreliable in my opinion. It would be way easier to rewrite the script using DocsList.getFolderByID.

Edit: Here is the source code for "send to google drive" script.
Aahh sorry, I get confused as to what part is your hack and what part is Grive.

In that case indeed best to change the google script. However I'm afraid I'm not knowledgable enough to do that. I know html and some CSS... oh and some TeX, but that's about it.

But, the Digital Editions folder has not turned up yet (I also haven't read any of the books on my virtual SD), so currently I'm not running into problems. Maybe I'll have a closer look at whatever-the-script-language-is when I do get problems.

Thanks spMatti, also for putting the sync completion thing onto your issues list
Mrs_Often is offline   Reply With Quote
Old 02-18-2013, 12:43 PM   #57
hakan42
Zealot
hakan42 is on a distinguished road
 
hakan42's Avatar
 
Posts: 136
Karma: 60
Join Date: Jul 2009
Location: Munich, Germany
Device: Nook Classic rooted; Galaxy S IV with Aldiko, other older devices
I got the basic synchronization to work on my glo (firmware 2.3.0) but can't see them in my library :

On first sync, only an empty directory "dict" was created on the Google drive (inside the "koboExt" directory). This remained the same after a few sync attempts.

Then I put two epubs from my computer to the Google drive, and after sync, the files appeared on the glo Filesystem. The only thing is that they don't go into the books or the library list...
hakan42 is offline   Reply With Quote
Old 02-20-2013, 07:09 AM   #58
spMatti
Member
spMatti is a marvel to beholdspMatti is a marvel to beholdspMatti is a marvel to beholdspMatti is a marvel to beholdspMatti is a marvel to beholdspMatti is a marvel to beholdspMatti is a marvel to beholdspMatti is a marvel to beholdspMatti is a marvel to beholdspMatti is a marvel to beholdspMatti is a marvel to behold
 
Posts: 20
Karma: 11978
Join Date: Feb 2013
Location: Finland
Device: Kobo Touch
Quote:
Originally Posted by hakan42 View Post
Then I put two epubs from my computer to the Google drive, and after sync, the files appeared on the glo Filesystem. The only thing is that they don't go into the books or the library list...
Are you using external SD card? Current hack doesn't work with external SD card. If you are using external SD card everything should get synced to .grive-sync/sd folder, but books aren't visible in library, because the hack can't create bind mount from /mnt/sd.
spMatti is offline   Reply With Quote
Old 02-21-2013, 02:37 AM   #59
hakan42
Zealot
hakan42 is on a distinguished road
 
hakan42's Avatar
 
Posts: 136
Karma: 60
Join Date: Jul 2009
Location: Munich, Germany
Device: Nook Classic rooted; Galaxy S IV with Aldiko, other older devices
I am not aware of using an external card, the glo is still just like it came out of the box... If the slot on the lower left part is for a card, then I'm definitely not using one
hakan42 is offline   Reply With Quote
Old 02-23-2013, 10:40 AM   #60
Mrs_Often
Wizard
Mrs_Often ought to be getting tired of karma fortunes by now.Mrs_Often ought to be getting tired of karma fortunes by now.Mrs_Often ought to be getting tired of karma fortunes by now.Mrs_Often ought to be getting tired of karma fortunes by now.Mrs_Often ought to be getting tired of karma fortunes by now.Mrs_Often ought to be getting tired of karma fortunes by now.Mrs_Often ought to be getting tired of karma fortunes by now.Mrs_Often ought to be getting tired of karma fortunes by now.Mrs_Often ought to be getting tired of karma fortunes by now.Mrs_Often ought to be getting tired of karma fortunes by now.Mrs_Often ought to be getting tired of karma fortunes by now.
 
Mrs_Often's Avatar
 
Posts: 1,775
Karma: 2694823
Join Date: Dec 2011
Location: The Netherlands
Device: Kobo Touch, Glo, Clara HD
OFF TOPIC

I know this is off topic and also completely the wrong forum, strictly speaking, so sorry for that. But since we're talking about sycing Kobo with Google Drive and Google Drive with gmail attachments (which I also rudely snuck into this thread, sorry again )... I'd like to add some functionality.

I would like my Google Drive to collect 'the' epub from my instapaper (at http://www.instapaper.com/epub).

I've searched the web for recipes and scripts but can't find one that does what I want. Preferably it'd be a script in Google Drive that collects the epub and puts it in the Drive, similar to the script that collects mail attachments. However, I'm not knowledgable enough to make one. Anyone interested and smart/knowledgable enough to have a go?
Mrs_Often is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem setting up shared library on Google Drive CyberPotato Library Management 5 02-04-2013 05:01 PM
Google Drive Incompatable with Calibre! Yack Related Tools 10 02-02-2013 05:37 AM
Problem Sync with Ez PDF and Google Drive cptnemo Android Devices 0 09-27-2012 09:33 PM
Reading epub in Google Drive alexul Reading and Management 1 09-21-2012 03:39 AM
PRS-T1 Google Drive JB. Sony Reader Dev Corner 1 04-25-2012 08:02 PM


All times are GMT -4. The time now is 05:04 AM.


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