Description

A package to migrate your trakt movie history to letterboxd. Currently letterboxd only supports importing from a csv, so thats all this package does at the moment. When a proper API is added, I'll update this to push the data right into your letterboxd history.

Usage

The easiest way to use this currently is with npx. You can install that globally with yarn global add npx or npm i -g npx . Once you have that, just run:

npx trakt-to-letterboxd -u username -f filename

where username is the user whose data you want to export, and filename is the name of the csv file you want to output to.

API

Table of Contents

traktHistoryToCsv

src/main/index.js:18-27

Export a trakt user's history to csv to be uploaded to letterboxd

Parameters

props Object Properties passed from argv props.userName string The user whose data you want to export props.fileName string The name of the file to output to

Properties passed from argv

Returns Promise<void> We dont return anything

headers

src/main/fetcher.js:9-13

HTTP headers to send with our request to trakt's api

options

src/main/fetcher.js:18-20

The fetch options object (only really needs headers)

fetchMovies

src/main/fetcher.js:27-38

Fetches the user's history data from the trakt api

Parameters

user string The username we're getting data for

Returns Promise<TraktMovieHistoryType> Promise that resolves to trakt history array

schema

src/main/exporter.js:8-28

Schema for the output csv. Based on https://letterboxd.com/about/importing-data/

builder

src/main/exporter.js:35-36

The instance of CsvBuilder we'll use to export the data. We need to remap the format of the last watched date to YYYY-MM-DD to comply with letterboxd's formatting