View Single Post
Old 08-05-2021, 03:46 PM   #6
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: 46,881
Karma: 169810634
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
Quote:
Originally Posted by Tattvadarzin View Post
But I do, I was the first C programmer in my country (Scotland, UK) when we had a PDP 11 running Unix, doing a computing Ph. D. in the late 70s. I first came across regular expressions round then. I am rusty now but I think there is a much simpler regex for my needs so I do need to understand. The example eliminates adobe and kobo directories starting with a dot. For me, who intends to put all his books in \Library, I can future proof any folder name changes by Kobo by excluding any folder not called Library.

Your rant has added no value to the thread. The need arises for future proofing not to mention the principle of simplicity. I am not a techno-illiterate sheep .

I'll try variations on ^\\(?!Library$)
You need to exclude multiple folders but allowing access to others so using the posted regex is simpler. BTW, the \\ is a \ which needs to be escaped. Unless you want to play with negative lookaheads, I would go with the posted solution.

If you haven't already hit this site, try regex101: build, test, and debug regex and select Python to test your regexes.

And sorry but Kobo only added the ExcludeSyncFolders. As for the folder name changes, Kobo hasn't done any name changes in quite a while and I think it's pretty safe to suggest that they won't.

And as Jon mentioned, when you change the excluded folders, your Kobo will remove the content that had been added to the library from those folders. So the simplest solution is to run the one-click install script.
DNSB is offline   Reply With Quote