json-to-smart-csv
finstem
json-to-smart-csv | finstem | |
---|---|---|
1 | 6 | |
1 | 15 | |
- | - | |
6.6 | 7.4 | |
10 months ago | 5 months ago | |
C# | Python | |
MIT License | - |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
json-to-smart-csv
-
Ask HN: Best thing you've made in CLI
JsonToSmartCsv: https://github.com/instantiator/json-to-smart-csv
It's a little tool to help flatten JSON.
If necessary it'll duplicate data in rows to achieve that (ie. if you need to iterate through objects within objects...)
It's highly configurable, so things can get fun and complicated if you need them to.
finstem
-
Ask HN: Best thing you've made in CLI
It ain't much, but it's honest work: https://github.com/hiAndrewQuinn/finstem
I moved to Finland a few years ago to be with my then-fiancee, now-wife. I started learning Finnish and found that constantly going to Wiktionary to search for the root forms of their words, which have 15 declensions, possessive endings, clitics similar to Japanese particles, and other craziness going on in the root form themselves.
I wrote this to let me very quickly strip away all of that and get just the original dictionary forms of words. Later I wrapped it into a little `fzf` script to make it easy to analyze entire sentences or paragraphs at once.
The code is nothing special at all, but I use this thing dozens of times daily, and it's never let me down.
-
Command Line Interface Guidelines
I know it goes without saying for most of us here, but actually being a heavy terminal user yourself is one of the most important things to understand how to design CLIs. It helps a ton to understand the ecosystem you live in, not just your own organism.
Example: Something I did a few months back ago for a tiny personal project @ https://github.com/hiAndrewQuinn/finstem was implement `--format CSV`, `TSV` and `JSON` flags. I haven't had need for any of these myself, but they exist so any future people who want to use `csvkit`, `awk` and `jq` respectively to wrap around my program have easy ways to do so. That's not stuff I would have had the instincts to do if I wasn't myself a user of all 3 of those programs.
-
Cold-Blooded Software
Most of the software I write is at least somewhat cold-blooded by this definition. My program to find the dictionary forms of Finnish words is an okay example:
https://github.com/hiAndrewQuinn/finstem
I wrote the initial draft in an afternoon almost a year ago, and from then on endeavored to only make changes which I know play nicely with my local software ecology. I usually have `fzf` installed, so an interactive mode comes as a shell script. I usually have `csvkit`, `jq`, and if all else fails `awk` installed, so my last major update was to include flags for CSV, JSON, and TSV output respectively. Etc, etc.
The build instructions intentionally eschew anything like Poetry and just gives you the shell commands I would run on a fresh Ubuntu VirtualBox VM. I hand test it every couple of months in this environment. If the need to Dockerize it ever arose I'm sure it would be straightforward, in part because the shell commands themselves are straightforward.
-
PysimpleGUI
I'm considering taking a tool I have which has a pretty nicely fleshed-out CLI interface and wrapping a GUI around it, so people who don't run desktop Linux can use it too. This seems like it might be perfect for my needs.
https://github.com/hiAndrewQuinn/finstem
-
`finstem` can now do get you the root words for full sentences and paragraphs.
Big GitHub link
-
Things I've learned about building CLI tools in Python
I build little CLI tools in Python non-stop. ChatGPT and some basic knowledge of how the `click` library works has made it almost completely trivial to get the ball rolling for whatever need I have for it, `--help` text included.
The fact that the barrier for creation is so low means I'm even willing to do them to solve very niche problems in generalizable ways. [1] is common enough that a few people have starred it. [2] is niche enough that other Anki folks haven't used it AFAICT. [3] is likely something I'll never personally need again, even though Azure VM reservations not letting you customize your reminders for when they're about to expire is probably a costly mistake for a great many firms. All generated with this same starting methodology, because what I wanted was just a little too fiddly to want to hack together with my shell toolkit.
[1]: https://github.com/hiAndrewQuinn/finstem
[2]: https://github.com/hiAndrewQuinn/table2anki
[3]: https://github.com/hiAndrewQuinn/AzureReservations2ICS