question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

How to escape parenthesis in the metadata fields?

See original GitHub issue

Checklist

Question

Hello,

Using this example: %(uploader|Unknown)s, I wonder how to escape () in the default value. For instance: %(uploader|Unknown \(foo\))s

Generally speaking, I’m trying to override/add missing metadata so I’m doing it this way:

--parse-metadata "%%(artist|%s)s:%%(meta_artist)s"

Where %s is replaced by a given artist value (which may contain parenthesis). If you know a better way of doing this, it would be helpful.

Thanks!

Verbose log

No response

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
pukkandancommented, Mar 14, 2022

Due to legacy reasons, Foo is interpretted as a field name here. Add a space to work around it

--parse-metadata " Foo: %(meta_artist)s"
1reaction
pukkandancommented, Mar 10, 2022

For instance: %(uploader|Unknown (foo))s

Not possible atm

–parse-metadata “%%(artist|%s)s:%%(meta_artist)s”

But this can be achieved using:

--parse-metadata "Unknown (foo):%(meta_artist)s" --parse-metadata "%(artist|)s:%(meta_artist)s"
Read more comments on GitHub >

github_iconTop Results From Across the Web

Escape characters in metadata properties
Hi. I'm trying to make dynamic metadata, therefore I need to pass recordDelimiter param (which is an escape character) to XML Writer task...
Read more >
4.16 Escape special characters | R Markdown Cookbook
You need to escape the underscores if you want verbatim underscores instead of italic text. The way to escape a special character is...
Read more >
Improper escaping of characters in text fields - Drupal
Metatag appears to improperly escape characters such as quotation marks in text fields. I have a hook (see below) that lets users enter...
Read more >
Allowed characters for metadata fields source and sourcetype
Solved: My question is simple: which characters are allowed for the values of the metadata fields source and sourcetype ? I could not...
Read more >
Escape brackets/periods/backslashes/quotes in input rank IDs ...
Escape brackets /periods/backslashes/quotes in input rank IDs and sample metadata fields, and in any "inputs" to plot JSONs #66.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found