Skip to content

Commit

Permalink
docs: add docker usage steps
Browse files Browse the repository at this point in the history
  • Loading branch information
f0e committed Jul 31, 2024
1 parent b3270be commit 1d46dfe
Showing 1 changed file with 22 additions and 9 deletions.
31 changes: 22 additions & 9 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,21 @@

Script to sync your Letterboxd ratings to your Trakt account.

## Config

- To obtain values for `trakt_client_id` and `trakt_client_secret`, [create a Trakt application](https://trakt.tv/oauth/applications) with the following values:
- Name: letterboxd-trakt-sync
- Redirect URI: `urn:ietf:wg:oauth:2.0:oob`
- Enable the /scrobble permission.
- Leave the trakt_oauth values as null, these will be populated by the script.

## Usage (Manual)

- Install the requirements: `python install -r requirements.txt`
- Run the script: `python letterboxd_trakt/main.py`
- This will generate a template config at `config.yml`, you need to fill in the values.
- To obtain values for `trakt_client_id` and `trakt_client_secret`, [create a Trakt application](https://trakt.tv/oauth/applications) with the following values:
- Name: letterboxd-trakt-sync
- Redirect URI: `urn:ietf:wg:oauth:2.0:oob`
- Enable the /scrobble permission.
- Leave the trakt_oauth values as null, these will be populated by the script.
- This will generate a template config at `config.yml`, you need to [fill in the values](#config).

## Usage (Docker)

You will need to view the docker logs whenever adding new accounts to your config and authorise the Trakt application.
## Setup (Docker)

### cli

Expand All @@ -40,6 +41,18 @@ services:
- /<host_folder_config>:/config
```
### Usage
#### Initial run
- On initial run a default config will be created in the `/config` directory. You then need to [fill in the values](#config).

- After you have filled out your config, restart the container.

- You will then need to view the docker logs to access the code required to authorise the Trakt application. (You will also need to do this whenever you add new accounts to your config). e.g.
- `docker logs letterboxd-trakt-sync`
- `> Your user code is: A84F9B0D, please navigate to https://trakt.tv/activate to authenticate`

### Optional environment variables

- `RUN_ONCE`: set to `true` to run the script immediately on container start.
Expand Down

0 comments on commit 1d46dfe

Please sign in to comment.