Demlo: init
parent
8c69ee3b72
commit
d302dc7e72
|
@ -0,0 +1,56 @@
|
|||
-- Musila configuration file.
|
||||
|
||||
-- Clear unknown tags.
|
||||
cleartags = true
|
||||
|
||||
-- Remove embedded covers.
|
||||
clearcovers = true
|
||||
|
||||
-- We do not use colors by default since it may not work properly on all
|
||||
-- terminals. Feel free to turn it on if it works well on your system.
|
||||
colors = true
|
||||
|
||||
-- Words that will be written as is and will not be turned to titlecase.
|
||||
constants = ''
|
||||
-- French
|
||||
constants = constants .. ' un une de du le la les et mais pour ni ou à a où contre entre chez dans sur que qui '
|
||||
-- German
|
||||
constants = constants .. ' der die das den dem des ein eine einen eines einer wo an am in bei aus mit nach seit von zu vom zur zum durch für gegen ohne um '
|
||||
-- Music
|
||||
constants = constants .. " d'Acide JBX "
|
||||
|
||||
-- If true, extract covers from tags, copy covers in current folder, exclude those
|
||||
-- outside the size boundaries.
|
||||
covers = true
|
||||
|
||||
-- Default format.
|
||||
format = 'ogg'
|
||||
|
||||
-- Use human readable output instead of machine-friendly output.
|
||||
graphical = true
|
||||
|
||||
-- Root folder for output files.
|
||||
library = os.getenv('HOME') .. '/musics'
|
||||
|
||||
-- What to do if file exists.
|
||||
overwrite = false
|
||||
|
||||
-- If false, show preview and exit before processing.
|
||||
process = false
|
||||
|
||||
-- Re-encode.
|
||||
recode = true
|
||||
|
||||
-- Shall we recurse into subfolders when walking tree.
|
||||
recursive = true
|
||||
|
||||
-- Default search/replace script applied to all tags by the 'cleantags' function.
|
||||
replace = [[{
|
||||
['[{%[]'] = '(',
|
||||
['[%]}]'] = ')',
|
||||
}]]
|
||||
|
||||
-- You might want to set one of the official scripts by default.
|
||||
script = 'default'
|
||||
|
||||
-- End of configuration file.
|
|
@ -0,0 +1,53 @@
|
|||
-- X-Ray Dog
|
||||
-- WARNING: untested.
|
||||
|
||||
-- Remove all default tags.
|
||||
output.tags = {}
|
||||
o = output.tags
|
||||
|
||||
o.artist = 'X-Ray Dog'
|
||||
-- Albums actually have years, but is it relevent since they have a code?
|
||||
o.date = ''
|
||||
-- Genre could be Soundtrack, or Trailer Music. We choose '' for now.
|
||||
o.genre = ''
|
||||
|
||||
-- Extract album code, assuming parent folder is 'XRCD## - $album'.
|
||||
XRCD = i.filename:match ('/[^/]*(XRCD%d*)[^/]*/[^/]*$')
|
||||
|
||||
-- Append the album code to the constants array, other it will be capitalized.
|
||||
constants [XRCD:upper ()] = XRCD
|
||||
|
||||
o.album = i.album
|
||||
o.album:gsub ('XRCD - (%d+)', 'XRCD%1 - ')
|
||||
|
||||
o.title = i.title
|
||||
if empty (o.title) then
|
||||
o.title = i.filename:match ('[^/]+$')
|
||||
o.title = o.title:gsub ('%..+$', '')
|
||||
o.title = o.title:gsub ('X-Ray Dog[%s-]*', '')
|
||||
end
|
||||
|
||||
o.track = i.track
|
||||
if empty (o.track) then
|
||||
o.track = o.title:match ('%d+')
|
||||
end
|
||||
|
||||
cleantags (o)
|
||||
|
||||
-- Output filename
|
||||
output.filename = table.concat {library, '/', o.artist, '/',
|
||||
not empty (o.album) and (empty (o.date) and o.album .. '/' or o.date .. ' - ' .. o.album .. '/') or '',
|
||||
empty (track_padded) and '' or track_padded .. ' - ',
|
||||
o.title}
|
||||
|
||||
-- Options
|
||||
if o.album then
|
||||
output.cover_basename = o.album .. ' - Cover'
|
||||
else
|
||||
output.cover_basename = 'Cover'
|
||||
end
|
||||
output.cover_clear_embedded = true
|
||||
output.cover_discard_high = false
|
||||
output.cover_discard_low = true
|
||||
output.cover_limit_low = 100
|
||||
output.tags_clear = true
|
Loading…
Reference in New Issue