Skip to content

How do I escape a forward slash in keywords? #3294

Answered by mikf
kattjevfel asked this question in Q&A
Discussion options

You must be logged in to vote

Your filename problem is most likely solved with e081b1f, which removes media/ from Nitter filenames.

As for your original question: Not possible.
You can change the "argument separator" from / to some other character with the format-separator option and then just use literal forward slashes as regular characters, but that option is global and affects everything else as well.
(I really need to implement a proper parser and better syntax for these format string options)

Alternatively, you could have used conditional format strings and removed the first 6 characters when filename starts with media/:

"filename.startswith('media/')": "{filename[6:]}.{extension}"

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@kattjevfel
Comment options

Answer selected by kattjevfel
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants