#Python proof-of-concept for importing packagesite.yaml into FreshPorts. The steps are:
1 - From each line of 32500-line yaml file, extract 3 fields creating a csv file
2 - load cvs file into db
Step 2 takes seconds.
I need help / advice with step 1 which takes 3 minutes.
Code and examples are found here:
@dvl I have a weird idea. Is using jq an option? :-).
My hunch is that you are being CPU bound by the YAML interpreter.
This produces a similar output for me (modulo the leading ABI string).
cat packagesite.yaml | jq -r '.name + "\t" + .origin + "\t" + .version'
@evilham I like working with database tables and functions. I enjoy the design aspect.
chaos.social – a Fediverse instance for & by the Chaos community