๐Ÿ”ฅ ๐Ÿ“ (fwdt) "few word do trick" is a cross platform manual fast logger

Overview

alternate text

Few Word Do Trick (fwdt)

Few Word Do Trick (fwdt) is a cross-platform general purpose fast logger for humans that supports incomplete csvs for a better data entry experience.

alternate text


Two Laws Of Human Data Entry

First Law: To prevent data entry errors, never enter data.

Second Law: When First Law is not possible only enter changes.


alternate text

Personal Anecdote

Data entry by humans is error prone. I know this from first hand experience. Though I do not have the evidence in front of me I assume that the average person 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 Amature Radio specific DSL. It uses incomplete csv files as the data input and outputs complete csv files.

Getting Started

The command used to go from a fl file to a csv file, which is comma separated, is:

# get the data
wget https://raw.githubusercontent.com/alexhallam/fwdt/main/test/data/radio_log_small.csv
# output the imputed csv file
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

Automatic Updates

I prefer immediate feedback. It is possible to pipe the output of fwdt to tidy-viewer. If entr is used then previews of data changes can be made each time the file is saved!

alternate text

find . | entr sh -c 'fwdt -s, radio_log_small.csv | tidy-viewer'

Details

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

How to make a valid fast log file

The rules are very simple.

  1. The first two lines (column headers and the first line of data) must be complete. The first line of data is the "mother line". This is the base for future recursive data imputation when data is not present.
  2. All subsequent lines are replaced by the right most column. (Put columns that change the most frequently to the right).

Install

cargo install fwdt

Scorch

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.

Help

fwdt 0.1.2
๐Ÿ“๐Ÿ”ฅ Few Word Do Trick (fwdt) is a fast data logger ๐Ÿ“๐Ÿ”ฅ

    Example Usage:
    fwdt -s, data.csv

USAGE:
    fwdt [FLAGS] [OPTIONS] [FILE]

FLAGS:
    -b, --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 <delimiter>    The delimiter separating the columns. Example #1 `fwdt -s ' '
                                   test/data/power_lift.csv`. Example #2 `fwdt -s, test/data/radio_log_small.csv`
    -d, --ditto <ditto>            A Ditto Mark to explicitly tell the program to fill cell with the previous line's
                                   cell value. Example #1 `fwdt -s, -d. test/data/radio_log_small.csv` [default: .]

ARGS:
    <FILE>    Data file to process
You might also like...
Native cross-platform full feature terminal-based sequence editor for git interactive rebase.
Native cross-platform full feature terminal-based sequence editor for git interactive rebase.

Native cross-platform full feature terminal-based sequence editor for git interactive rebase.

Cross-platform Rust rewrite of the GNU coreutils
Cross-platform Rust rewrite of the GNU coreutils

Cross-platform Rust rewrite of the GNU coreutils

Rust-battery - Rust crate providing cross-platform information about the notebook batteries.

battery Rust crate providing cross-platform information about the notebook batteries. Table of contents Overview Supported platforms Install Examples

Cross-platform CLI Rimworld Mod manager. Still under development

rwm Inspired by Spoons rmm. This is a cross-platform Mod Manager for RimWorld intended to work with macOS, linux and Windows Up to now, you must have

Build light & secure cross-platform applications with a web-based UI
Build light & secure cross-platform applications with a web-based UI

Millennium Icon by XFaon. *Stats are from Tauri and may not be fully accurate. Millennium is a cross-platform webview framework written in Rust. With

A cross-platform file sorting program

Cabinet Cross-platform file sorting system that sorts files based on their attributes, such as file type, file name and date modified. Disclaimer: Not

A cross platform, rust implementation for the Tegra X1 bootROM exploit
A cross platform, rust implementation for the Tegra X1 bootROM exploit

Switcheroo A CLI and GUI for the RCM BootRom exploit (Fusรฉe Gelรฉe exploit for Nintendo Switch) Only works on unpatched Switches: https://ismyswitchpat

Cross-platform WebView library in Rust for Tauri.
Cross-platform WebView library in Rust for Tauri.

Cross-platform WebView rendering library in Rust that supports all major desktop platforms like Windows, macOS, and Linux. Overview Wry connects the w

Write Cross-platform application with React-like decralative UI framework and scalable ECS architecture all in Rust.

bevy_dioxus Dioxus Plugin for Bevy Write Cross-platform application with React-like decralative UI framework and scalable ECS architecture all in Rust

Releases(0.1.1)
Owner
Alex Hallam
Senior Data Scientist "Life is uncertain; always eat your dessert first."
Alex Hallam
Drop-in replacement for the Actix Web HTTP Logger middleware

actix-contrib-logger Logger middleware for the Actix Web framework. Actually it's a copy & paste from the official Logger middleware (original source

Mariano Ruiz 5 Aug 28, 2023
Alacritty - A fast, cross-platform, OpenGL terminal emulator

Alacritty is a modern terminal emulator that comes with sensible defaults, but allows for extensive configuration. By integrating with other applications, rather than reimplementing their functionality, it manages to provide a flexible set of features with high performance. The supported platforms currently consist of BSD, Linux, macOS and Windows.

Alacritty 43.8k Dec 31, 2022
Rusty fast cross-platform 2D drawing library

Bly Rusty fast cross-platform 2D graphics library Concept Easy to use Bly is easy to use and yet can be called from various windowing libraries using

null 4 Feb 27, 2023
Cross-platform Rust library for coloring and formatting terminal output

Coloring terminal output Documentation term-painter is a cross-platform (i.e. also non-ANSI terminals) Rust library for coloring and formatting termin

Lukas Kalbertodt 75 Jul 28, 2022
Cross platform terminal library rust

Cross-platform Terminal Manipulation Library Crossterm is a pure-rust, terminal manipulation library that makes it possible to write cross-platform te

crossterm-rs 2.1k Jan 2, 2023
A cross platform minimalistic text user interface

titik Titik is a crossplatform TUI widget library with the goal of being able to interact intuitively on these widgets. It uses crossterm as the under

Jovansonlee Cesar 113 Dec 31, 2022
A cross-platform graphical process/system monitor with a customizable interface and a multitude of features

A cross-platform graphical process/system monitor with a customizable interface and a multitude of features. Supports Linux, macOS, and Windows. Inspired by both gtop and gotop.

Clement Tsang 5.8k Jan 8, 2023
Cross-platform terminal screen clearing library

ClearScreen Cross-platform terminal screen clearing library. API documentation. Dual-licensed with Apache 2.0 and MIT. Uses Caretaker Maintainership.

null 23 Dec 30, 2022
Cross-platform terminal program to download IEEE journals

IEEE Journal Downloader A cross-platform terminal program which tries to download every article in a specified journal and merge the documents into on

Fong Chien Yoong 18 Jul 23, 2022
๐Ÿ“บ(tv) Tidy Viewer is a cross-platform CLI csv pretty printer that uses column styling to maximize viewer enjoyment.

??(tv) Tidy Viewer is a cross-platform CLI csv pretty printer that uses column styling to maximize viewer enjoyment.

Alex Hallam 1.8k Jan 2, 2023