Few Word Do Trick (fwdt) is a cross-platform general purpose fast logger that supports templated designs
Data entry by humans is error prone. I know this from first hand experience. I had a job for a couple years which required exact data entry. Even after filling the same fields for years I found that I still made data errors from time to time. Though I do not have the evidence in front of me I assume that the average human can't generate flawless entries especially as the number of those entries increase to larger numbers.
Recently I stumbled across a ham radio data logger fle. It is a domain specific language (DSL) which allows data entry with minimal repetition. This command line utility is similar in spirit, but does not invent its own DSL. It uses incomplete csv files as the data input and outputs complete csv files.
Assume a user has the final dataset in mind. Using wc -m
The character count is 453
.
date group mycall operator received sent freq time call
1 2022-08-08 cw wq8R wq8R 599 599 7.2230 1107 qr3e
2 2022-08-08 cw wq8R wq8R 599 599 7.2230 1113 kn6h
3 2022-08-08 cw wq8R wq8R 599 599 7.2230 1127 ae0bc
4 2022-08-08 cw wq8R wq8R 599 599 7.2230 1207 ae4bc
5 2022-08-08 cw wq8R wq8R 599 599 14.223 1207 qr3e
6 2022-08-08 cw wq8R wq8R 599 599 14.223 1213 kn6h
7 2022-08-08 cw wq8R wq8R 599 599 14.223 1217 a2rat
8 2022-08-08 cw wq8R wq8R 599 599 14.223 1217 ko7rqq
If a user erases the repetitive data the character count may be reduced to 187
.
The only data the user must enter is shown below. I will refer to these incomplete
csv files as fast logged (fl) files.
date,group,mycall,operator,received,sent,freq,time,call
2022-08-08,cw,wq8R,wq8R,599,599,7.2230,1107,qr3e
1113,kn6h
1127,ae0bc
1207,ae4bc
14.223,1207,qr3e
1213,kn6h
1217,a8rat
1217,ko7rqq
If this were mapped to the original formatting it would be easier to see what was erased.
date group mycall operator received sent freq time call
1 2022-08-08 cw wq8R wq8R 599 599 7.22 1107 qr3e
2 NA NA NA NA NA NA NA 1113 kn6h
3 NA NA NA NA NA NA NA 1127 ae0bc
4 NA NA NA NA NA NA NA 1207 ae4bc
5 NA NA NA NA NA NA 14.2 1207 qr3e
6 NA NA NA NA NA NA NA 1213 kn6h
7 NA NA NA NA NA NA NA 1217 a8rat
8 NA NA NA NA NA NA NA 1217 ko7rqq
The command used to go from a fl file to a csv file, which is comma separated, is:
fwdt -s, test/data/radio_log_small.csv
The output is
date,group,mycall,operator,received,sent,freq,time,call
2022-08-08,cw,wq8R,wq8R,599,599,7.2230,1107,qr3e
2022-08-08,cw,wq8R,wq8R,599,599,7.2230,1113,kn6h
2022-08-08,cw,wq8R,wq8R,599,599,7.2230,1127,ae0bc
2022-08-08,cw,wq8R,wq8R,599,599,7.2230,1207,ae4bc
2022-08-08,cw,wq8R,wq8R,599,599,14.223,1207,qr3e
2022-08-08,cw,wq8R,wq8R,599,599,14.223,1213,kn6h
2022-08-08,cw,wq8R,wq8R,599,599,14.223,1217,a8rat
2022-08-08,cw,wq8R,wq8R,599,599,14.223,1217,ko7rqq
The rules are very simple.
cargo install fwdt
How do I know when to use fl files over csv?
Scorch is defined as [1 - (fl_word_count/csv_word_count)]
. Using the example at the top of the page fl_word_count=187
and csv_word_count=453
, so 1 - (187/453) ~ 59%
. This is an uncommonly high scorch. It
represents the percent of text saved by using a fl file over a complete csv. Even if scorch is smaller, 5%,
that is still 5% that will not have to entered by hand thus will be error free.
``` fwdt 0.1.0 📝🔥 Few Word Do Trick (fwdt) is a fast data logger 📝🔥
Example Usage:
fwdt -s, data.csv
USAGE: fwdt [FLAGS] [OPTIONS] [FILE]
FLAGS: -d, --debug-mode Print object details to make it easier for the maintainer to find and resolve bugs. -h, --help Prints help information -V, --version Prints version information
OPTIONS:
-s, --delimiter fwdt -s ' '
test/data/power_lift.csv
. Example #2 fwdt -s, test/data/radio_log_small.csv
ARGS: