https://github.com/mormani/movies-list-csv-converter
NodeJS app that parses a CSV file of Movies, Series and Episodes, converts to well know CSV templates and after that you can import to some website.
https://github.com/mormani/movies-list-csv-converter
csv imdb nodejs notion tmdb trakt
Last synced: about 1 month ago
JSON representation
NodeJS app that parses a CSV file of Movies, Series and Episodes, converts to well know CSV templates and after that you can import to some website.
- Host: GitHub
- URL: https://github.com/mormani/movies-list-csv-converter
- Owner: Mormani
- Created: 2025-01-18T20:16:44.000Z (9 months ago)
- Default Branch: master
- Last Pushed: 2025-01-18T22:09:24.000Z (9 months ago)
- Last Synced: 2025-03-12T18:26:24.206Z (7 months ago)
- Topics: csv, imdb, nodejs, notion, tmdb, trakt
- Language: JavaScript
- Homepage:
- Size: 12.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Movies list CSV Converter
This is a simple NodeJS application that parses a CSV file of Movies, Series and Episodes exported from websites, converts to well know [CSV templates](./data/templates/) and after that you can import at some websites.- [Websites supported](#websites-supported)
- [How to use](#how-to-use)
- [Parameters](#parameters)
- [`--exported` (required)](#--exported-required)
- [`--to-import` (optional)](#--to-import-optional)
- [`--watched` or `--no-watched` (optional)](#--watched-or---no-watched-optional)
- [`--favorites` or `--no-favorites` (optional)](#--favorites-or---no-favorites-optional)
- [`--after-date` (optional)](#--after-date-optional)
- [Concerns](#concerns)## Websites supported
[IMDB](https://imdb.com), [TMDB](https://themoviedb.org), [Trakt](https://trakt.tv) and Custom [Notion](https://notion.so) Database are the websites that are going to be supported. Here is the current status of the project:- Implemented parsers of exported files
- [ ] IMDB
- [ ] TMDB
- [ ] Trakt (exported using [Trakt.tv backup](https://darekkay.com/blog/trakt-tv-backup/) from Darek Kay)
- [x] [Custom Notion Database](./src/types/Notion.js#L21)
- Implemented converters to import files
- [x] [IMDB](./src/types/IMDB.js#L9)
- [ ] Trakt## How to use
1. Export your list from the website you want to convert;
2. Clone this repository;
3. Install the dependencies with `npm install`;
4. Replace the variables at the [env file](./.env.example) with your own and rename it to `.env`;
5. Run the command bellow replacing the parameters.```bash
node index.js -e [-i ] [-w] [-f] [-a ]
```### Parameters
#### `--exported` (required)
Short form: `-e`.Path of the exported CSV file from a website, might be saved at [./data/export/](./data/export/) inside the directory of the website.
#### `--to-import` (optional)
Short form: `-i`.
Default: `IMDB`.Website to import the converted CSV file, must be `IMDB` or `Trakt` and the file is going to be saved at [./data/import/](./data/import/) inside the directory of the website.
#### `--watched` or `--no-watched` (optional)
Short form: `-w`.
Default: `--watched`.Whether filter only watched items.
#### `--favorites` or `--no-favorites` (optional)
Short form: `-f`.
Default: `--no-favorites`.Whether filter only favorites items.
#### `--after-date` (optional)
Default: `""` (empty string).Filter only items after a specific date, must be in ISO format.
### Concerns
- Since Notion uses a custom database, you need to replace the map values at [`Notion.Parser.headers.exported`](./src/types/Notion.js#L9) to match the columns of your database.
- Some data might be missing important informations to identify the media, so you can use [`TMDB.findInfos`](./src/types/TMDB.js#L45) to find the media by type, name and year, after that is returned `originalTitle`, `ids.TMDB` and `ids.IMDB`.
- Dates range in Notion are split by an arrow and spaces (` → `), so you can use [`Notion.Parser.normalizeDate`](./src/types/Notion.js#L82) to get only one date.
- Most of websites rate the media from 0 to 10, don't forget to convert if needed.