A script to convert your ratings on filmtipset.se so they can be imported to Criticker

Wondering how Criticker works, or have a question that doesn't seem to fit under requests or bugs?
Freundh
Posts: 18
0 Ratings
Your TCI: na
Joined: Sat May 01, 2021 7:05 pm

A script to convert your ratings on filmtipset.se so they can be imported to Criticker

Post by Freundh »

Not really a question, but I couldn't decide where else to post this..

There's a Swedish site named Filmtipset with the same purpose as Criticker, but unfortunately it went unmaintained for several years, and was later bought by some other company which redesigned the page. Sadly they removed pretty much all features and for unknown reasons the recommendations also got really bad.

Filmtipset allows users to export their ratings, but the resulting .csv file is not in IMDB format, ratings are in the 1-5 range, and a lot of the films' imdb numbers are wrong, so I wrote a small script to make it easier to transfer the ratings to here. The most common error is that the imdb number has the wrong number of leading zeroes, which my scripts fixes automatically.

In retrospect it doesn't really matter since you can write your own mapping on the import page, but the script converts the ratings to 1,3,5,7,9 because I thought my ratings fit best in the 10-90 range on Criticker and I manually adjusted ratings to fill in the gaps a little.

I posted the script to Filmtipset's forums where it was well received but threads easily get buried there so most people probably won't find it, so perhaps it might be of use to someone who's already here.

Usage is pretty simple:
1. Install Python if you don't have it already.
2. Export your ratings from Filmtipset and name the file film.csv
3. Download my script and place it in the same folder as film.csv (the script should be named conv.py)
4. Open a terminal/command prompt, go to said folder, and run "python conv.py" and it will generate a file named imdb.py which should be importable by Criticker.

https://gist.github.com/JohanAR/fb67f10 ... fd77f4a98c

In case anyone in the Criticker crew wants to add support in the official importer, here's an example of how the exported data looks, or at least how it looked when I did it:

Code: Select all

VoteDate;MovieTitle;IMDB;Score
2020-10-08,Solo: A Star Wars Story;3778644;3
2020-05-16,Brazil;88846;3
2017-04-22,Stolthet och fördom;112130;5
2015-10-23,Sawako Decides;;4
2015-07-12,Yojimbo - livvakten;55630;5
Note that some titles are in Swedish, and IMDB id might be missing entirely.
Last edited by Freundh on Tue Sep 26, 2023 6:48 pm, edited 3 times in total.

90sCoffee
Posts: 173
21 Ratings
Your TCI: na
Joined: Sun Feb 17, 2013 5:15 pm

Re: I wrote a script to convert your ratings on filmtipset.se so they can be imported to Criticker

Post by 90sCoffee »

You can post it on here maybe if you speak Swedish. But tbh I don't think many people will do it if it involves python. They're more likely to do it if it's one single step where they upload the CSV to a site that does the conversion for them and gives them the output.

https://old.reddit.com/r/sweden/

Freundh
Posts: 18
0 Ratings
Your TCI: na
Joined: Sat May 01, 2021 7:05 pm

Re: I wrote a script to convert your ratings on filmtipset.se so they can be imported to Criticker

Post by Freundh »

Perhaps low chance that redditors happen to have both filmtipset and criticker accounts? Or maybe they think I'm shilling for criticker :?

It would indeed have been better to write in javascript or something that works in a browser, but unfortunately I'm not good with web dev.. I threw the script together primarily to migrate my own and my wife's data files, just thought I'd share it in case it helps a few others.

tev
Posts: 14
30 Ratings
Your TCI: na
Joined: Wed Mar 15, 2023 8:56 pm

Re: I wrote a script to convert your ratings on filmtipset.se so they can be imported to Criticker

Post by tev »

I converted it to a Javascript version on the web.

I hope you don't mind, I thought it might be useful.

(I'll take it down if you don't like it since I based it on your code just converted to JS, I put credit to you on the page.)

Here's the web version... I haven't tried importing the file into Criticker but I tested using your example file here and it produced the same output as the Python script, so hopefully it is correct. This probably won't work on really old browsers.

https://filmtipset-to-criticker.pages.dev/

(I don't actually have Filmtipset account so I don't really know why I did this other than it looked fun :D )

Freundh
Posts: 18
0 Ratings
Your TCI: na
Joined: Sat May 01, 2021 7:05 pm

Re: I wrote a script to convert your ratings on filmtipset.se so they can be imported to Criticker

Post by Freundh »

That's awesome! I used my old full csv files and it looks like the output is the same as the original output which I had also saved.

I'll post a link to your page in the forum thread on filmtipset, in case someone stumbles upon that one.

edit: Reading other comments on filmtipset I realized that our scripts need to handle commas in film titles, since the output is comma-separated csv.. I think it's ok to just filter them out since the title isn't needed by criticker. Luckily it seems like this doesn't affect criticker (all the info it needs is in the first 2 columns) because movies like "I, Robot" got imported anyway.

Machou
Posts: 2
262 Ratings
Your TCI: na
Joined: Wed Sep 23, 2020 7:11 pm

Re: I wrote a script to convert your ratings on filmtipset.se so they can be imported to Criticker

Post by Machou »

we can import IMDb ratings on Criticker ? if yes, where can i do ?

tev
Posts: 14
30 Ratings
Your TCI: na
Joined: Wed Mar 15, 2023 8:56 pm

Re: I wrote a script to convert your ratings on filmtipset.se so they can be imported to Criticker

Post by tev »

@Freundh Ok! I updated it to quote " and , in the CSV, (and made the page formatting a very tiny bit better 😝). Thanks!! 😁

(Edit: I made the web script quote " and , in the way that Excel type programs do, to preserve them. That should work with programs that expect standard CSV (Excel, CSV parsing libraries etc). But I noticed that you had said remove the commas, I'm guessing quoting them as CSV will be fine, but if it causes problems I can remove them entirely.)

Post Reply