Giter Site home page Giter Site logo

trakt-to-letterboxd's Introduction

trakt-to-letterboxd

CircleCI codecov Commitizen friendly

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

Returns Promise<void> We dont return anything

traktWatchlistToCsv

src/main/index.js:38-47

Export a trakt user's watchlist 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

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

fetchWatchlist

src/main/fetcher.js:48-59

Fetches the user's watchlist data from the trakt api

Parameters

  • user string The username we're getting data for

Returns Promise<TraktMovieWatchlistType> Promise that resolves to trakt watchlist 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

trakt-to-letterboxd's People

Contributors

dependabot-preview[bot] avatar bbeesley avatar semantic-release-bot avatar frm avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.