Use dashes instead of underscores

This commit is contained in:
Lynn Smeria 2018-08-27 16:39:07 +02:00
parent c86d8c4ce6
commit e875e0ed5d
3 changed files with 8 additions and 5 deletions

View file

@ -7,12 +7,15 @@ Given a folder of tracks (supports mp3, ogg, flac, and many more), it will read
```
_albums/
foo.md
_data/
albums.yml
_tracks/
foo/
1-bar.md
2-baz.md
assets/
foo/
1-bar.mp3
@ -23,7 +26,7 @@ All Markdown files will encode the metadata in the [Front Matter](https://jekyll
## Installation
1. Make sure `nodejs` is installed and up-tp-date:
1. Make sure [Node.js](https://nodejs.org/en/download/) is installed and up-tp-date:
```
brew install node
@ -48,7 +51,7 @@ publikator -h
To organise tracks and generate release information:
```
publikator organise pathToMySongs outputPath
publikator organise <pathToMySongs> <outputPath>
```
Use the `--delete` flag to start with a clean output directory.

View file

@ -1,6 +1,6 @@
{
"name": "publikator",
"version": "0.7.0",
"version": "0.8.0",
"main": "index.js",
"repository": "https://github.com/aengl/publikator.git",
"author": "Lynn Smeria <ae@cephea.de>",

View file

@ -9,7 +9,7 @@ const tags = require('./tags');
/**
* Given a track file, return the album name.
*/
const getAlbumName = file => file.common.album.replace(/ /g, '_');
const getAlbumName = file => file.common.album.replace(/ /g, '-');
/**
* Given a track file, return the new file name.
@ -17,7 +17,7 @@ const getAlbumName = file => file.common.album.replace(/ /g, '_');
const getFileName = file =>
`${file.common.track.no}-${file.common.title}${path.extname(
file.path
)}`.replace(/ /g, '_');
)}`.replace(/ /g, '-');
/**
* Strips the extension from a file name;