bandcrash 0.3.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2022 j. shagam <fluffy@beesbuzz.biz>
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,179 @@
1
+ Metadata-Version: 2.1
2
+ Name: bandcrash
3
+ Version: 0.3.0
4
+ Summary: Tools for publishing albums to the web and digital stores
5
+ License: MIT
6
+ Author: fluffy
7
+ Author-email: fluffy@beesbuzz.biz
8
+ Requires-Python: >=3.8,<4.0
9
+ Classifier: License :: OSI Approved :: MIT License
10
+ Classifier: Programming Language :: Python :: 3
11
+ Classifier: Programming Language :: Python :: 3.8
12
+ Classifier: Programming Language :: Python :: 3.9
13
+ Classifier: Programming Language :: Python :: 3.10
14
+ Classifier: Programming Language :: Python :: 3.11
15
+ Requires-Dist: Jinja2 (>=3.0.3,<4.0.0)
16
+ Requires-Dist: Pillow (>=10.0.1,<11.0.0)
17
+ Requires-Dist: awesome-slugify (>=1.6.5,<2.0.0)
18
+ Requires-Dist: chardet (>=4.0.0,<5.0.0)
19
+ Requires-Dist: mutagen (>=1.45.1,<2.0.0)
20
+ Description-Content-Type: text/markdown
21
+
22
+ # Bandcrash (formerly Bandcrash)
23
+
24
+ Bandcrash is a standalone program that automatically encodes an album of songs into a bunch of different formats for distribution on various platforms, such as [itch.io](https://itch.io/), or for hosting on your own website. The embedded player is originally based on the one from [Blamscamp](https://github.com/blackle/blamscamp) by @blackie, although it has been pretty thoroughly modified at this point.
25
+
26
+ [See it in action](https://fluffy.itch.io/novembeat-2021)!
27
+
28
+ ## Features
29
+
30
+ * Output as mp3, ogg, FLAC, and web preview (HTML5+mp3 at a lower bitrate)
31
+ * Optionally upload everything to your page on itch using [butler](https://itch.io/docs/butler/)
32
+ * High-quality encoding and metadata, with support for cover songs, per-track artwork, embedded lyrics, and more
33
+ * Web player also supports per-track artwork
34
+
35
+ ## Usage
36
+
37
+ To use it, you'll need to install LAME, oggenc, and FLAC; on macOS you can install these via [homebrew](https://brew.sh/), on Linux you can use your system's package manager, and on Windows you're on your own.
38
+
39
+ You'll also need to install [Python](https://python.org), after which you can install Bandcrash with:
40
+
41
+ ```
42
+ pip install bandcrash
43
+ ```
44
+
45
+ `bandcrash --help` will provide a lot more detailed information. For the most part you should be able to just do:
46
+
47
+ ```
48
+ bandcrash input_dir output_dir
49
+ ```
50
+
51
+ and the rest will Just Work™.
52
+
53
+ ## Building an album
54
+
55
+ Make a directory with all of your source audio files and artwork and so on. Create a JSON file named `album.json` (which can be overridden) that looks something like this:
56
+
57
+ ```json
58
+ {
59
+ "artist": "The artist of the album",
60
+ "title": "The title of the album",
61
+ "bg_color": "black",
62
+ "fg_color": "white",
63
+ "highlight_color": "#cc00ff",
64
+ "artwork": "album_cover.jpg",
65
+ "tracks": [{
66
+ "filename": "the first track.wav",
67
+ "title": "The First Track",
68
+ "artwork": "track1_cover.jpg",
69
+ "lyrics": ["This is the first line",
70
+ "This is the second line",
71
+ "This is the third line",
72
+ "",
73
+ "This is the second verse",
74
+ "This song just keeps getting worse"],
75
+ "hidden": false,
76
+ "preview": true
77
+ }]
78
+ }
79
+ ```
80
+
81
+ You can also automatically generate a stub `album.json` file with:
82
+
83
+ ```
84
+ bandcrash --init input_dir output_dir
85
+ ```
86
+
87
+ which will try to guess the track order and titles from the audio files in `input_dir`.
88
+
89
+ Basically, the top-level album contains the following properties (all optional):
90
+
91
+ * `artist`: The artist for the album as a whole
92
+ * `title`: The album's title
93
+ * `year`: The release year
94
+ * `artwork`: an image file to use for the album's cover art (relative or absolute paths okay)
95
+ * `bg_color`, `fg_color`, `highlight_color`: The color theme for the player
96
+ * `genre`: The default genre for all tracks
97
+ * `tracks`: an array of track descriptions, in album order
98
+
99
+ And each track contains (all optional except `filename`):
100
+
101
+ * `filename`: The audio file to encode into the final output track (ideally wav or aif)
102
+ * `group`: The title of the track's grouping (i.e. a work with multiple movements)
103
+ * `title`: The title of the track
104
+ * `artist`: The performing artist of this track
105
+ * `cover_of`: The original artist that this track is a cover of, if any
106
+ * `genre`: The genre of this track
107
+ * `artwork`: Track-specific cover art
108
+ * `lyrics`: An array of strings, one line of lyrics per string; alternately, the name of a text file to read the lyrics from (relative or absolute paths okay)
109
+ * `hidden`: A boolean for whether to hide this track from the web player entirely (e.g. a purchase bonus); defaults to `false`
110
+ * `preview`: A boolen for whether to generate a preview for the web player; defaults to `true`
111
+ * `about`: Detailed commentary about the track
112
+
113
+ See the [sample album JSON file](https://github.com/fluffy-critter/Bandcrash/blob/main/tests/album/album.json) for a rough example.
114
+
115
+ ## Publishing to Itch
116
+
117
+ Here's the process for publishing an album to [itch.io](https://itch.io):
118
+
119
+ 1. Install [butler](https://itch.io/docs/butler/) and log in with `butler login`
120
+ 1. [Create a new project](https://itch.io/game/new)
121
+ 2. Set it as a "soundtrack," with the kind of project being "HTML"
122
+ 3. Set your pricing, add preview artwork, etc., and save. Don't do any uploading from this interface.
123
+ 4. Run `bandcrash` with a `-b user/project` flag; for example:
124
+
125
+ ```sh
126
+ bandcrash novembeat-2021/wav novembeat-2021/out -b fluffy/novembeat-2021
127
+ ```
128
+ 5. Wait a moment for itch to finish processing; you can use `butler status user/project` (e.g. `butler status fluffy/novembeat-2021`)
129
+ 6. Reload your project edit page; you should now have a few targets, such as `preview`, `mp3`, etc.
130
+ 7. Set the `preview` target to "This file will be played in the browser". Set all the other targets to "soundtrack" and, optionally, change the display name.
131
+ 8. View the project page, and when you're ready to publish, publish!
132
+
133
+ ### Recommended "embed options"
134
+
135
+ * Set it to "embed in page" with "manually set size"
136
+ * Enable "mobile friendly" (with orientation "default") and "automatically start on page load"
137
+ * Disable "fullscreen button" and "enable scrollbars"
138
+
139
+ ## Publishing to other sites
140
+
141
+ If you have a website of your own, upload the `preview` directory to your site somewhere, and then embed it using an iframe, e.g.
142
+
143
+ ```html
144
+ <iframe src="/path/to/album/" width=640 height=360></iframe>
145
+ ```
146
+
147
+ If you do this, it's also highly recommended that you add OpenGraph tags to the enclosing page, for example tags like these in the `<head>`:
148
+
149
+ ```html
150
+ <meta property="og:title" content="My Awesome Album">
151
+ <meta property="og:type" content="album">
152
+ <meta property="og:site_name" content="My Band Name">
153
+ <!-- This should be an absolute link to the page that the <iframe> points to, i.e. the preview index.html -->
154
+ <meta property="og:video" content="https://example.com/path/to/album/">
155
+ <meta property="og:video:height" content="480">
156
+ <meta property="og:video:width" content="640">
157
+ <!-- Twitter prefers their own meta tags although these might not be necessary -->
158
+ <meta property="twitter:player" content="https://example.com/path/to/album/">
159
+ <meta property="twitter:player:height" content="480">
160
+ <meta property="twitter:player:width" content="640">
161
+ ```
162
+
163
+ This will allow you to link to the page from many social networks (including Facebook, Twitter, and Mastodon) and have it embed correctly.
164
+
165
+ ## Contributing
166
+
167
+ Pull requests are welcome! But please note the following:
168
+
169
+ The generated web player must not receive any added dependencies. The generator must stay as a single, self-contained file that is as small as reasonably possible. The point is for the generated file to be lightweight. Stick to Vanilla JS.
170
+
171
+ ### Roadmap
172
+
173
+ See the [github issues](https://github.com/fluffy-critter/bandcrash/issues) for details, but roughly:
174
+
175
+ * Local GUI and/or web UI to make setting up the `album.json` easier (and easier installation, especially on Windows!)
176
+ * Improved player
177
+ * Easy embedding into websites
178
+
179
+
@@ -0,0 +1,157 @@
1
+ # Bandcrash (formerly Bandcrash)
2
+
3
+ Bandcrash is a standalone program that automatically encodes an album of songs into a bunch of different formats for distribution on various platforms, such as [itch.io](https://itch.io/), or for hosting on your own website. The embedded player is originally based on the one from [Blamscamp](https://github.com/blackle/blamscamp) by @blackie, although it has been pretty thoroughly modified at this point.
4
+
5
+ [See it in action](https://fluffy.itch.io/novembeat-2021)!
6
+
7
+ ## Features
8
+
9
+ * Output as mp3, ogg, FLAC, and web preview (HTML5+mp3 at a lower bitrate)
10
+ * Optionally upload everything to your page on itch using [butler](https://itch.io/docs/butler/)
11
+ * High-quality encoding and metadata, with support for cover songs, per-track artwork, embedded lyrics, and more
12
+ * Web player also supports per-track artwork
13
+
14
+ ## Usage
15
+
16
+ To use it, you'll need to install LAME, oggenc, and FLAC; on macOS you can install these via [homebrew](https://brew.sh/), on Linux you can use your system's package manager, and on Windows you're on your own.
17
+
18
+ You'll also need to install [Python](https://python.org), after which you can install Bandcrash with:
19
+
20
+ ```
21
+ pip install bandcrash
22
+ ```
23
+
24
+ `bandcrash --help` will provide a lot more detailed information. For the most part you should be able to just do:
25
+
26
+ ```
27
+ bandcrash input_dir output_dir
28
+ ```
29
+
30
+ and the rest will Just Work™.
31
+
32
+ ## Building an album
33
+
34
+ Make a directory with all of your source audio files and artwork and so on. Create a JSON file named `album.json` (which can be overridden) that looks something like this:
35
+
36
+ ```json
37
+ {
38
+ "artist": "The artist of the album",
39
+ "title": "The title of the album",
40
+ "bg_color": "black",
41
+ "fg_color": "white",
42
+ "highlight_color": "#cc00ff",
43
+ "artwork": "album_cover.jpg",
44
+ "tracks": [{
45
+ "filename": "the first track.wav",
46
+ "title": "The First Track",
47
+ "artwork": "track1_cover.jpg",
48
+ "lyrics": ["This is the first line",
49
+ "This is the second line",
50
+ "This is the third line",
51
+ "",
52
+ "This is the second verse",
53
+ "This song just keeps getting worse"],
54
+ "hidden": false,
55
+ "preview": true
56
+ }]
57
+ }
58
+ ```
59
+
60
+ You can also automatically generate a stub `album.json` file with:
61
+
62
+ ```
63
+ bandcrash --init input_dir output_dir
64
+ ```
65
+
66
+ which will try to guess the track order and titles from the audio files in `input_dir`.
67
+
68
+ Basically, the top-level album contains the following properties (all optional):
69
+
70
+ * `artist`: The artist for the album as a whole
71
+ * `title`: The album's title
72
+ * `year`: The release year
73
+ * `artwork`: an image file to use for the album's cover art (relative or absolute paths okay)
74
+ * `bg_color`, `fg_color`, `highlight_color`: The color theme for the player
75
+ * `genre`: The default genre for all tracks
76
+ * `tracks`: an array of track descriptions, in album order
77
+
78
+ And each track contains (all optional except `filename`):
79
+
80
+ * `filename`: The audio file to encode into the final output track (ideally wav or aif)
81
+ * `group`: The title of the track's grouping (i.e. a work with multiple movements)
82
+ * `title`: The title of the track
83
+ * `artist`: The performing artist of this track
84
+ * `cover_of`: The original artist that this track is a cover of, if any
85
+ * `genre`: The genre of this track
86
+ * `artwork`: Track-specific cover art
87
+ * `lyrics`: An array of strings, one line of lyrics per string; alternately, the name of a text file to read the lyrics from (relative or absolute paths okay)
88
+ * `hidden`: A boolean for whether to hide this track from the web player entirely (e.g. a purchase bonus); defaults to `false`
89
+ * `preview`: A boolen for whether to generate a preview for the web player; defaults to `true`
90
+ * `about`: Detailed commentary about the track
91
+
92
+ See the [sample album JSON file](https://github.com/fluffy-critter/Bandcrash/blob/main/tests/album/album.json) for a rough example.
93
+
94
+ ## Publishing to Itch
95
+
96
+ Here's the process for publishing an album to [itch.io](https://itch.io):
97
+
98
+ 1. Install [butler](https://itch.io/docs/butler/) and log in with `butler login`
99
+ 1. [Create a new project](https://itch.io/game/new)
100
+ 2. Set it as a "soundtrack," with the kind of project being "HTML"
101
+ 3. Set your pricing, add preview artwork, etc., and save. Don't do any uploading from this interface.
102
+ 4. Run `bandcrash` with a `-b user/project` flag; for example:
103
+
104
+ ```sh
105
+ bandcrash novembeat-2021/wav novembeat-2021/out -b fluffy/novembeat-2021
106
+ ```
107
+ 5. Wait a moment for itch to finish processing; you can use `butler status user/project` (e.g. `butler status fluffy/novembeat-2021`)
108
+ 6. Reload your project edit page; you should now have a few targets, such as `preview`, `mp3`, etc.
109
+ 7. Set the `preview` target to "This file will be played in the browser". Set all the other targets to "soundtrack" and, optionally, change the display name.
110
+ 8. View the project page, and when you're ready to publish, publish!
111
+
112
+ ### Recommended "embed options"
113
+
114
+ * Set it to "embed in page" with "manually set size"
115
+ * Enable "mobile friendly" (with orientation "default") and "automatically start on page load"
116
+ * Disable "fullscreen button" and "enable scrollbars"
117
+
118
+ ## Publishing to other sites
119
+
120
+ If you have a website of your own, upload the `preview` directory to your site somewhere, and then embed it using an iframe, e.g.
121
+
122
+ ```html
123
+ <iframe src="/path/to/album/" width=640 height=360></iframe>
124
+ ```
125
+
126
+ If you do this, it's also highly recommended that you add OpenGraph tags to the enclosing page, for example tags like these in the `<head>`:
127
+
128
+ ```html
129
+ <meta property="og:title" content="My Awesome Album">
130
+ <meta property="og:type" content="album">
131
+ <meta property="og:site_name" content="My Band Name">
132
+ <!-- This should be an absolute link to the page that the <iframe> points to, i.e. the preview index.html -->
133
+ <meta property="og:video" content="https://example.com/path/to/album/">
134
+ <meta property="og:video:height" content="480">
135
+ <meta property="og:video:width" content="640">
136
+ <!-- Twitter prefers their own meta tags although these might not be necessary -->
137
+ <meta property="twitter:player" content="https://example.com/path/to/album/">
138
+ <meta property="twitter:player:height" content="480">
139
+ <meta property="twitter:player:width" content="640">
140
+ ```
141
+
142
+ This will allow you to link to the page from many social networks (including Facebook, Twitter, and Mastodon) and have it embed correctly.
143
+
144
+ ## Contributing
145
+
146
+ Pull requests are welcome! But please note the following:
147
+
148
+ The generated web player must not receive any added dependencies. The generator must stay as a single, self-contained file that is as small as reasonably possible. The point is for the generated file to be lightweight. Stick to Vanilla JS.
149
+
150
+ ### Roadmap
151
+
152
+ See the [github issues](https://github.com/fluffy-critter/bandcrash/issues) for details, but roughly:
153
+
154
+ * Local GUI and/or web UI to make setting up the `album.json` easier (and easier installation, especially on Windows!)
155
+ * Improved player
156
+ * Easy embedding into websites
157
+