Installation - JohanDevl/Export_Trakt_4_Letterboxd GitHub Wiki

Installation

This guide explains how to install Export Trakt 4 Letterboxd on your system.

Prerequisites

Before installing the tool, make sure you have:

  • A Trakt.tv account
  • A Trakt.tv API application (Client ID and Client Secret)

Installation Methods

Using Pre-built Binaries

The easiest way to install Export Trakt for Letterboxd is to download the pre-built binary for your platform from the releases page.

  1. Download the appropriate binary for your platform:

    • export-trakt-linux-amd64.tar.gz for Linux (64-bit)
    • export-trakt-linux-arm64.tar.gz for Linux ARM (64-bit)
    • export-trakt-darwin-amd64.tar.gz for macOS (Intel)
    • export-trakt-darwin-arm64.tar.gz for macOS (Apple Silicon)
    • export-trakt-windows-amd64.zip for Windows (64-bit)
  2. Extract the archive:

    # Linux/macOS
    tar -xzf export-trakt-[platform].tar.gz
    
    # Windows
    # Use Windows Explorer or a tool like 7-Zip to extract the ZIP file
    
  3. Move the binary to a location in your PATH (optional, for easier access):

    # Linux/macOS
    sudo mv export-trakt /usr/local/bin/
    
    # Windows
    # Move to a directory in your PATH or create a shortcut
    
  4. Verify the installation:

    export-trakt --version
    

Building from Source

To build from source, you'll need:

  • Go 1.22 or later
  • Git

Follow these steps:

  1. Clone the repository:

    git clone https://github.com/JohanDevl/Export_Trakt_4_Letterboxd.git
    cd Export_Trakt_4_Letterboxd
    
  2. Build the application:

    go build -o export-trakt ./cmd/export_trakt
    
  3. (Optional) Install the binary:

    # Linux/macOS
    sudo mv export-trakt /usr/local/bin/
    
    # Windows
    # Move to a directory in your PATH
    

Docker Installation

Using Docker is recommended for cross-platform compatibility and isolated environments.

Using Docker Compose (recommended)

  1. Create a docker-compose.yml file:

    version: "3"
    services:
      export-trakt:
        image: johandevl/export-trakt-4-letterboxd:latest
        container_name: trakt-export
        volumes:
          - ./config:/app/config
          - ./logs:/app/logs
          - ./exports:/app/exports
        restart: unless-stopped
    
  2. Start the container:

    docker-compose up -d
    
  3. Run the application:

    docker-compose exec trakt-export export-trakt
    

Using Docker directly

  1. Pull the image from Docker Hub:

    docker pull johandevl/export-trakt-4-letterboxd:latest
    
  2. Run the container:

    docker run -it --name trakt-export \
      -v $(pwd)/config:/app/config \
      -v $(pwd)/logs:/app/logs \
      -v $(pwd)/exports:/app/exports \
      johandevl/export-trakt-4-letterboxd:latest
    

For more details on using Docker, see the Docker page.

Initial Configuration

The first time you run the application, you can use the interactive setup:

export-trakt setup

This will guide you through:

  1. Creating a configuration file
  2. Authenticating with Trakt.tv
  3. Setting export preferences

For Docker users:

docker-compose exec trakt-export export-trakt setup

Trakt.tv API Setup

To use Export Trakt for Letterboxd, you need to register a Trakt.tv API application:

  1. Go to Trakt.tv API Applications
  2. Sign in to your Trakt.tv account
  3. Click "New Application"
  4. Fill in the application details:
    • Name: Export Trakt for Letterboxd
    • Redirect URI: urn:ietf:wg:oauth:2.0:oob
    • Description: Tool to export Trakt.tv data for Letterboxd import
  5. Click "Save App"
  6. Note the Client ID and Client Secret

Configuration

After installation, you need to set up your configuration:

  1. Copy the example configuration file:

    cp config/config.example.toml config/config.toml
    
  2. Edit the configuration file with your Trakt.tv API credentials:

    nano config/config.toml
    
  3. Add your Trakt.tv API credentials:

    [trakt]
    client_id = "YOUR_CLIENT_ID"
    client_secret = "YOUR_CLIENT_SECRET"
    access_token = "YOUR_ACCESS_TOKEN"
    

Important: The config/config.toml file is ignored by Git to prevent accidentally committing your credentials. Never manually add this file to Git or modify the .gitignore file to track it.

For more details on configuration options, see the Configuration page.

Verifying the Installation

After installation, you should be able to run the tool:

export-trakt --version

If everything is properly installed, you'll see the version information.