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.
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.
Export a trakt user's history to csv to be uploaded to letterboxd
props
Object Properties passed from argv
Returns Promise<void> We dont return anything
Export a trakt user's watchlist to csv to be uploaded to letterboxd
props
Object Properties passed from argv
Returns Promise<void> We dont return anything
HTTP headers to send with our request to trakt's api
The fetch options object (only really needs headers)
Fetches the user's history data from the trakt api
user
string The username we're getting data for
Returns Promise<TraktMovieHistoryType> Promise that resolves to trakt history array
Fetches the user's watchlist data from the trakt api
user
string The username we're getting data for
Returns Promise<TraktMovieWatchlistType> Promise that resolves to trakt watchlist array
Schema for the output csv. Based on https://letterboxd.com/about/importing-data/
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