Kaynağa Gözat

init

tags/v1.0.0^0
Robin Thoni 6 yıl önce
işleme
20222a8e4a

+ 4
- 0
.gitignore Dosyayı Görüntüle

@@ -0,0 +1,4 @@
1
+*.swp
2
+data
3
+docker-compose.override.yml
4
+env_override

+ 26
- 0
abcde/Dockerfile Dosyayı Görüntüle

@@ -0,0 +1,26 @@
1
+FROM robinthoni/debian-multiarch:jessie
2
+
3
+ARG CONFIG_DIR=/etc/default/config-files/
4
+
5
+RUN apt-get update &&\
6
+    apt-get install -y ssmtp abcde eyed3 lame eject lshw &&\
7
+    apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* && \
8
+    rm /etc/cron.*/*
9
+
10
+COPY ./vars-vars /etc/vars-vars
11
+
12
+COPY ./vars-files /etc/vars-files
13
+
14
+COPY ./common.sh /common.sh
15
+
16
+COPY run.sh /run.sh
17
+
18
+RUN mkdir "${CONFIG_DIR}"
19
+
20
+COPY ./config "${CONFIG_DIR}"
21
+
22
+COPY ./bin /usr/local/bin
23
+
24
+WORKDIR /data/music
25
+
26
+CMD ["/run.sh"]

+ 38
- 0
abcde/bin/copy-cd-auto Dosyayı Görüntüle

@@ -0,0 +1,38 @@
1
+#! /usr/bin/env bash
2
+
3
+cdrom_status()
4
+{
5
+  out=$(lshw 2>/dev/null | awk '/\*-cd/,/con/' | sed -e 's/^[ \t]*//' | grep configuration | grep -Eo 'status=[^.]+' | cut -d'=' -f2)
6
+  echo $out
7
+}
8
+
9
+run_copy()
10
+{
11
+#  echo "copying..."
12
+#  sleep 2
13
+#  copy_result=1
14
+  abcde -a cddb,getalbumart,read,encode,tag,move,playlist,clean -V -x -N
15
+  copy_result="$?"
16
+  if [ "${copy_result}" -ne 0 ]
17
+  then
18
+    echo "Copy may have failed with code ${copy_result}"
19
+  else
20
+    echo "Copy has finished successfully"
21
+  fi
22
+}
23
+
24
+old_cdrom_status=""
25
+while :
26
+do
27
+  cdrom_status=$(cdrom_status)
28
+  if [ "${old_cdrom_status}" != "${cdrom_status}" ] && [ "${cdrom_status}" != "" ]
29
+  then
30
+    echo "CDROM drive status changed: ${cdrom_status}"
31
+    if [ "${cdrom_status}" == "ready" ]
32
+    then
33
+      run_copy
34
+    fi
35
+    old_cdrom_status="${cdrom_status}"
36
+  fi
37
+  sleep 1
38
+done

+ 41
- 0
abcde/common.sh Dosyayı Görüntüle

@@ -0,0 +1,41 @@
1
+export CONFIG_DIR="/etc/default/config-files/"
2
+
3
+resolv_host()
4
+{
5
+  hostname="${1}"
6
+  ip=$(getent hosts "${hostname}" | cut -d' ' -f1)
7
+  echo "${ip}"
8
+}
9
+
10
+replace_var()
11
+{
12
+  file="${1}"
13
+  var="${2}"
14
+  sed -e "s?${var}?${!var}?g" -i "${file}"
15
+}
16
+
17
+replace_vars()
18
+{
19
+  file="${1}"
20
+  for var in $(cat /etc/vars-vars)
21
+  do
22
+    replace_var "${file}" "${var}"
23
+  done
24
+}
25
+
26
+replace_files()
27
+{
28
+  cat /etc/vars-files | while read line
29
+  do
30
+    filesrc="${CONFIG_DIR}$(echo "${line}" | awk '{print $1}')"
31
+    filedst=$(echo "${line}" | awk '{print $2}')
32
+    if [ -f "${filesrc}" ]
33
+    then
34
+      echo "Expanding file ${filesrc} to ${filedst}"
35
+      cp "${filesrc}" "${filedst}"
36
+      replace_vars "${filedst}"
37
+    else
38
+      echo "File ${filesrc} does not exist. Skipping."
39
+    fi
40
+  done
41
+}

+ 554
- 0
abcde/config/abcde.conf Dosyayı Görüntüle

@@ -0,0 +1,554 @@
1
+# System defaults for abcde version 2.8.1
2
+# Nothing in this file is uncommented by default.
3
+#
4
+# If you wish to override these system-wide settings, create your own
5
+# .abcde.conf file in your home directory.
6
+
7
+# CDDB options
8
+# Choose whether you want to use "cddb" and/or "musicbrainz". Default
9
+# is "musicbrainz", but both can be specified in a comma delimited list
10
+# to be tried sequentially in the event of failure of the first
11
+# search.
12
+CDDBMETHOD=cddb
13
+
14
+# If you wish to use a different CDDB server, edit this line.
15
+# If you just wanted to use a proxy server, just set your http_proxy
16
+# environment variable - wget will use it correctly.
17
+CDDBURL="http://freedb.freedb.org/~cddb/cddb.cgi"
18
+
19
+# The CDDB protocol level.
20
+# Right now 5 is latin1 output and 6 is UTF8 encoding.
21
+CDDBPROTO=6
22
+
23
+# The CDDB protocol requires hello information, including a valid username
24
+# and hostname. If you feel paranoid about giving away such info, edit this
25
+# line - the format is username@hostname.
26
+HELLOINFO="`whoami`@`hostname`"
27
+
28
+# This controls the email address CDDB changes are submitted to.
29
+#CDDBSUBMIT=freedb-submit@freedb.org
30
+
31
+# The following options control whether or not fetched CDDB entries
32
+# are cached locally in $CDDBLOCALDIR
33
+CDDBCOPYLOCAL="y"
34
+CDDBLOCALDIR="$HOME/.cddb"
35
+CDDBLOCALRECURSIVE="y"
36
+
37
+# If NOSUBMIT is set to y, then abcde will never prompt asking if you
38
+# wish to submit your edited cddb file.
39
+#NOSUBMIT=n
40
+
41
+# If NOCDDBQUERY is set to y, then abcde will never even try to access
42
+# the CDDB server; running abcde will automatically drop you into a
43
+# blank cddb file to edit at your leisure.  This is the same as the
44
+# -n option.  NOCDDBQUERY=y implies NOSUBMIT=y.
45
+#NOCDDBQUERY=n
46
+
47
+# Select here if you want to use the locally stored CDDB entries.
48
+# This is useful if you do a lot of editing to those CDDB entries.
49
+# Also, other tools like Grip store CDDB entries under $HOME/.cddb,
50
+# so they can be reused when ripping CDs. (If this is set to "y" make
51
+# sure that CDDBLOCALRECURSIVE is also set to "y".)
52
+#CDDBUSELOCAL="n"
53
+
54
+# List, separated with a comma, the fields we want the parsing function to
55
+# output. Defaults to YEAR and GENRE, for a complete list of fields provided by
56
+# CDDB.
57
+# The fields are not case sensitive. Actually, "y,g" will work as fine as "Y,G"
58
+# or "YEAR, GENRE"
59
+#SHOWCDDBFIELDS=year,genre
60
+
61
+# Specify the style of encoder to use here -
62
+# oggenc, vorbize - for OGGENCODERSYNTAX
63
+# lame, gogo, bladeenc, l3enc, xingmp3enc, mp3enc - for MP3ENCODERSYNTAX
64
+# flac - the only supported for FLACENCODERSYNTAX at the moment
65
+# speexenc - the only encoder for SPEEXENCODERSYNTAX
66
+# mpcenc - encoder for MPCENCODERSYNTAX
67
+# wavpack, ffmpeg - encoder for WVENCODERSYNTAX
68
+# mac - for APENCODERSYNTAX
69
+# fdkaac, ffmpeg, neroAacEnc, faac, qaac, fhgaacenc - for AACENCODERSYNTAX
70
+# opusenc - for OPUSENCODERSYNTAX
71
+# twolame, ffmpeg - for MP2ENCODERSYNTAX
72
+# tta, ttaenc - for TTAENCODERSYNTAX
73
+# default is a valid option for oggenc, lame, flac, speexenc, mpcenc, wavpack,
74
+# fdkaac, opus, twolame and tta. Currently this affects the default location of the
75
+# binary, the variable to pick encoder command-line options from, and where
76
+# the options are given.
77
+#MP3ENCODERSYNTAX=default
78
+#OGGENCODERSYNTAX=default
79
+#FLACENCODERSYNTAX=default
80
+#SPEEXENCODERSYNTAX=default
81
+#MKAENCODERSYNTAX=default
82
+#MPCENCODERSYNTAX=default
83
+#WVENCODERSYNTAX=default
84
+#APENCODERSYNTAX=default
85
+#AACENCODERSYNTAX=default
86
+#OPUSENCODERSYNTAX=default
87
+#MP2ENCODERSYNTAX=default
88
+#TTAENCODERSYNTAX=default
89
+
90
+# Specify the syntax of the normalize binary here - so far only 'normalize'
91
+# is supported.
92
+#NORMALIZERSYNTAX=default
93
+
94
+# CD reader program to use - currently recognized options are 'cdparanoia',
95
+# 'libcdio' (cd-paranoia),'icedax', 'cdda2wav', 'dagrab', 'pird',
96
+# 'cddafs' (Mac OS X only) and 'flac'.
97
+#CDROMREADERSYNTAX=cdparanoia
98
+
99
+# CUE reader syntax for the CUE reader program to use.
100
+# abcde supports 2 CUE modes: 'mkcue' and 'abcde.mkcue' so you can set the
101
+# MKCUE variable accordingly. The 'abcde.mkcue' uses an internal
102
+# implementation, without the need of an external program.
103
+#CUEREADERSYNTAX=default
104
+
105
+# Specify the program to convert a CUE sheet back to a CD disc ID for CDDB queries.
106
+# Select between '/path/to/cue2discid' (provided as an example) or
107
+# 'abcde.cue2discid', implemented internaly.
108
+#CUE2DISCID=abcde.cue2discid
109
+
110
+# Keep the wav files after encoding. Set it to "y" and remove "clean" from
111
+# the list of default actions, since we purge the temp directory as default.
112
+#KEEPWAVS=n
113
+
114
+# Track padding: force abcde to pad tracks using 0, so every song uses a two
115
+# digit entry. If set to "y", even a single song encoding outputs a file like
116
+# 01.my_song.ext
117
+#PADTRACKS=n
118
+
119
+# Define if you want abcde to be non-interactive.
120
+# Keep in mind that there is no way to deactivate it right now in the command
121
+# line, so setting this option makes abcde to be always non-interactive.
122
+#INTERACTIVE=n
123
+
124
+# Specify 'nice'ness of the encoder, the CD reader and the distmp3 proc.
125
+# This is a relative 'nice'ness (that is, if the parent process is at a
126
+# nice level of 12, and the ENCNICE is set to 3, then the encoder will
127
+# run with an absolute nice value of 15. Note also, that setting these
128
+# to be empty will result in some default niceness increase (4 in tcsh
129
+# and 10 using the bsdutils' nice).
130
+#ENCNICE=10
131
+#READNICE=10
132
+#DISTMP3NICE=10
133
+
134
+# Paths of programs to use
135
+
136
+# Encoders:
137
+#LAME=lame
138
+#GOGO=gogo
139
+#BLADEENC=bladeenc
140
+#L3ENC=l3enc
141
+#XINGMP3ENC=xingmp3enc
142
+#MP3ENC=mp3enc
143
+#VORBIZE=vorbize
144
+#OGGENC=oggenc
145
+#FLAC=flac
146
+#SPEEXENC=speexenc
147
+#MPCENC=mpcenc
148
+#WVENC=wavpack
149
+#APENC=mac
150
+#FAAC=faac
151
+#NEROAACENC=neroAacEnc
152
+#FDKAAC=fdkaac
153
+#OPUSENC=opusenc
154
+#TWOLAME=twolame
155
+# Note that if you use avconv rather than FFmpeg give the
156
+# path to avconv here (e.g. FFMPEG=/usr/bin/avconv):
157
+# FFMPEG=ffmpeg
158
+#TTA=tta
159
+#TTAENC=ttaenc
160
+
161
+# The path for qaac, refalac and fhgaacenc  can be problematic as abcde
162
+# cannot cope with the 'standard' Wine location with spaces. For example:
163
+# "$HOME/.wine/drive_c/Program\ Files/qaac/qaac.exe" is problematic. Try instead:
164
+# "$HOME/.wine/drive_c/qaac/qaac.exe"
165
+# Installation instructions for qaac, refalac and fhgaacenc here:
166
+#    http://www.andrews-corner.org/linux/qaac.html
167
+#    http://www.andrews-corner.org/linux/fhgaacenc.html
168
+# (Hint: Use QAAC=refalac to use the Open Source alac encoder...)
169
+#QAAC=qaac
170
+#FHGAACENC=fhgaacenc
171
+
172
+# Taggers, rippers, replaygain etc:
173
+#ID3=id3
174
+#ID3V2=id3v2
175
+#MID3V2=mid3v2
176
+#EYED3=eyeD3
177
+#CDPARANOIA=cdparanoia
178
+#CD_PARANOIA=cd-paranoia
179
+#CDDA2WAV=icedax
180
+#PIRD=pird
181
+#CDDAFS=cp
182
+#CDDISCID=cd-discid
183
+#CDDBTOOL=cddb-tool
184
+#EJECT=eject
185
+#MD5SUM=md5sum
186
+#DISTMP3=distmp3
187
+#VORBISCOMMENT=vorbiscomment
188
+#METAFLAC=metaflac
189
+#NORMALIZE=normalize-audio
190
+#CDSPEED=eject
191
+#VORBISGAIN=vorbisgain
192
+#MKCUE=mkcue
193
+#MKTOC=cdrdao
194
+#DIFF=diff
195
+#WVGAIN=wvgain
196
+#APETAG=apetag
197
+#GLYRC=glyrc
198
+#IDENTIFY=identify
199
+#CONVERT=convert
200
+#DISPLAYCMD=display
201
+#WINE=wine
202
+
203
+# Options to call programs with:
204
+
205
+# If HTTPGET is modified, the HTTPGETOPTS options should also be defined
206
+# accordingly. If HTTPGET is changed, the default options will be set,
207
+# if HTTPGETOPTS is empty or not defined.
208
+#HTTPGET=wget
209
+# for fetch (FreeBSD): HTTPGETOPTS="-q -o -"
210
+# for wget: HTTPGETOPTS="-q -nv -O -"
211
+# for curl (MacOSX): HTTPGETOPTS="-f -s"
212
+#HTTPGETOPTS="-q -O -"
213
+
214
+# MP3:
215
+# For the best LAME encoder options have a look at:
216
+# <http://wiki.hydrogenaudio.org/index.php?title=LAME#Recommended_encoder_settings>
217
+# A good option is '-V 0' which gives Variable Bitrate Rate (VBR) recording
218
+# with a target bitrate of ~245 Kbps and a bitrate range of 220...260 Kbps.
219
+#LAMEOPTS=
220
+#GOGOOPTS=
221
+# Bladeenc still works with abcde in 2015, and the last release of bladeenc
222
+# was in 2001! Settings that will produce a great encode are: '-br 192' 
223
+#BLADEENCOPTS=
224
+# L3enc still works with abcde in 2015, pretty amazing when you realise 
225
+# that the last release of l3enc was in 1997! Settings that will produce 
226
+# a great encode are: '-br 256000 -hq -crc'
227
+#L3ENCOPTS=
228
+#XINGMP3ENCOPTS=
229
+# And mp3enc also still works with abcde in 2015 with the last release
230
+# of mp3enc in 1998! Settings that will produce a great encode, albeit
231
+# a slow one, are: '-v -br 256000 -qual 9 -no-is -bw 16500'
232
+#MP3ENCOPTS=
233
+
234
+# Ogg:
235
+#VORBIZEOPTS=
236
+#OGGENCOPTS=
237
+
238
+# FLAC:
239
+# The flac option is a workaround for an error where flac fails
240
+# to encode with error 'floating point exception'. This is flac 
241
+# error in get_console_width(), corrected in flac 1.3.1
242
+#FLACOPTS="--silent"
243
+# Options passed to MetaFlac for ReplayGain tags:
244
+#FLACGAINOPTS="--add-replay-gain"
245
+# Speex:
246
+#SPEEXENCOPTS=
247
+
248
+# MPP/MP+ (Musepack):
249
+# For the encoder options look at 'mpcenc --longhelp', consider
250
+# setting '--extreme' for a good quality encode.
251
+#MPCENCOPTS=
252
+
253
+# WavPack:
254
+# Look at 'wavpack --help' for detailed options, consider using '-hx3' 
255
+# for a good quality encode
256
+#WAVENCOPTS=
257
+# For Wavpack replay gain we set both the default of 'track gain' 
258
+# as well as this option for 'album gain'. Better media players
259
+# such as vlc can select either or neither.    
260
+#WVGAINOPTS='-a'
261
+
262
+# Monkey's Audio (ape)
263
+# Without this set mac chokes unfortunately. Choices
264
+# are from 1000 to 5000.
265
+#APENCOPTS='-c4000'
266
+
267
+# M4A/AAC
268
+# There are now 6 AAC encoders available to abcde, the default being
269
+# fdkaacenc. Note that the old AACENCOPTS has been rendered obsolete by
270
+# the following options, new to abcde 2.7:
271
+#  1. fdkaac: see 'fdkaac --help' and consider using 
272
+#     '--profile 2 --bitrate-mode 5 --afterburner 1'
273
+#     for a good quality encode. 
274
+#FDKAACENCOPTS='--bitrate 192k'
275
+#  2. FFmpeg: Use the following to use the FFmpeg native encoder, adding
276
+#     -strict -2 if you have an older FFmpeg:
277
+#     FFMPEGENCOPTS="-c:a aac -b:a 192k"
278
+#  3. neroAacEnc: see 'neroAacEnc -help' and
279
+#     consider using '-q 0.65' for a good quality encode.
280
+#NEROAACENCOPTS=
281
+#  4. faac: see 'faac --long-help' and consider
282
+#     using '-q 250' for a good quality encode.
283
+#FAACENCOPTS=
284
+#  5. qaac: simply run 'wine qaac.exe' to see all options and
285
+#     consider using '--tvbr 100' for a good quality
286
+#     encode or '--alac' for Apple Lossless Audio Codec
287
+#QAACENCOPTS=
288
+#  6. fhgaacenc: simply run 'wine fhgaacenc.exe' to see all options.
289
+#     consider using '--vbr 4' for a decent quality encode.
290
+#FHGAACENCOPTS=
291
+
292
+# True Audio
293
+# This is a lossless format so no options of any note available:
294
+#TTAENCOPTS=
295
+
296
+# OPUS
297
+# For the encoder options look at: 'opusenc -h'
298
+#OPUSENCOPTS=
299
+
300
+# MP2
301
+# Currently uses either twolame or ffmpeg, for twolame options look at:
302
+# 'twolame --help',a highly recommended setting is "--bitrate 320".
303
+#TWOLAMENCOPTS=
304
+
305
+# FFmpeg or avconv can be used for several audio codecs, as well as being
306
+# the default encoder for the Matroska container mka::
307
+# 1. Encoding to WavPack (FFmpeg only: avconv does not have a native encoder).
308
+#    Consider setting the following with a compression_level between 0-8:
309
+#    FFMPEGENCOPTS="-c:a wavpack -compression_level 6"
310
+# 2. Encoding to ALAC (both FFmpeg and avconv have a native encoder).
311
+#    Consider using the following for either FFmpeg and avconv:
312
+#    FFMPEGENCOPTS="-c:a alac"
313
+# 3. Encoding to mp2
314
+#    Consider using the following for either FFmpeg and avconv:
315
+#    FFMPEGENCOPTS="-c:a mp2 -b:a 320k"
316
+#FFMPEGENCOPTS=
317
+
318
+# mp3 tagging:
319
+# There are three ways to tag MP3 files:
320
+#   1. id3v1 (with id3)
321
+#   2. id3v2.3 (with id3v2)
322
+#   3. id3v2.4 (with eyeD3) This is the default
323
+# Use ID3TAGV to select one of the older formats:
324
+#ID3TAGV=id3v2.4
325
+#ID3OPTS=
326
+#ID3V2OPTS=
327
+#EYED3OPTS="--set-encoding=utf16-LE"
328
+
329
+# Other options:
330
+# The variable CDPARANOIOPTS is also used by GNU's cd-paranoia,
331
+# so use this when setting CDROMREADERSYNTX=libcdio.
332
+#CDPARANOIAOPTS=
333
+#CDDA2WAVOPTS=
334
+#PIRDOPTS="-p"
335
+#CDDAFSOPTS="-f"
336
+#CDDBTOOLOPTS=
337
+#EJECTOPTS=
338
+#DISTMP3OPTS=
339
+#NORMALIZEOPTS=
340
+#CDSPEEDOPTS="-x"
341
+#CDSPEEDVALUE=""
342
+#MKCUEOPTS=""
343
+#MKTOCOPTS=""
344
+#DIFFOPTS=""
345
+#VORBISCOMMENTOPTS="-R"
346
+#METAFLACOPTS="--no-utf8-convert"
347
+# Bear in mind that the AtomicParsley option '--overWrite' is already
348
+# used in abcde...
349
+#ATOMICPARSLEYOPTS=
350
+
351
+# Actions to take
352
+# Comma-separated list of one or more of the following:
353
+#  cddb,cue,read,normalize,encode,tag,move,replaygain,playlist,getalbumart,clean,default
354
+#   encode implies read
355
+#   normalize implies read
356
+#   tag implies cddb,read,encode
357
+#   move implies cddb,read,encode,tag
358
+#   replaygain implies cddb,read,encode,tag,move
359
+#   playlist implies cddb
360
+# An action can be added to the "default" action by specifying it along with
361
+# "default", without having to repeat the default ones:
362
+#  ACTIONS=default,playlist
363
+# The default action list (referenced as "default") is defined in the following
364
+# comment:
365
+#ACTIONS=cddb,read,encode,tag,move,clean
366
+
367
+# CD device you want to read from
368
+# It can be defined as a singletrack flac file, but since it might change from
369
+# file to file it makes little sense to define it here.
370
+CDROM=/dev/cdrom
371
+# If we are using the IDE bus, we need CDPARANOIACDROMBUS defined as "d"
372
+# If we are using the ide-scsi emulation layer, we need to define a "g"
373
+#CDPARANOIACDROMBUS="d"
374
+
375
+# If you'd like to make a default location that overrides the current
376
+# directory for putting mp3's, uncomment this.
377
+OUTPUTDIR=/data/music
378
+
379
+# Or if you'd just like to put the temporary .wav files somewhere else
380
+# you can specify that here
381
+#WAVOUTPUTDIR=`pwd`
382
+
383
+# OUTPUTTYPE can be any of a number of formats, either a single format
384
+# (e.g. "ogg") or a combination of them separated with ","
385
+# (e.g. "flac,mp3"). Currently recognised and supported are:
386
+# "flac", "m4a", "mp3, "mpc", "ogg", "opus", "mka", "spx", "vorbis", "wav", "wv", "ape"
387
+OUTPUTTYPE=mp3
388
+
389
+# Output filename format - change this to reflect your inner desire to
390
+# organize things differently than everyone else :)
391
+# You have the following variables at your disposal:
392
+# OUTPUT, GENRE, ALBUMFILE, ARTISTFILE, TRACKFILE, TRACKNUM and YEAR.
393
+# Make sure to single-quote this variable. abcde will automatically create
394
+# the directory portion of this filename.
395
+# NOTICE: OUTPUTTYPE has been deprecated in the OUTPUTFORMAT string.
396
+# Since multiple-output was integrated we always append the file type
397
+# to the files. Remove it from your user defined string if you are getting
398
+# files like ".ogg.ogg".
399
+#OUTPUTFORMAT='${ARTISTFILE}-${ALBUMFILE}/${TRACKNUM}.${TRACKFILE}'
400
+
401
+# Like OUTPUTFORMAT but for Various Artists discs.
402
+#VAOUTPUTFORMAT='Various-${ALBUMFILE}/${TRACKNUM}.${ARTISTFILE}-${TRACKFILE}'
403
+
404
+# Like OUTPUTFORMAT and VAOUTPUTFORMAT but for the ONEFILE rips.
405
+#ONETRACKOUTPUTFORMAT=$OUTPUTFORMAT
406
+#VAONETRACKOUTPUTFORMAT=$VAOUTPUTFORMAT
407
+
408
+# Define how many encoders to run at once. This makes for huge speedups
409
+# on SMP systems. Defaults to 1. Equivalent to -j.
410
+#MAXPROCS=2
411
+
412
+# Support for systems with low disk space:
413
+# n:	Default parallelization (read entire CD in while encoding)
414
+# y:	No parallelization (rip, encode, rip, encode...)
415
+#LOWDISK=n
416
+
417
+# If set to y, enables batch mode normalization, which preserves relative
418
+# volume differences between tracks of an album.
419
+#BATCHNORM=n
420
+
421
+# Enables nogap encoding when using the 'lame' encoder.
422
+#NOGAP=y
423
+
424
+# Set the playlist file location format. Uses the same variables and format
425
+# as OUTPUTFORMAT. If the playlist is specified to be in a subdirectory, it
426
+# will be created for you and the playlist will reference files from that
427
+# subdirectory.
428
+#PLAYLISTFORMAT='${ARTISTFILE}-${ALBUMFILE}.${OUTPUT}.m3u'
429
+# If you want to prefix every filename in a playlist with an arbitrary
430
+# string (such as 'http://you/yourstuff/'), use this option
431
+#PLAYLISTDATAPREFIX=''
432
+
433
+#Like PLAYLIST{FORMAT,DATAPREFIX} but for Various Artists discs:
434
+#VAPLAYLISTFORMAT='${ARTISTFILE}-${ALBUMFILE}.${OUTPUT}.m3u'
435
+#VAPLAYLISTDATAPREFIX=''
436
+
437
+#This will give the playlist CR-LF line-endings, if set to "y".
438
+#(some hardware players insist on CR-LF line-endings)
439
+#DOSPLAYLIST=n
440
+
441
+# album art download options (see glyrc's help for details with more detailed 
442
+# examples here: https://github.com/sahib/glyr/wiki/Commandline-arguments).
443
+# For example use '--formats jpg;jpeg' to only search for JPEG images
444
+# These options: '--from <provider>' and '--lang <langcode>' might also be useful
445
+#GLYRCOPTS=
446
+#ALBUMARTFILE="cover.jpg"
447
+#ALBUMARTTYPE="JPEG"
448
+
449
+# Options for ImageMagick commands used by album art processing when available
450
+# For example: CONVERTOPTS="-colorspace RGB -resize 600x600>"
451
+# to make the image RGB and fit inside 600x600 while keeping the aspect ratio
452
+#IDENTIFYOPTS=
453
+#CONVERTOPTS=
454
+#DISPLAYCMDOPTS="-resize 512x512 -title abcde_album_art"
455
+# By default convert is only called when the image type is different from
456
+# ALBUMARTTYPE, use ALBUMARTALWAYSCONVERT="y" to always call convert
457
+#ALBUMARTALWAYSCONVERT="n"
458
+
459
+# Custom filename munging:
460
+# By default, abcde will do the following to CDDB data to get a useful filename:
461
+# 1. Delete any dots preceding the title (first sed command)
462
+# 2. Replace all spaces with an underscore (second sed command). Simply remove
463
+#   this if you prefer spaces.
464
+# 3. Delete a grab bag of characters which variously Windows and Linux do not permit 
465
+#   (tr command). Remove any of these from the list if you wish to actually use them.
466
+#   
467
+#mungefilename ()
468
+#{
469
+#	echo "$@" | sed -e 's/^\.*//' -e 's/ /_/g' | tr -d ":><|*/\"'?[:cntrl:]"
470
+#}
471
+#
472
+# Custom filename munging specific to track names:
473
+# By default this function will call the mungefilename function.
474
+#mungetrackname ()
475
+#{
476
+#	mungefilename $@
477
+#}
478
+#
479
+# Custom filename munging specific to artist names:
480
+# By default this function will call the mungefilename function.
481
+#mungeartistname ()
482
+#{
483
+#	mungefilename $@
484
+#}
485
+#
486
+# Custom filename munging specific to album names:
487
+# By default this function will call the mungefilename function.
488
+#mungealbumname ()
489
+#{
490
+#	mungefilename $@
491
+#}
492
+
493
+# Custom genre munging:
494
+# By default we just transform uppercase to lowercase. Not much of a fancy
495
+# function, with not much use, but one can disable it or just turn the first
496
+# Uppercase.
497
+#mungegenre ()
498
+#{
499
+#	echo $CDGENRE | tr "[:upper:]" "[:lower:]"
500
+#}
501
+
502
+
503
+# Custom pre-read function
504
+# By default it does nothing.
505
+# You can set some things to get abcde function in better ways:
506
+# * Close the CD tray using eject -t (if available in eject and supported by
507
+#   your CD device.
508
+# * Set the CD speed. You can also use the built-in options, but you can also
509
+#   set it here. In Debian, eject -x and cdset -x do the job.
510
+# KEEP IN MIND that executables included in pre_read must be in your $PATH or
511
+# you have to define them with full /path/to/binary
512
+# Uncomment and substitute the ":" with your commands.
513
+#pre_read ()
514
+#{
515
+#:
516
+#}
517
+
518
+# Custom post-read function
519
+# By default it does nothing.
520
+# You can set some things to get abcde function in better ways:
521
+# * Store a copy of the CD TOC.
522
+# KEEP IN MIND that executables included in post_read must be in your $PATH or
523
+# you have to define them with full /path/to/binary
524
+# Uncomment and substitute the ":" with your commands.
525
+#post_read ()
526
+#{
527
+#:
528
+#}
529
+
530
+# post_encode
531
+# By default it does nothing.
532
+# You can set some things to get abcde function in better ways:
533
+# * Move the resulting directory over the network
534
+# * Compare results with a previously made run, for tests
535
+# KEEP IN MIND that executables included in post_encode must be in your $PATH or
536
+# you have to define them with full /path/to/binary
537
+# Uncomment and substitute the ":" with your commands.
538
+#post_encode ()
539
+#{
540
+#:
541
+#}
542
+
543
+# If you'd like to have abcde eject the cdrom after all the tracks have been
544
+# read, uncomment the following line.
545
+#EJECTCD=y
546
+
547
+# To encode on the remote machines foo, bar, baz, quux, and qiix, as well as
548
+# on the local machine (requires distmp3 to be installed on local machine and
549
+# distmp3host to be installed and running on all remote machines - see README)
550
+#REMOTEHOSTS=foo,bar,baz,quux,qiix
551
+
552
+# Set to 1,2, etc. to obtain some information about actions happening in the background
553
+# Useful if you have a slow network or CDDB servers seem unresponsive.
554
+#EXTRAVERBOSE=0

+ 3
- 0
abcde/config/bashrc Dosyayı Görüntüle

@@ -0,0 +1,3 @@
1
+alias copy-cd="abcde -a cddb,getalbumart,read,encode,tag,move,playlist,clean -V -x -N"
2
+
3
+echo "Tappez 'copy-cd' pour copier le cd. Le cd sera éjecté automatiquement à la fin de la copie."

+ 19
- 0
abcde/config/ssmtp.conf Dosyayı Görüntüle

@@ -0,0 +1,19 @@
1
+# Configuartion file for sSMTP sendmail
2
+
3
+# The person who gets all mail for userids < 1000
4
+# Make this empty to disable rewriting.
5
+root=SSMTP_ROOT
6
+
7
+# We want to use this with an exim container. Link these
8
+# so that that container will be reachable as 'exim' in
9
+# this container.
10
+mailhub=SSMTP_MAILHUB
11
+
12
+# Where will the mail seem to come from?
13
+rewriteDomain=SSMTP_MAILDOMAIN
14
+
15
+# The full hostname
16
+#hostname=
17
+
18
+# Are users allowed to set their own From: address? (YES/NO)
19
+FromLineOverride=YES

+ 7
- 0
abcde/run.sh Dosyayı Görüntüle

@@ -0,0 +1,7 @@
1
+#! /usr/bin/env bash
2
+
3
+. /common.sh
4
+
5
+replace_files
6
+
7
+sleep infinity

+ 3
- 0
abcde/vars-files Dosyayı Görüntüle

@@ -0,0 +1,3 @@
1
+ssmtp.conf /etc/ssmtp/ssmtp.conf
2
+abcde.conf /root/.abcde.conf
3
+bashrc /root/.bashrc

+ 3
- 0
abcde/vars-vars Dosyayı Görüntüle

@@ -0,0 +1,3 @@
1
+SSMTP_ROOT
2
+SSMTP_MAILHUB
3
+SSMTP_MAILDOMAIN

+ 20
- 0
docker-compose.yml Dosyayı Görüntüle

@@ -0,0 +1,20 @@
1
+version: '2'
2
+
3
+services:
4
+    abcde:
5
+        build: ./abcde
6
+        container_name: abcde-abcde
7
+#        restart: unless-stopped
8
+        privileged: true
9
+        networks:
10
+            abcde.internal.docker:
11
+                aliases:
12
+                    - abcde.abcde.internal.docker
13
+        volumes:
14
+            - ./data/abcde/music:/data/music/
15
+            - "/dev/cdrom:/dev/cdrom"
16
+        env_file:
17
+            - env
18
+
19
+networks:
20
+    abcde.internal.docker:

+ 3
- 0
env Dosyayı Görüntüle

@@ -0,0 +1,3 @@
1
+SSMTP_ROOT=root@example.com
2
+SSMTP_MAILHUB=172.17.0.1:10025
3
+SSMTP_MAILDOMAIN=example.com

+ 7
- 0
update_vars.sh Dosyayı Görüntüle

@@ -0,0 +1,7 @@
1
+#! /usr/bin/env sh
2
+
3
+vars=$(cat env | cut -d= -f1)
4
+for docker in abcde
5
+do
6
+  echo "${vars}" > "./${docker}/vars-vars"
7
+done

Loading…
İptal
Kaydet