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 08-06-2021, 09:50 AM   #1
Tattvadarzin
Member
Tattvadarzin makes transoceanic flights without the assistance of an airplaneTattvadarzin makes transoceanic flights without the assistance of an airplaneTattvadarzin makes transoceanic flights without the assistance of an airplaneTattvadarzin makes transoceanic flights without the assistance of an airplaneTattvadarzin makes transoceanic flights without the assistance of an airplaneTattvadarzin makes transoceanic flights without the assistance of an airplaneTattvadarzin makes transoceanic flights without the assistance of an airplaneTattvadarzin makes transoceanic flights without the assistance of an airplaneTattvadarzin makes transoceanic flights without the assistance of an airplaneTattvadarzin makes transoceanic flights without the assistance of an airplaneTattvadarzin makes transoceanic flights without the assistance of an airplane
 
Posts: 18
Karma: 55146
Join Date: Oct 2013
Location: UK
Device: Kobo Clara HD, Android Tablet
ExcludeSyncFolders Syntax and Kobo Directories

I understand the concept and am playing with my own bespoke versions:
  • ^\\(?!Library$) exclude all except the folder \Library (I organise my books for clarity into a top level directory called Library. For me this is the simplest if not the most general solution.)
  • ^\\(\..+|fonts|icons)$ exclude any top level directory starting with a . or called fonts or icons

I do know about (\\.(?!kobo|adobe).*?|([^.][^/]*/)+\\..+) but from what I can see it is interestingly complicated and inadequate assuming you want to exclude fonts and icons (sorry if I am treading on toes here - I just want to understand and I am a newbie of a few days).

I could spend a lot of time experimenting but my questions may be able to be answered quickly here.
  1. Is the OS character for a new subdirectory level \ or /?
  2. If the text after the = is not preceded by \ or even .\ does the OS assume the top level? I.e. are Library, \Library, .\Library treated as the top level directory called Library?
  3. Is the exclusion a full path exclusion or are subdirectories automatically excluded? I.e. does excluding \MyFolder exclude files in MyFolder and recursively files in its subdirectories?
  4. What is special about the characters . and / that the "standard" exclusion regex part ([^.][^/]*/)+\\..+) seems to care about? (I know typically . means the current directory and as for / see above questions.)

Thanks in advance for reading this far.

Last edited by Tattvadarzin; 08-06-2021 at 10:12 AM.
Tattvadarzin is offline   Reply With Quote
Old 08-06-2021, 11:27 AM   #2
DNSB
Bibliophagist
DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.
 
DNSB's Avatar
 
Posts: 15,762
Karma: 76463049
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Forma, Clara HD, Nexus 7 HD, iPad Pro, Tolino epos
For a bit of history on the ExcludeSyncFolders option, you can read the Prevent Kobo from importing dotfiles/folders . The area of interest starts around message #10.

Good judgement comes from experience, experience comes from bad judgement
DNSB is offline   Reply With Quote
Advert
Old 08-06-2021, 05:04 PM   #3
geek1011
Wizard
geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.
 
Posts: 2,460
Karma: 5070984
Join Date: May 2016
Location: Ontario, Canada
Device: Kobo Mini, Aura Edition 2 v1, Clara HD
Quote:
Is the OS character for a new subdirectory level \ or /?
Forward slash.

Quote:
If the text after the = is not preceded by \ or even .\ does the OS assume the top level? I.e. are Library, \Library, .\Library treated as the top level directory called Library?
Quote:
Is the exclusion a full path exclusion or are subdirectories automatically excluded? I.e. does excluding \MyFolder exclude files in MyFolder and recursively files in its subdirectories?
I don't remember (although I'll probably be looking at this later this week for an unrelated project doing stuff with Kobo sync). The KOBOeReader partition is mounted on /mnt/onboard.

Also, you'll probably find answers to those on the original thread from a while ago.


Quote:
[*]What is special about the characters . and / that the "standard" exclusion regex part ([^.][^/]*/)+\\..+) seems to care about? (I know typically . means the current directory and as for / see above questions.)
It's for Unix-style hidden folders/files, which start with a period. I've attached a diagram of the regexp.


Also, if you don't want to deal with this stuff, I have a mod which works on pretty much any firmware version that deals with this from the outside. https://github.com/pgaskin/kobo-mods...otfile-hack-ng
Attached Thumbnails
Click image for larger version

Name:	image.png
Views:	61
Size:	24.3 KB
ID:	188568  
geek1011 is offline   Reply With Quote
Old 08-06-2021, 06:41 PM   #4
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: 12,004
Karma: 21222339
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW & PW2; Kobo H2O, Forma & Elipsa
Quote:
Originally Posted by Tattvadarzin View Post
If the text after the = is not preceded by \ or even .\ does the OS assume the top level? I.e. are Library, \Library, .\Library treated as the top level directory called Library?
Yep, this is actually sandwitched between a ^/mnt/onboard/ and a $ (or something to that effect), so, no need for a leading path separator. (And if you mistakenly duplicate it, I'm fairly sure Qt will optimize it away).

Quote:
Originally Posted by Tattvadarzin View Post
Is the exclusion a full path exclusion or are subdirectories automatically excluded? I.e. does excluding \MyFolder exclude files in MyFolder and recursively files in its subdirectories?
IIRC, an excluded path won't be traversed, effectively blacklisting everything under it. (I may have a post with more details on that specific point in the threads @geek1011 mentioned. And/or in the commit message of the latest regex update in KFMon's OCP scripts).

Last edited by NiLuJe; 08-07-2021 at 11:00 AM.
NiLuJe is offline   Reply With Quote
Old 08-07-2021, 10:39 AM   #5
Tattvadarzin
Member
Tattvadarzin makes transoceanic flights without the assistance of an airplaneTattvadarzin makes transoceanic flights without the assistance of an airplaneTattvadarzin makes transoceanic flights without the assistance of an airplaneTattvadarzin makes transoceanic flights without the assistance of an airplaneTattvadarzin makes transoceanic flights without the assistance of an airplaneTattvadarzin makes transoceanic flights without the assistance of an airplaneTattvadarzin makes transoceanic flights without the assistance of an airplaneTattvadarzin makes transoceanic flights without the assistance of an airplaneTattvadarzin makes transoceanic flights without the assistance of an airplaneTattvadarzin makes transoceanic flights without the assistance of an airplaneTattvadarzin makes transoceanic flights without the assistance of an airplane
 
Posts: 18
Karma: 55146
Join Date: Oct 2013
Location: UK
Device: Kobo Clara HD, Android Tablet
Thanks all. I will read the indicated thread (I may be some time ).

Here is what I ended up with:
[FeatureSettings]
ExcludeSyncFolders=(fonts|icons|\\.(?!kobo|adobe). +|([^.][^/]*/)+\\..+)

Last edited by Tattvadarzin; 08-28-2021 at 11:56 AM.
Tattvadarzin is offline   Reply With Quote
Advert
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
I want to synchonize more than two Calibre directories with more than 10 directories lexcafe Library Management 1 04-15-2018 12:07 PM
Looking for patch to autosort shelves according to file directories inside kobo MrDrWatson Kobo Reader 3 01-21-2017 07:39 AM
Aura Using Sub-Directories on Kobo Aura One? Dusky Rose Kobo Reader 5 11-04-2016 05:10 AM
Odyssey directories Bookripper Bookeen 21 11-30-2012 08:03 AM


All times are GMT -4. The time now is 10:49 AM.


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