Crates.io | entry |
lib.rs | entry |
version | 0.2.1 |
source | src |
created_at | 2020-02-13 20:09:29.173191 |
updated_at | 2021-04-26 18:16:48.650698 |
description | An interactive CLI for generating JSON-formatted data from a local schema |
homepage | |
repository | |
max_upload_size | |
id | 208089 |
size | 41,288 |
An interactive CLI for generating JSON-formatted data from a local schema.
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"
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"]}
If you're looking for the version which simply allows quick note creation:
date
command and your preferred editor.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.
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.