Comment by saulpw
Comment by saulpw 2 days ago
I use the .rec format whenever I want a database maintained in git/github. The format is ideal if you want reasonable data diffs.
Comment by saulpw 2 days ago
I use the .rec format whenever I want a database maintained in git/github. The format is ideal if you want reasonable data diffs.
I use VisiData[0] to view and modify in bulk. For simple error corrections I just edit the text file. For insertions as part of another process I'll write a simple script that appends a block of test to one of the .rec files.
Has support for recfiles improved recently? I was overjoyed when I learnt that VisiData had support for recfiles since I'd been getting tired of editing recfiles manually and liked VisiData's UI when working with CSVs and such.
But at least at the time (~2 years ago IIRC), the support was really basic, just basic record display, and most importantly, editing the parts VD didn't understand lead to data loss. I don't remember what I was trying to do - the error report I wrote with those details died with my old machine - but it wasn't anything too complicated, just array fields and foreign keys I believe i.e. just using recfile features one step beyond a listing of `key: value` pairs. I gave up on recfiles as a whole after losing data a few times like this (since I hadn't found any other suitable tool either).
Last I used Visidata, it didn't play nice with fields like %sort (they'd disappear if you re-saved the file) and if you had two fields with the same name in one record they'd get combined into a single field like "Name[2]:" when you re-saved. It might've also killed comments? I'm certainly not surprised it only has basic recfile support, because who use recfiles, but I'd be careful using VD with them for anything but viewing.
The front page "when you have .. but you need .." doesn't list rec files as a format. What other obscure formats does this support? I can't find a list
What tool do you use to read/write/modify? Do you do it manually?