AB1908 / GOG-Galaxy-Export-Script

Export your list of games from GOG Galaxy
MIT License
150 stars 27 forks source link

Rough draft of incorporating how long to beat times #35

Open shaapaoja opened 3 years ago

shaapaoja commented 3 years ago

Used the howlongtobeatpy to incorporate the how long to beat times. This does add a substantial amount of time to the script, so it probably should not be done by default.

shaapaoja commented 3 years ago

Created a draft pull request because I imagine there is a good chance that this is not how you would want this accomplished. Regardless I thought I would at least share what I put together because for a project I was working on I needed an idea on game completion times.

Varstahl commented 3 years ago

There's nothing wrong with the code, although I'm wondering if we should merge this:

For smaller libraries it's a no brainer, but for huge libraries this can cause a lot of issues. If we want this feature, I would suggest doing a 2 pass for it, keep the export as is, and then use a second script to embed download times into the CSV, with caching to speed it up.

I'll let @AB1908 be the judge of that.

shaapaoja commented 3 years ago

Added significant performance improvements with the latest changes. I would suggest you try again as you have a larger library than I do. I looked into the howlongtobeat.com site and didn't see any particular way to get a batch of games at once except for using a steam ID, which clearly will not work for this case. I also ran this many times today and did not run into any DDOS type issues. Regardless if there is more that people can think of I would consider looking into helping more, but I personally believe it is in a pretty good state now. The first draft I knew was in a pretty rough state, but now I think it could actually be usable. I will obviously let you and @AB1908 be the judges though.

shaapaoja commented 3 years ago

Also forgot to mention I converted everything to be only in hours as I personally wanted to be able to easily sort by these times in Google Sheets. I created a number format of the following "# ?/? "Hours"; ; ; @" to show up nicely while being able to also add sorting.

AB1908 commented 3 years ago

Wow, I've been busy and this was indeed on my todo list. This code is now far beyond what I can comprehend so I might have to do quite a bit of reading before I can fully understand and review the thing. Thanks for all the work though!

I think @Varstahl raised quite a few good points and I do prefer the output in hours as well. I believe converting hours to days, months, etc is quite doable on a user's end.

Initially, I had thought of doing a "percent match" when using HLTB and I'd set a threshold for a value to be accepted. Does the library have anything like that? If not, I suppose we'll have to come up other ideas lest we allow false positives to creep in. What are your thoughts?

FolkSong commented 3 years ago

I think it may have broken, for me the output file has "UNAVAILABLE" as every entry in the HLTB columns.

AB1908 commented 3 years ago

I've been unable to test this as I've been busy with some other projects. Perhaps the HLTB wrapper has changed significantly since last this was used.

FolkSong commented 2 years ago

Just FYI I've started using Playnite which has HLTB and export plugins, so please don't look at this for my sake. I would suggest anyone using Gog Galaxy to give Playnite a try.

AB1908 commented 2 years ago

I've done exactly the same. Playnite seems to be much better suited to my needs and offers native export options haha.