Help:Tracklist editor

From MixesDB
(Redirected from Help:Tracklist Editor)
Jump to navigationJump to search

The Tracklist Editor helps formatting copied or self-written tracklists.

It will capitalize words, fix spelling mistakes and (try to) order track names by the standard tracklist format.

Note that some sites like BBC require a format fix. This is done via a Javascript solution for your browser.

Buttons menu

The "Standard"-button fixes most of the tracklists easily. The other buttons are for everything that can not be recognized and fixed automatically.

Hover the mouse over the button for a short description tooltip.

Some buttons like "Flip () []" can have an effect on selected text only (or all text if none is selected). Such buttons have a neon green background when you hover the mouse over them.

Shortcuts

  • Submit "Standard": Ctrl + Space or Ctrl + Return
  • Capitalize selected text: Select text + Alt + C
  • "Replace"-button: Alt + R
  • "Undo"/"Redo"-button: Alt + U (You can also try your browser's "Back"-button)
  • Close window: Ctrl + W

You could also use the tab-button to jump from one element to the other.

Replace text

In the first of the 2 small text boxes enter the text you want to find, in the 2nd add the text it should be replaced with.

To delete text, simply keep the 2nd box empty. You can also find and replace multiple rows.

Regex

Regex means "regular expressions". These are powerful to match text with conditional rules. A quick tutorial is worth it.

The regex code is used in the first text box to match the text.

Note: Some special characters are used as regex commands: ( ) [ | ? . ^ $ \ * +. If you want to match such, you have to escape them by prepending \, e.g. \(foo\) to match "(foo)".

Examples (see also this basic syntax reference):

  • . matches any character
  • \d matches a digit (0-9)
  • \D matches a non-digit
  • * matches an item 0 or more times
  • + matches an item 1 or more times
    • Example: ^\d+ matches one or more numbers at the binning of a row.
    • Difference to *: Ab* and Ab+ both match the text "Abbb", but Ab* also matches "A" in the text "Ac" while Ab+ doesn't
  • ? matches an item 0 or 1 times (makes it optional), e.g. DJs? matches "DJ" and "DJs"
  • \s matches a blank space, a tab (\t) and a line break
  • Character classes: match a group of possible charcters (special characters don't need to be escaped inside a class)
    • [A-Z] matches all upper case characters for A−Z (English alphabet only, no characters from foreign languages)
    • [0-9] matches all numbers for 0−9 (same as \d)
    • [a-z1-3.?!] matches all lower case characters, the numbers 1-3 and the characters ., ? or !
  • \([0-9] matches the first number after an opening round bracket (Note: ( is a special character and needs to escaped with prepended \)
  • Choices:
    • (foo|bar) matches the words "foo" or "bar"
    • (\(|\[) matches "(" or "["
    • Choices with character classes: [chr]at matches the words "cat" or "hat" or "rat"
  • Limits: [A-Z]{3,5} matches 3−5 upper case letters in a row (for X up to unlimited use e.g. {2,})
  • ^# matches "#" at the beginning of a row
  • ]$ matches "]" at the end of a row
  • Groups: Anything inside round brackets is a group
    • 2(nd)? matches "2" and "2nd"
    • DJ[sz]? matches "DJ", "DJs" and "DJz"
    • Captured groups: Matched groups are numbered and can be called by $X, e.g. on A - 123 match ^(.*) - (\d+)$ and switch the order by replacing it with $2 - $1
  • Followed by: x(?=y) matches "x" only if "x" is followed by "y"
    • Not followed by: x(?!y)

To match text in upper or lower case you can use the "Case-insensitive" checkbox.

In case you're browsing the web about regex: We use Javascript regex (aka "RegExp") here.

Sandbox to play with regex: regex101.com