config.lua 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. --[[ Demlo configuration file
  2. All the commandline options can get a default value from here.
  3. Commandline values take precedence.
  4. --]]
  5. -- Colors may not work on all terminals.
  6. Color = true
  7. -- Number of cores to use (0 for all).
  8. Cores = 0
  9. --[[ When the destination exit, the "exist" action is taken.
  10. An action is a Lua script which sets the variable 'output.write' to the following possible values:
  11. - "overwrite": overwrite.
  12. - "skip": don't do anything.
  13. - nil (or anything else): append a random suffix to the new file.
  14. The following variable specifies the path or name of the default action script.
  15. --]]
  16. Exist = ''
  17. -- Extensions to look for when a folder is browsed.
  18. -- The following variable is a map which keys are the extensions and the values are 'true'.
  19. Extensions = {}
  20. ext = {'aac', 'ape', 'flac', 'm4a', 'mp3', 'mp4', 'mpc', 'ogg', 'wav', 'wv'}
  21. for _, v in ipairs(ext) do
  22. Extensions[v]=true
  23. end
  24. -- Whther to fetch cover from an online database.
  25. -- Since Internet queries slow down the process, it's recommended to only turn
  26. -- it on from the commandline when needed.
  27. Getcover = false
  28. -- Fetch tags from an online database.
  29. -- Since Internet queries slow down the process, it's recommended to only turn
  30. -- it on from the commandline when needed.
  31. Gettags = false
  32. -- Lua code to run before and after the other scripts, respectively.
  33. Prescript = ''
  34. Postscript = ''
  35. -- If false, show preview and exit before processing.
  36. Process = false
  37. -- Scripts to run by default.
  38. -- Scripts can later be added or removed via the commandline.
  39. -- Demlo runs them in lexicographic order.
  40. -- Thus the names matter, e.g. 'path' can be influenced by the modifications
  41. -- made by 'tag', so we name the scripts with a prefix number so that 'tag' is
  42. -- run before 'path'.
  43. Scripts = {'10-tag-normalize', '15-tag-disc_from_path', '20-tag-replace', '30-tag-case', '40-tag-punctuation', '50-encoding', '58-path-newlib', '60-path', '70-cover',
  44. '00-tag-const', '51-encoding-flac2ogg', '59-humour'}