pathrender.py: Add module for extended path formatting

The pattern matching is loosely based on foobar2000 pattern syntax, i.e. the
notion of escaping characters with ' and optional elements enclosed in square
brackets [] is taken from there while the substitution variable names are
Perl-ish or sh-ish. The following syntax elements are supported:
 * escaped literal strings, that is everything that is enclosed within single
   quotes (like 'this');
 * substitution variables, which start with dollar sign ($) and extend until
   next non-alphanumeric+underscore character (like $This and $5_that).
 * optional elements enclosed in square brackets, which render nonempty value
   only if any variable or optional inside returned nonempty value, ignoring
   literals (like ['['$That']' ]).
This commit is contained in:
Andrzej Ciarkowski
2016-02-05 01:55:13 +01:00
parent ffd72ed6f7
commit 7ff27a42ca
3 changed files with 236 additions and 4 deletions
+1
View File
@@ -66,3 +66,4 @@ _ReSharper*/
/logs
.project
.pydevproject
.vscode