All apps · 0 apps
Trakt-Tools
Docker app from grtgbln's Repository
Overview
Readme
View on GitHubTrakt.tv tools
- Trakt.tv tools
Purpose
- Import Movies or TVShows IDs from CSV file format into Trakt.tv.
- Import Ratings of Movies or TVShows IDs from CSV file format into Trakt.tv.
- Export Movies or TVShows IDs from Trakt.tv list into CSV file format.
- Create trakt.tv custom list from TDMB discover with filter.
Requirements
You must use Python 3.x.
On Docker
To run Docker hub image
$ docker pull xbgmsharp/docker-trakt-tools
$ docker run -it --rm --name my-trakt-tools xbgmsharp/docker-trakt-tools python export_trakt.py -v
export_trakt.py 0.3
You might need to use the --privileged options on some case/
$ docker run --privileged -it --rm --name my-trakt-tools xbgmsharp/docker-trakt-tools python export_trakt.py -v
export_trakt.py 0.3
Create and edit default config
$ docker run -it --rm \
--name my-trakt-tools \
-v $(pwd):/trakt/export \
-v $(pwd):/trakt/config \
xbgmsharp/docker-trakt-tools \
python export_trakt.py -c config/config.ini
Run export
$ docker run -it --rm \
--name my-trakt-tools \
-v $(pwd):/trakt/export \
-v $(pwd):/trakt/config \
xbgmsharp/docker-trakt-tools \
python export_trakt.py -c config/config.ini -o export/export_movies_history.csv
my-trakt-tools is the container name.
xbgmsharp/docker-trakt-tools is the image name.
To build the image
$ docker build -t xbgmsharp/docker-trakt-tools .
To build the multi-arch image
$ ./multi-arch-docker-ci.sh
On Ubuntu/Debian Linux system
Ensure you are running Python 3
$ python -V
Python 3.5
Setup venv and install dependencies
python -m venv .venv
source .venv/bin/activate
pip3 install -r requirements.txt
On Windows system
Download the installer: https://www.python.org/downloads/windows/
Ensure you are running Python 3
<python dir>>python.exe -V
Python 3.5
Setup venv and install dependencies
python -m venv .venv
.venv\Scripts\activate.bat
pip3 install -r requirements.txt
On macOS system
Download the installer: https://www.python.org/downloads/mac-osx/
Append to PATH in ZSH
$ path=('/Library/Frameworks/Python.framework/Versions/3.8/bin' $path)
Ensure you are running Python 3
$ python3 -V
Python 3.8.5
Run Install Certificates.command
$ pip3 install certifi
Open a new Terminal session so that certificates will be available
Setup venv and install dependencies
python -m venv .venv
source .venv/bin/activate
pip3 install -r requirements.txt
Usage
Create an Trakt.tv application to have your own
client_idandclient_secret, https://trakt.tv/oauth/applications. You only need to fill up theNamewith aDescriptionandRedirect uritourn:ietf:wg:oauth:2.0:oob, leave the rest empty and click onSAVE APP.Run the script to create a default config file
config.ini
$ python export_trakt.py
- Edit the config file
config.iniand specify theclient_idandclient_secretas well as any other settings appropriate to your enviromenent, eg: URL, proxy, etc... Refer to Configuration details section for more information.
$ vim config.ini
- Run the script to authenticate against Trakt.tv API using the PIN method and it will generate an
access_tokenandrefresh_token. You will be prompted to open a link into a browser and paste the pincode back to the script. The generatedaccess_tokenandrefresh_tokenare automaticaly saved into the config fileconfig.ini.
$ python export_trakt.py
Configuration
Configuration sample
[TRAKT]
client_id = xxxxxxxxxxxxxxxxxxxxxxxxx
client_secret = xxxxxxxxxxxxxxxxxxxxxx
access_token =
refresh_token =
baseurl = https://api-v2launch.trakt.tv
[SETTINGS]
proxy = False
proxy_host = https://127.0.0.1
proxy_port = 3128
Configuration details
client_id: Uniq ID to identify your application, https://trakt.tv/oauth/applicationsclient_secret: Uniq ID to identify your application, https://trakt.tv/oauth/applicationsaccess_token: Uniq ID to identify yourself against your application, manage by the scriptrefresh_token: Uniq ID to identify yourself against your application, manage by the scriptbaseurl: API base URL, depends on the platfrom, eg: Production (https://api-v2launch.trakt.tv) or Staging (https://api-staging.trakt.tv)proxy: True/False setting to enable proxy supportproxy_host: Full URI of the proxyproxy_port: Port of the proxy to connect to
Developer documentation
$ pydoc `pwd`/import_trakt.py
$ pydoc `pwd`/export_trakt.py
$ pydoc `pwd`/sync_tmdb_trakt.py
Howto
Import
Export
Export data from trakt.tv into CSV
Sync
Create trakt.tv list from TDMB discover with filter
Export data from Kodi
Export Movies or TVShows IDs from Kodi into CSV file format. Export data from Kodi
Export data from CouchPotato
Export Movies IDs from CouchPotato into CSV file format. Export data from CouchPotato
Support
To get support, please create new issue
Contribution
I'm happy to accept Pull Requests!
License
This script is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
Install Trakt-Tools on Unraid in a few clicks.
Find Trakt-Tools in Community Apps on your Unraid server, review the template, and click Install. Unraid handles the Docker app or plugin setup from the published template.
Requirements
This is a CLI tool. Open a Console in the container and run `python export_trakt.py` or `python import_trakt.py` to use it.
User will need to create a `config.ini` file in the Config Path: https://github.com/xbgmsharp/trakt?tab=readme-ov-file#configuration
Download Statistics
Related apps
Explore more like this
Explore allDetails
xbgmsharp/docker-trakt-tools:latestRuntime arguments
- Network
bridge- Privileged
- false
Template configuration
Path to config files
- Target
- /trakt/config
- Default
- /mnt/user/appdata/trakt_tools/config
- Value
- /mnt/user/appdata/trakt_tools/config
Path to export files
- Target
- /trakt/export
- Default
- /mnt/user/appdata/trakt_tools/export
- Value
- /mnt/user/appdata/trakt_tools/export