From 46e7fbbb218619942e0deea0ce696fd9d4bb16d2 Mon Sep 17 00:00:00 2001 From: Chigozirim Igweamaka Date: Sat, 3 Aug 2024 12:27:56 +0100 Subject: [PATCH] Update README.md --- README.md | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 5095c1f..257863e 100644 --- a/README.md +++ b/README.md @@ -41,7 +41,7 @@ npm install ``` ## Usage :bicyclist: -▸ Setup MongoDB +#### ▸ Setup MongoDB To configure the database connection, you need to set the following environment variables: - `DB_USER`: The username for the MongoDB database. @@ -53,26 +53,32 @@ To configure the database connection, you need to set the following environment The database connection URI is constructed using the environment variables. If the `DB_USER` or `DB_PASS` environment variables are not set, it defaults to connecting to `mongodb://localhost:27017`. -▸ Start the Client App +#### ▸ Start the Client App ``` cd client npm start ``` -▸ Serve the Backend App +#### ▸ Start the Backend App ``` cd .. # to go to the root dir -go run main.go serve [-proto ] [-port ] +go run main.go serve [-proto (default: http)] [-port (default: 5000)] ``` -▸ Download a Song +#### ▸ Download a Song Note: A link from Spotify's mobile app won't work. You can copy the link from either the desktop or web app. ``` go run main.go download ``` -▸ Find matches for a song/recording +#### ▸ Save local songs to DB (supports all audio formats) +``` +go run main.go save [-f|--force] +``` +The `-f` or `--force` flag allows saving the song even if a YouTube ID is not found. Note that the frontend will not display matches without a YouTube ID. + +#### ▸ Find matches for a song/recording ``` go run main.go find ``` -▸ Delete fingerprints and songs +#### ▸ Delete fingerprints and songs ``` go run main.go erase ``` @@ -125,7 +131,7 @@ Final prediction: Voilà by André Rieu , score: 5390686.00 ## Todo -- [ ] Enable song addition from WAV files +- [x] Implement saving local songs to DB - [ ] Add support for file-based DB as an alternative to MongoDB. ## Author :black_nib: