git-history icon indicating copy to clipboard operation
git-history copied to clipboard

Re-encode for my csv problem

Open scoates opened this issue 4 years ago • 4 comments

Discussed in https://github.com/simonw/git-history/discussions/50

I think I had two problems here, but they might be related:

  1. commit.tree.blobs was [] here. I changed this to use the tree['filename'] notation
  2. my data was in Latin-1/iso-8859-1 (I didn't know this at first). I added an option to --re-encode

Tests pass.

scoates avatar Dec 31 '21 20:12 scoates

FWIW:

❯ file -I scraped-data/emergency-rooms/quebec/Releve_horaire_urgences_7jours.csv

scraped-data/emergency-rooms/quebec/Releve_horaire_urgences_7jours.csv: application/csv; charset=iso-8859-1

scoates avatar Dec 31 '21 20:12 scoates

Sorry for not looking at this sooner!

I'm not keen on --re-encode as the option here. I prefer --encoding X purely for consistency with my other tool sqlite-utils: https://sqlite-utils.datasette.io/en/stable/cli-reference.html#insert

simonw avatar Jul 27 '22 23:07 simonw

I honestly forget how this works. If you're happy with the other method, so am I. (-:

scoates avatar Jul 28 '22 20:07 scoates

Can we merge this? I also encountered this issue and didn't see this PR so ended up with a similar fix but this wouldv'e saved me some time!

lassebenni avatar Sep 28 '22 21:09 lassebenni