---
date: "2024-06-11T08:12:20.000Z"
title: "2024-06-11"
draft: false
---

I found a very satisfying, time-saving use of a model though Cursor to generate an inline shell script to reformat some data for me.
The goal was to reformat json files that looked like this

```json
[...]
```

to ones that look like this

```json
{"cells" [...]}
```

I used the following prompts:

> for each json file in the current folder, read the json (which is a json list) and turn it into a json object with a single key, "cells" whose value is the json list

> the final files should have the same names as the originals

The model output this script

```sh
for file in *.json; do jq '{cells: .}' "$file" > "temp_$file" && mv "temp_$file" "$file"; done
```

and that was it.

30 seconds, problem solved.
One minor concern I have is since I didn't have to research or deeply understand the code being run, I probably won't remember this trick for next time.
I suppose if I might not remember even if I did do the research if I only needed to do this one time.

---

I don't know much about chess other than basic rules and I haven't played much either.
Regardless, I enjoyed this [video](https://www.youtube.com/watch?v=iDnW0WiCqNc) by Paralogical on analyzing billions of games to discover "rare" moves.