Browse Source

Split multimedia into audio and graphics

Also to mimic pkgsrc categories.

While there:
- Convert the READMEs to MarkDown to make forges happier.
- Split French README section to audio/README-fr.md.
- Rewrap READMEs at 80 characters.
Matteo Cypriani 1 year ago
parent
commit
a7c8880230

+ 43
- 0
audio/README-fr.md View File

@@ -0,0 +1,43 @@
1
+metflac-field2field.sh
2
+======================
3
+
4
+`metaflac-field2field.sh` utilise metaflac pour effectuer des actions de copie
5
+ou déplacement de champ à champ sur les fichiers FLAC.
6
+
7
+Invocation du script :
8
+
9
+    metaflac-field2field.sh <ACTION> <SRC_FIELD> <DST_FIELD> <FILE.flac> \
10
+        [ <FILE2.flac> [...] ]
11
+
12
+`<ACTION>` est l'action à effectuer sur les champs, parmi « copy », « move »,
13
+« rmcopy » et « mvcopy » :
14
+
15
+- **copy** : chaque occurrence de `SRC_FIELD` est dupliquée pour créer une
16
+  occurrence de `DST_FIELD` ; toutes les occurrences existantes de `SRC_FIELD`
17
+  et de `DST_FIELD` sont conservées.
18
+
19
+- **move** : chaque occurrence de `SRC_FIELD` est déplacée pour créer une
20
+  occurrence de `DST_FIELD` ; les occurrences existantes de `DST_FIELD` sont
21
+  conservées.
22
+
23
+- **rmcopy** : les occurrences existantes de `DST_FIELD` sont supprimées, puis
24
+  chaque occurrence de `SRC_FIELD` est dupliquée pour créer une occurrence de
25
+  `DST_FIELD` ; les occurrences de `SRC_FIELD` sont conservées.
26
+
27
+- **rmmove** : les occurrences existantes de `DST_FIELD` sont supprimées, puis
28
+  chaque occurrence de `SRC_FIELD` est déplacée pour créer une occurrence de
29
+  `DST_FIELD`.
30
+
31
+`<SRC_FIELD>` est le champ source de l'action.
32
+
33
+`<DST_FIELD>` est le champ de destination de l'action.
34
+
35
+On spécifie ensuite un ou plusieurs fichier sur lequel ou lesquels effectuer
36
+l'action.
37
+
38
+À noter que vous devriez toujours employer des noms de champs en lettres
39
+MAJUSCULES ; les champs en minuscules ne sont pas gérés, et le comportement du
40
+programme est indéfini si vous les employez. Par exemple, si vous essayez de
41
+renommer un champ en minuscules (exemple : `metaflac-field2field move DATE
42
+date`), le champ sera simplement supprimé, car `metaflac --remove-tag` ne
43
+tient pas compte de la casse.

+ 105
- 0
audio/README.md View File

@@ -0,0 +1,105 @@
1
+just-play-something.sh
2
+======================
3
+
4
+As its name indicates, the main goal of `just-play-something.sh` is to put some
5
+music on. Anything. What the name doesn't indicate is that the music is played
6
+by MPD.
7
+
8
+Its use case is to be binded to a physical button of my router (which is also
9
+my music box), so that I don't have to start a device with an MPD client to
10
+start music (this is especially useful when I first wake up in the morning).
11
+Therefore, it is written with portability in mind and tries to not use any
12
+utility that might not be present on embedded systems.
13
+
14
+Here are the required dependencies (beside MPD itself):
15
+
16
+- `mpc` (MPD's command-line client)
17
+- time
18
+- ps
19
+- date
20
+- md5sum
21
+- sed
22
+
23
+What this script will do for you:
24
+
25
+- first of all, if the MPD daemon looks down, it will be restarted; then,
26
+- if there are songs in the playlist but the playback is paused, it will
27
+  unpause;
28
+- if there are songs in the playlist but the playback is stopped, it will
29
+  start playing the playlist from the begining;
30
+- if there are no songs in the playlist, it will add a random album from your
31
+  library and play it;
32
+- if music is already playing, it will be paused.
33
+
34
+Tips:
35
+
36
+- You can bind a short button press to `just-play-something`, and a long press
37
+  (or another button) to `mpc clear ; just-play-something`, so that if you
38
+  don't like what is currently in the playlist, you can force playing a random
39
+  album with a long press.
40
+- Running this script from another host works just fine by setting the
41
+  `MPD_HOST` variable (and possibly `MPD_PORT`), for example:
42
+      MPD_HOST=192.168.0.254 just-play-something
43
+
44
+
45
+metflac-field2field.sh
46
+======================
47
+
48
+*Français: voir README-fr.md.*
49
+
50
+`metaflac-field2field.sh` uses metaflac to process field to field copy/move on
51
+FLAC file metadatas.
52
+
53
+Invocation:
54
+
55
+    metaflac-field2field.sh <ACTION> <SRC_FIELD> <DST_FIELD> <FILE.flac> \
56
+        [ <FILE2.flac> [...] ]
57
+
58
+`<ACTION>` is the action to perform on the fields, amongst “copy”, “move”,
59
+“rmcopy” and “mvcopy”:
60
+
61
+- **copy**: each occurrence of `SRC_FIELD` is duplicated to create an
62
+  occurrence of `DST_FIELD`; all the existing occurrences of `SRC_FIELD` and
63
+  `DST_FIELD` are kept.
64
+
65
+- **move**: each occurrence of `SRC_FIELD` is moved to create an occurrence of
66
+  `DST_FIELD`; the existing occurrences of `DST_FIELD` are kept.
67
+
68
+- **rmcopy**: the existing occurrences of `DST_FIELD` are deleted, then each
69
+  occurrence of `SRC_FIELD` is duplicated to create an occurrence of
70
+  `DST_FIELD`; the occurrences of `SRC_FIELD` are kept.
71
+
72
+- **rmmove**: the existing occurrences of `DST_FIELD` are deleted, then each
73
+  occurrence of `SRC_FIELD` is moved to create an occurrence of `DST_FIELD`.
74
+
75
+`<SRC_FIELD>` is the action's source field.
76
+
77
+`<DST_FIELD>` is the action's destination field.
78
+
79
+Finally, the file(s) on which the action has to be run are specified at the end
80
+of the command line.
81
+
82
+Please note that you should always use UPPERCASE fields; lowercase fields are
83
+*not* supported, and the behaviour is undefined. For example, if you try to
84
+lowercase a field with the move command (e.g. `metaflac-field2field move DATE
85
+date`), the field will just be deleted. This is because `metaflac --remove-tag`
86
+is case-insensitive.
87
+
88
+
89
+mp3car.sh
90
+=========
91
+
92
+`mp3car.sh` uses the pacpl (Perl Audio Converter) multi-purpose audio converter
93
+to convert audio files in any format to low-quality MP3s suitable for listening
94
+in a car. The goal is to maximise the number of albums that can be contained in
95
+a CD-ROM (or USB stick). The default encoding parameters are variable bitrate
96
+(VBR) from 32 to 128 kbps, in joint stereo.
97
+
98
+Usage: just call the script with one or more files or directories, and they
99
+will be converted recursively and put in the target directory (`~/tmp/mp3car/`
100
+by default, edit the script to change that).
101
+
102
+You must have installed pacpl and lame for this script to work.
103
+
104
+Note: if you want to burn all these converted audio files to CD-ROMs, you may
105
+be interested in the `dirpacker.py` script provided in this repository.

multimedia/just-play-something.sh → audio/just-play-something.sh View File


multimedia/metaflac-field2field.sh → audio/metaflac-field2field.sh View File


multimedia/mp3car.sh → audio/mp3car.sh View File


+ 1
- 1
bin/apply-exif-orientation View File

@@ -1 +1 @@
1
-../multimedia/apply-exif-orientation.sh
1
+../graphics/apply-exif-orientation.sh

+ 1
- 1
bin/just-play-something View File

@@ -1 +1 @@
1
-../multimedia/just-play-something.sh
1
+../audio/just-play-something.sh

+ 1
- 1
bin/metaflac-field2field View File

@@ -1 +1 @@
1
-../multimedia/metaflac-field2field.sh
1
+../audio/metaflac-field2field.sh

+ 1
- 1
bin/mp3car View File

@@ -1 +1 @@
1
-../multimedia/mp3car.sh
1
+../audio/mp3car.sh

+ 14
- 0
graphics/README.md View File

@@ -0,0 +1,14 @@
1
+apply-exif-orientation.sh
2
+=========================
3
+
4
+`apply-exif-orientation.sh` retrieves the Orientation EXIF tag from an image
5
+file and rotates the actual image data according to the said orientation. The
6
+EXIF Orientation tag is deleted in the process. The goal is to allow the image
7
+to be displayed correctly by tools that don't handle EXIF metadata (such as
8
+ImageMagick's display).
9
+
10
+EXIF information is manipulated using exiftool, shipped with the
11
+`Image::ExifTool` Perl module (Debian package: `libimage-exiftool-perl`).
12
+Image is rotated using ImageMagick's `convert`.
13
+
14
+**Warning**: no backup of the original file is made!

multimedia/apply-exif-orientation.sh → graphics/apply-exif-orientation.sh View File


+ 0
- 151
multimedia/README View File

@@ -1,151 +0,0 @@
1
-# apply-exif-orientation.sh #
2
-
3
-apply-exif-orientation.sh retrieves the Orientation EXIF tag from an
4
-image file and rotates the actual image data according to the said
5
-orientation. The EXIF Orientation tag is deleted in the process. The
6
-goal is to allow the image to be displayed correctly by tools that don't
7
-handle EXIF metadata (such as ImageMagick's display).
8
-
9
-EXIF information is manipulated using exiftool, shipped with the
10
-Image::ExifTool Perl module (Debian package: libimage-exiftool-perl).
11
-Image is rotated using ImageMagick's convert.
12
-
13
-Warning: no backup of the original file is made!
14
-
15
-
16
-# just-play-something.sh #
17
-
18
-As its name indicates, the main goal of just-play-something.sh is to put
19
-some music on. Just anything. What the name doesn't indicate is that the
20
-music is played by MPD.
21
-
22
-Its use case is to be binded to a physical button of my router (which is
23
-also my music box), so that I don't have to start a device with an MPD
24
-client to start music (this is especially useful when I first wake up in
25
-the morning). Therefore, it is written with portability in mind and
26
-doesn't use any utility that might not be present on embedded systems.
27
-Here are the required dependencies (beside MPD itself and its
28
-command-like client, mpc):
29
-- time
30
-- ps
31
-- date
32
-- md5sum
33
-- sed
34
-
35
-What this script will do for you:
36
-- first of all, if the MPD daemon looks down, it will be restarted;
37
-  then,
38
-- if there are songs in the playlist but the playback is paused, it will
39
-  unpause;
40
-- if there are songs in the playlist but the playback is stopped, it
41
-  will start playing the playlist from the begining;
42
-- if there are no songs in the playlist, it will add a random album from
43
-  your library and play it;
44
-- if music is already playing, it will be paused.
45
-
46
-Tips:
47
-- You can bind a short button press to 'just-play-something', and a long
48
-  press (or another button) to 'mpc clear ; just-play-something', so
49
-  that if you don't like what is currently in the playlist, you can
50
-  force playing a random album with a long press.
51
-- Running this script from another host works just fine by setting the
52
-  MPD_HOST variable (and possibly MPD_PORT), for example:
53
-    MPD_HOST=192.168.0.254 just-play-something
54
-
55
-
56
-# metflac-field2field.sh #
57
-
58
-[Français ci-dessous.]
59
-
60
-metaflac-field2field.sh uses metaflac to process field to field
61
-copy/move on FLAC file metadatas.
62
-
63
-Invocation:
64
-
65
-  metaflac-field2field.sh <ACTION> <SRC_FIELD> <DST_FIELD> <FILE.flac> \
66
-    [ <FILE2.flac> [...] ]
67
-
68
-<ACTION> is the action to perform on the fields, amongst “copy”, “move”,
69
-“rmcopy” and “mvcopy”:
70
-- copy: each occurrence of SRC_FIELD is duplicated to create an
71
-  occurrence of DST_FIELD; all the existing occurrences of SRC_FIELD and
72
-  DST_FIELD are kept.
73
-- move: each occurrence of SRC_FIELD is moved to create an occurrence of
74
-  DST_FIELD; the existing occurrences of DST_FIELD are kept.
75
-- rmcopy: the existing occurrences of DST_FIELD are deleted, then each
76
-  occurrence of SRC_FIELD is duplicated to create an occurrence of
77
-  DST_FIELD; the occurrences of SRC_FIELD are kept.
78
-- rmmove: the existing occurrences of DST_FIELD are deleted, then each
79
-  occurrence of SRC_FIELD is moved to create an occurrence of DST_FIELD.
80
-
81
-<SRC_FIELD> is the action's source field.
82
-
83
-<DST_FIELD> is the action's destination field.
84
-
85
-Finally, the file(s) on which the action has to be run are specified at
86
-the end of the command line.
87
-
88
-Please note that you should always use UPPERCASE fields; lowercase
89
-fields are *not* supported, and the behaviour is undefined. For example,
90
-if you try to lowercase a field with the move command (e.g.
91
-metaflac-field2field move DATE date), the field will just be deleted.
92
-This is because metaflac --remove-tag is case-insensitive.
93
-
94
-----
95
-
96
-metaflac-field2field.sh utilise metaflac pour effectuer des actions de
97
-copie ou déplacement de champ à champ sur les fichiers FLAC.
98
-
99
-Invocation du script :
100
-
101
-  metaflac-field2field.sh <ACTION> <SRC_FIELD> <DST_FIELD> <FILE.flac> \
102
-    [ <FILE2.flac> [...] ]
103
-
104
-<ACTION> est l'action à effectuer sur les champs, parmi « copy »,
105
-« move », « rmcopy » et « mvcopy » :
106
-- copy : chaque occurrence de SRC_FIELD est dupliquée pour créer une
107
-  occurrence de DST_FIELD ; toutes les occurrences existantes de
108
-  SRC_FIELD et de DST_FIELD sont conservées.
109
-- move : chaque occurrence de SRC_FIELD est déplacée pour créer une
110
-  occurrence de DST_FIELD ; les occurrences existantes de DST_FIELD sont
111
-  conservées.
112
-- rmcopy : les occurrences existantes de DST_FIELD sont supprimées, puis
113
-  chaque occurrence de SRC_FIELD est dupliquée pour créer une occurrence
114
-  de DST_FIELD ; les occurrences de SRC_FIELD sont conservées.
115
-- rmmove : les occurrences existantes de DST_FIELD sont supprimées, puis
116
-  chaque occurrence de SRC_FIELD est déplacée pour créer une occurrence
117
-  de DST_FIELD.
118
-
119
-<SRC_FIELD> est le champ source de l'action.
120
-
121
-<DST_FIELD> est le champ de destination de l'action.
122
-
123
-On spécifie ensuite un ou plusieurs fichier sur lequel ou lesquels
124
-effectuer l'action.
125
-
126
-À noter que vous devriez toujours employer des noms de champs en
127
-lettres MAJUSCULES ; les champs en minuscules ne sont pas gérés, et le
128
-comportement du programme est indéfini si vous les employez. Par
129
-exemple, si vous essayez de renommer un champ en minuscules (exemple :
130
-metaflac-field2field move DATE date), le champ sera simplement supprimé,
131
-car metaflac --remove-tag ne tient pas compte de la casse.
132
-
133
-
134
-# mp3car.sh #
135
-
136
-mp3car.sh uses the pacpl (Perl Audio Converter) multi-purpose audio
137
-converter to convert audio files in any format to low-quality MP3s
138
-suitable for listening in a car. The goal is to maximise the number of
139
-albums that can be contained in a CD-ROM (or USB stick). The default
140
-encoding parameters are variable bitrate (VBR) from 32 to 128 kbps, in
141
-joint stereo.
142
-
143
-Usage: just call the script with one or more files or directories, and
144
-they will be converted recursively and put in the target directory
145
-(~/tmp/mp3car/ by default, edit the script to change that).
146
-
147
-You must have installed pacpl and lame for this script to work.
148
-
149
-Note: if you want to burn all these converted audio files to CD-ROMs,
150
-you might be interested in the dirpacker.py script provided in this
151
-repository.

Loading…
Cancel
Save