Commit Graph

19 Commits

Author SHA1 Message Date
61d902d715 Overhaul transform logic
-re-> arrows now rename their parent directories (like -->) and don't require a
full match (like -exact->). Their old behaviour is available as -exact-re->.

Also, this change adds the ">>" arrow head, which modifies the current path and
continues to the next rule when it matches.
2021-06-09 22:45:52 +02:00
fc31100a0f Always use '/' as path separator for regex rules
Previously, regex-matching paths on windows would, in some cases, require four
backslashes ('\\\\') to escape a single path separator. That's just too much.

With this commit, regex transforms now use '/' instead of '\' as path separator,
meaning rules can more easily be shared between platforms (although they are not
guaranteed to be 100% compatible since on Windows, '\' is still recognized as a
path separator).

To make rules more intuitive to write, local relative paths are now also printed
with '/' as path separator on Windows. Since Windows also accepts '/' as path
separator, this change doesn't really affect other rules that parse their sides
as paths.
2021-06-04 18:12:45 +02:00
6fa9cfd4c3 Fix error when capturing group is None 2021-05-27 15:41:00 +02:00
80acc4b50d Implement new name arrows 2021-05-27 13:43:02 +02:00
40144f8bd8 Fix rule error messages 2021-05-25 15:47:09 +02:00
f68849c65f Fix rules not being parsed entirely 2021-05-25 15:42:46 +02:00
25e2abdb03 Improve transformer explain wording 2021-05-23 11:45:14 +02:00
803e5628a2 Clean up logging
Paths are now (hopefully) logged consistently across all crawlers
2021-05-23 11:37:19 +02:00
6fe51e258f Number rules starting at 1 2021-05-23 10:45:37 +02:00
e724ff7c93 Fix normal arrow 2021-05-22 20:44:59 +00:00
62f0f7bfc5 Explain crawling and partially explain downloading 2021-05-22 20:39:57 +00:00
9cb2b68f09 Fix arrow parsing error messages 2021-05-22 20:39:29 +00:00
1bbc0b705f Improve transformer error handling 2021-05-22 20:38:56 +00:00
a6fdf05ee9 Allow variable whitespace in arrow rules 2021-05-15 15:25:05 +02:00
f897d7c2e1 Add name variants for all arrows 2021-05-15 15:25:05 +02:00
b0f731bf84 Make crawlers use transformers 2021-05-15 15:25:05 +02:00
e7a51decb0 Elaborate on transforms and implement changes 2021-04-29 20:24:18 +02:00
f776186480 Use PurePath instead of Path
Path should only be used when we need to access the file system. For all other
purposes (mainly crawling), we use PurePath instead since the paths don't
correspond to paths in the local file system.
2021-04-29 20:20:25 +02:00
3a74c23d09 Implement transformer 2021-04-29 09:51:50 +02:00