fsantini / KoboCloud

A set of scripts to synchronize a kobo reader with popular cloud services
Other
1.01k stars 97 forks source link

HTML files won't download from google drive #104

Closed techCarpenter closed 2 years ago

techCarpenter commented 2 years ago

I want to be able to upload .html files to my google drive folder and then have them appear on my Kobo along with ebooks.

Right now, I can't get .html files to download from gdrive so I have to manually upload them via USB.

Is there something I've done wrong or can this functionality be added?

Looking forward to hearing your thoughts.

fsantini commented 2 years ago

Hi! I had a look at the code and it seems that html files should be downloaded too. Do you see the html files in your get.log file after a synchronization?

VPeeters commented 2 years ago

I'm not sure of this, but I believe KoboCloud doesn't care about file extensions (except for kepub). Are you certain they are not downloaded? Please upload the logs after reboot with a html file in your GDrive.

techCarpenter commented 2 years ago

@fsantini Okay! I don't see the html files in the log... just the 3 ebooks in the folder.

@VPeeters I figured that would be the case, but I don't see the html files in the Library folder. I have two html files in the GDrive folder and I've rebooted a few times with kobocloudrc changes after a html file was in the folder on GDrive.

Here's a copy of the get.log

fsantini commented 2 years ago

I think I found the problem: it's in lines 20 and 25 of getGDriveFiles.sh:

   entryName=`echo $entry | sed -n 's/\\\x5b\\\x22.*,\\\x22\(.*\)\\\x22,\\\x22application.*$/\1/p'`

That application refers to the filetype application/epub+zip which is the epub MIME format. To support html we should look for text/html... But on the other hand, it would be better to have a more general regular expression.

If I have some time to play with it I'll have a look.

techCarpenter commented 2 years ago

Terrific! Thanks for looking into this. I appreciate it.