fsantini / KoboCloud

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

Fix Box support (grep Perl regex not available in Kobo) #82

Closed pedrosousa closed 3 years ago

pedrosousa commented 3 years ago

(tl;dr Fixing my own mistakes.)

I initially contributed Box.com support, but failed to test it properly on my Kobo device. The tests passed, but grep -P is not supported in Kobo devices, as @VPeeters noticed and tried to fix in PR #75 (later reverted in PR #76 probably because then the tests started failing).

I'm now contributing a fix for this issue. The script for Box.com now uses grep -E as other scripts do, but had to use a different regular expression. The new regex seems more prone to breaking, but at least it doesn't require Perl's regex lazy matching ability.

Tested on a Kobo Libra H2O. Please let me know if there are any remaining issues, because I only have access to one Kobo device for testing.