38 lines
1.6 KiB
Plaintext
38 lines
1.6 KiB
Plaintext
;Task:
|
|
Write a simple tool to track a small set of data.
|
|
|
|
The tool should have a command-line interface to enter at least two different values.
|
|
|
|
The entered data should be stored in a structured format and saved to disk.
|
|
|
|
It does not matter what kind of data is being tracked. It could be a collection (CDs, coins, baseball cards, books), a diary, an electronic organizer (birthdays/anniversaries/phone numbers/addresses), etc.
|
|
|
|
|
|
You should track the following details:
|
|
* A description of the item. (e.g., title, name)
|
|
* A category or tag (genre, topic, relationship such as “friend” or “family”)
|
|
* A date (either the date when the entry was made or some other date that is meaningful, like the birthday); the date may be generated or entered manually
|
|
* Other optional fields
|
|
|
|
<br>
|
|
The command should support the following [[Command-line arguments]] to run:
|
|
* Add a new entry
|
|
* Print the latest entry
|
|
* Print the latest entry for each category
|
|
* Print all entries sorted by a date
|
|
|
|
<br>
|
|
The category may be realized as a tag or as structure (by making all entries in that category subitems)
|
|
|
|
The file format on disk should be human readable, but it need not be standardized. A natively available format that doesn't need an external library is preferred. Avoid developing your own format if you can use an already existing one. If there is no existing format available, pick one of:
|
|
:::* [[JSON]]
|
|
:::* [[S-Expressions]]
|
|
:::* [[YAML]]
|
|
:::* [[wp:Comparison_of_data_serialization_formats|others]]
|
|
|
|
|
|
;Related task:
|
|
* [[Take notes on the command line]]
|
|
<br><br>
|
|
|