AlfHou / hammond

Self hosted vehicle and expense management system. Like Clarkson, but better
GNU Affero General Public License v3.0
139 stars 19 forks source link

Feature: Describe how .csv should look like #46

Open SMAW opened 1 year ago

SMAW commented 1 year ago

I'm trying to import my own data (own SQL table) to Hammond, but I don't have a clue how the CSV should look like.

Maybe describe how the CSV should look like for an import (or maybe making 2 example CSV's in the repo), so people can modify/change/create their own CSV to import to the system.

AlfHou commented 1 year ago

Sorry for the late reply. Easter and all that.

So what you would like to see is some kind of CSV specification for generic imports? I think that should definately be doable. Might just reuse fuelly's format or something. I'll look into it

alienp4nda commented 1 year ago

@AlfHou I’d suggest using the structs for the fillups and expenses from the go app.

I’m also working on a generic import functionality. Allowing the user to select which field corresponds with the fillup/exspense struct.

vKnmnn commented 1 year ago

This is still needed.

It’s unclear what format the generic csv importer needs for its fields, e.g. datetime-format, decimal point comma or dot, quotes around numbers, leading zeroes and int vs float values (42.0 vs 42)

alienp4nda commented 1 year ago

@vKnmnn hope this helps for now.

Any value that has a decimal must be a delimited by a dot Datetime is any format that javascript can use to create a date using new Date() Numbers do not need a leading zero and it doesn't matter if they're quoted or not

AlfHou commented 1 year ago

Thank you @alienp4nda. We might want to add a description for this in the importer itself. I'll try to add this during the weekend.