Skip to content

Commit

Permalink
update setup docs
Browse files Browse the repository at this point in the history
  • Loading branch information
patkub committed Nov 2, 2024
1 parent 32c4c55 commit 28bd34c
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 7 deletions.
17 changes: 11 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,23 +16,27 @@ Enjoy listening to music and learning a new language!

### Install

Requires [pipx](https://pipx.pypa.io/stable/)
Requires Python 3.11+ and [pipx](https://pipx.pypa.io/stable/).

Install the `console-songs` script with pipx.
```
pipx install .
```

Setup environment variables
Setup environment variables with your API keys.
```
export "CS_GENIUS_ACCESS_TOKEN=..."
export "CS_MS_TRANSLATOR_KEY=..."
export "CS_MS_TRANSLATOR_REGION=..."
```
Reference documentation to get API keys.
- [Genius API](https://docs.genius.com)
- [Azure Translator Resource](https://learn.microsoft.com/en-us/azure/ai-services/translator/create-translator-resource)


### Usage

Provide the song and optionally the artist's name
Provide the song and optionally the artist's name.
```
console-songs song [artist]
```
Expand All @@ -59,7 +63,7 @@ options:

Example:
```
python3 songs.py "Ma ucide ea" "Mihail"
console-songs "Ma ucide ea" "Mihail"
```

### Sample Output
Expand Down Expand Up @@ -90,7 +94,7 @@ Ochii mei, rușinați, coboară doritor My eyes, ash
<summary>Full Output</summary>

```
(console-songs) patka@Patricks-MacBook-Air console-songs % python3 songs.py "Ma ucide ea" "Mihail"
(console-songs) patka@Patricks-MacBook-Air console-songs % console-songs "Ma ucide ea" "Mihail"
Searching for "Ma ucide ea" by Mihail...
Done.
Expand Down Expand Up @@ -167,12 +171,13 @@ Da, da... Yes, yes...
### Development Setup
Requires Python 3.11+

Create an `.env` file with your API keys:
Create an `.env` file with your API keys.
```
CS_GENIUS_ACCESS_TOKEN=...
CS_MS_TRANSLATOR_KEY=...
CS_MS_TRANSLATOR_REGION=...
```
Reference documentation to get API keys.
- [Genius API](https://docs.genius.com)
- [Azure Translator Resource](https://learn.microsoft.com/en-us/azure/ai-services/translator/create-translator-resource)

Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ dependencies = [
"side-by-side",
"beautifulsoup4"
]
requires-python = ">=3.8"
requires-python = ">=3.11"
authors = [
{name = "Patrick Kubiak", email = "epicpatka@gmail.com"}
]
Expand Down

0 comments on commit 28bd34c

Please sign in to comment.