tfonteyn / NeverTooManyBooks

A book collection app for Android
GNU General Public License v3.0
70 stars 3 forks source link

[Feature Request] Goodreads csv compatibility #55

Closed ngocanhtve closed 1 month ago

ngocanhtve commented 1 month ago

Currently, the csv exported from Goodreads has a different format than NeverTooManyBooks, so when importing into NeverTooManyBooks, the information fields are not fully imported.

Is there a solution/script to make Goodreads csv format compatible with NeverTooManyBooks?

tfonteyn commented 1 month ago

theoretically it's just a matter of changing (or adding) a header line with the correct field names.

I need to document the format/names really :-(

I've not looked at a goodreads csv file yet, but will do when I get some time.

tfonteyn commented 1 month ago

It was raining a lot today... so I ended up implementing this.

Basic tests are importing fine, but my test data from Goodreads is limited to some 20 books I uploaded in the past. Their own sample file from the their Import/Export is hopelessly out-of-date missing lots of columns👎

If you have a longer list and wish to share it, please upload it here and I'll test.

It's not finished yet though, it will take some more time - I need to figure out how to do updates. Right now I can only import "New books only" (Skip existing) or "All books" (Overwrite).

ngocanhtve commented 1 month ago

I have an export from Goodreads and when I import it, the author information field is missing, with comment information field too. I also just tested the sample file in your cmt. Same issue. Or perhaps I'll research a bit on json's structure of NeverTooManyBooks to see if it's possible to convert csv to json that compatible.

tfonteyn commented 1 month ago

don't bother - that's what I wrote code to do for yesterday :-) Converting the fields as was easy to add to my CSV importer.

The only thing really missing in the GR export file is a field with "last-updated" date. Without such a field it's not possible to do only updates to books. It's only possible to either skip or overwrite.

But now I need to improve on the first iteration of yesterdays work.

tfonteyn commented 1 month ago

ok, functionality is now as complete as possible (but see last comment on "last-updated" date). This feature will be in the next release.

I presume some (broken or weird) book data might give an issues, but I'll need to tackle those as-and-when they happen. Importing from CSV is always a risk.

ngocanhtve commented 1 month ago

The only thing really missing in the GR export file is a field with "last-updated" date. Without such a field it's not possible to do only updates to books.

Anyway, when importing, i have to add a cover and make other small mod, so just set the last update date to the import time, please!

tfonteyn commented 1 month ago

Here you go ... 6.0.0 apk

I've tested with current Goodreads CSV exports only - I just don't have older one. But should you come across any problems, then of course just log an issue and I'll look into it.