5 releases
0.2.1 | Apr 26, 2021 |
---|---|
0.2.0 | Apr 25, 2021 |
0.1.2 | Feb 15, 2020 |
0.1.1 | Feb 14, 2020 |
0.1.0 | Feb 13, 2020 |
#31 in #journal
24KB
512 lines
entry
An interactive CLI for generating JSON-formatted data from a local schema.
Installation
Simply run the following:
cargo install entry
Make sure that you have cargo installed and that cargo is in your path:
export PATH="$HOME/.cargo/bin:$PATH"
Examples
The entry command-line tool currently has three main subcommands.
entry schema # has various subcommands for schemas
$ entry schema new # Interactively generates a new schema
Enter a name for the schema
...
$ entry schema list # lists all saved schemas
migraine
$ entry schema show migraine | jq # displays the given schema
{
"shape": {
"activities": {
"count": "many",
"data_type": "string"
},
"date": {
"count": "one",
"data_type": "date"
},
"foods": {
"count": "many",
"data_type": "string"
},
"painScale": {
"count": "one",
"data_type": "number"
}
}
}
$ entry schema remove migraine # removes a given schema
Successfully removed schema `migraine`
$ entry for migraine # interactively generate a new entry for a given schema
Please provide the activities (array of strings)
...
{date:"2020/04/02",painScale:7,foods:["tomato"],activities:["run"]}
$ entry last # shows the last JSON-formatted entry in case of error
{date:"2020/04/02",painScale:7,foods:["tomato"],activities:["run"]}
Previous versions
If you're looking for the version which simply allows quick note creation:
- You can build from source for v0.1.2.
- Use a shell alias/function the
date
command and your preferred editor. - Fork from v0.1.2 if you'd like to improve upon that functionality.
I'm no longer supporting the note-taking feature, since I've started preferring recording notes and data following some schema so that I can graph out the data over time.
Contributing
Feel free to make pull requests. I've been using conventional commits, but I have not yet set up formal contributing guidelines. This is my first time working with Rust, so I imagine there are some issues with it.
Dependencies
~4–5.5MB
~87K SLoC