{"id":16793654,"url":"https://github.com/bartkl/mubi2letterboxd","last_synced_at":"2025-03-17T02:24:03.411Z","repository":{"id":181844015,"uuid":"453637889","full_name":"bartkl/mubi2letterboxd","owner":"bartkl","description":"This utility downloads your MUBI data and transforms that data into the Letterboxd import format. ","archived":false,"fork":false,"pushed_at":"2022-07-11T05:32:51.000Z","size":9,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-23T12:15:04.431Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bartkl.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2022-01-30T09:30:58.000Z","updated_at":"2023-10-22T11:00:22.000Z","dependencies_parsed_at":null,"dependency_job_id":"f0fa0dfd-0bd2-47fd-b363-133191e566ec","html_url":"https://github.com/bartkl/mubi2letterboxd","commit_stats":null,"previous_names":["bartkl/mubi2letterboxd"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bartkl%2Fmubi2letterboxd","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bartkl%2Fmubi2letterboxd/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bartkl%2Fmubi2letterboxd/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bartkl%2Fmubi2letterboxd/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bartkl","download_url":"https://codeload.github.com/bartkl/mubi2letterboxd/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243960636,"owners_count":20375107,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-13T08:49:53.866Z","updated_at":"2025-03-17T02:24:03.384Z","avatar_url":"https://github.com/bartkl.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# `mubi2letterboxd`\n\nIf you want to import your MUBI ratings and reviews into your Letterboxd account, this script is for you.\n\nIt is a command-line tool written in Python that imports your MUBI data, extracts the relevant data for Letterboxd and transforms it appropriately, and finally writes a [Letterboxd input format CSV](https://letterboxd.com/about/importing-data/) that you can import [in the browser](https://letterboxd.com/import/).\n\n**Important**: Currently, the `WatchedDate` field is mapped to MUBI's `updated_at` field. Sadly, this can result in many meaningless/incorrect dates, since this value is also updated when you edit your rating, or even when a user likes your review. Right now I don't see a way around this limitation, since the MUBI API returns no more suitable datetime fields. If someone knows how to deal with this properly, please contact me.\n\n## Installation and configuration\nNone, really!\n\nAll you need is a working Python installation (version ≥ 3.6). There are no dependencies outside of the standard library, no config files and no setup or installation scripts.\nThen, you can simply clone this repository or download the `mubi2letterboxd.py` script directly. That file is all you'll need.\n\n## Usage\nTo use this script, simply invoke Python on it:\n\n```console\n$ python mubi2letterboxd.py\nError: please supply parameters to fetch MUBI data, either from a local file, or from the MUBI API.\n```\n\nAs you can see, you need to pass in some arguments in order for it to get to work. We'll get to those in a bit. First, let's invoke the help option.\n\n\n### Help\n```console\n$ python mubi2letterboxd.py -h\n\nusage: mubi2letterboxd [-h] [--output_path output-path] {file,api} ...\n\npositional arguments:\n  {file,api}\n    file                import data from a pre-downloaded text file containing the raw JSON data from the MUBI API\n                        call\n    api                 import data from MUBI by calling the API\n\noptional arguments:\n  -h, --help            show this help message and exit\n  --output_path output-path, -o output-path\n                        path to output Letterboxd CSV file to\n```\n\n### Importing from MUBI API\nThis use case is almost certainly the one you want. It connects to the MUBI API and retrieves your ratings/reviews data.\n\nYou'll need to pass in your user ID, which you can find in the URL to your profile.  For example, my profile page URL is:\n\n\u003e https://mubi.com/users/6341306\n\nSo, my user ID is `6341306`.\n\nTo run the script and fetch the data from the MUBI API, I would enter:\n\n```console\n$ python mubi2letterboxd.py api 6341306\nReading data from MUBI API at URL: `https://mubi.com/services/api/ratings` using user ID `6341306` and 100 items per call.\n\nWriting MUBI site data page 1 to the Letterbox'd CSV...   done.\nWriting MUBI site data page 2 to the Letterbox'd CSV...   done.\nWriting MUBI site data page 3 to the Letterbox'd CSV...   done.\nWriting MUBI site data page 4 to the Letterbox'd CSV...   done.\nWriting MUBI site data page 5 to the Letterbox'd CSV...   done.\nWriting MUBI site data page 6 to the Letterbox'd CSV...   done.\nWriting MUBI site data page 7 to the Letterbox'd CSV...   done.\nWriting MUBI site data page 8 to the Letterbox'd CSV...   done.\n\nSuccessfully wrote the Letterboxd import CSV file to `letterboxd.csv`.\n```\n\nAs you can see, since it defaults to the retrieval of 100 items per call, it had to do 8 calls total to fetch all my data.\nThe Letterboxd CSV file was then written to `letterboxd.csv` in the current directory, which is default.\nThis can be changed with the `--output_path` or `-o` option (see _Help_ above).\n\n#### Help\nFor a full list of supported options, ask for help this way:\n```console\n$ python mubi2letterboxd.py api -h\nusage: mubi2letterboxd api [-h] [--items-per-page ITEMS_PER_PAGE] [--base-url BASE_URL] user-id\n\npositional arguments:\n  user-id               your user ID as it appears in the URL of your profile page\n\noptional arguments:\n  -h, --help            show this help message and exit\n  --items-per-page ITEMS_PER_PAGE\n                        items to fetch per call to MUBI\n  --base-url BASE_URL   MUBI service API URL to perform requests to\n```\n\n### Importing from MUBI data file\nIf for some reason you already have downloaded the MUBI data in the literal JSON form it is outputted by the API, and have that stored in a file, you can avoid having to connect to MUBI's API and read from that file directly. I won't be detailing this scenario and refer you to the help screen:\n\n```console\n$ python mubi2letterboxd.py file -h\nusage: mubi2letterboxd file [-h] path\n\npositional arguments:\n  path        path to the file to read the data from\n\noptional arguments:\n  -h, --help  show this help message and exit\n```\n\n## Inspiration\nI was inspired by [Igor Rudenko's script](https://github.com/hextriclosan/mubi2letterboxd), but hesitated to use it since it requires installing the Go compiler. Then I figured: \"How hard can it be?\", and wrote my own version in Python.  Note that this implementation does not mirror that one, but is written from scratch.\n\n## Contact\nIf you have questions, don't hesitate to ask. It will vary how much time I have to spend on maintaining this though.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbartkl%2Fmubi2letterboxd","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbartkl%2Fmubi2letterboxd","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbartkl%2Fmubi2letterboxd/lists"}