From 5ba8d61dfa0d36f4d63f5eb6a6a466d1a6e8a6dd Mon Sep 17 00:00:00 2001 From: gennyble Date: Fri, 25 Aug 2023 22:39:02 -0500 Subject: docs cleanup --- .whenwasit | 16 ---------------- pre-commit | 4 ++-- readme.md | 15 ++++++++------- times.csv | 16 ++++++++++++++++ 4 files changed, 26 insertions(+), 25 deletions(-) delete mode 100644 .whenwasit create mode 100644 times.csv diff --git a/.whenwasit b/.whenwasit deleted file mode 100644 index b2e7823..0000000 --- a/.whenwasit +++ /dev/null @@ -1,16 +0,0 @@ -,1692916976,1693017160,1693017161 -Cargo.toml,1692916976,1693007199,1693007319 -.whenwasit-ignore,1692930937,1692937439,1693004271 -Cargo.lock,1692916991,1692927476,1692931525 -readme.md,1692917240,1693017166,1693017222 -.whenwasit,1692931791,1693020676,1693017222 -.gitignore,1692916976,1693017172,1693017222 -.rustfmt.toml,1692917231,1692917231,1692919305 -pre-commit,1692931609,1692931684,1692931791 -.github,1693005489,1693005489,1693005673 -.github/workflows,1693005489,1693005489,1693005674 -.github/workflows/release.yml,1693005489,1693007250,1693007319 -.vscode,1693017160,1693017160,1693017160 -.vscode/settings.json,1693017160,1693017166,1693017166 -src,1692916976,1692916976,1692917221 -src/main.rs,1692916976,1693020614,1693020618 diff --git a/pre-commit b/pre-commit index 2867963..81dba14 100755 --- a/pre-commit +++ b/pre-commit @@ -1,4 +1,4 @@ #!/bin/bash # example of how it might be used in a git hook -whenwasit --ignore .whenwasit-ignore . > .whenwasit -git add .whenwasit \ No newline at end of file +whenwasit --ignore .whenwasit-ignore . > times.csv +git add times.csv \ No newline at end of file diff --git a/readme.md b/readme.md index 4a857b1..65bd3bc 100644 --- a/readme.md +++ b/readme.md @@ -7,18 +7,19 @@ file creation and modification dates, which are important to me. dumps csv output on stdout, errors abort with a panic *(this will be fixed later)*. -You can use the flag `--ignore` to stop it from descending into -directories. The flag takes a path to a file that contains a list -of directory to ignore, relative to the path given to whenwasit. -See [.whenwasit-ignore](/.whenwasit-ignore) as an example. +Use the `--format` flag *(`-f`)* to switch between outputting +`json` or `csv`. the default is `csv`. + +The flag `--ignore` can be used to ignore paths relative to +the one whenwasit was given. See [.whenwasit-ignore](/.whenwasit-ignore) +as an example. For an example on how you might use whenwasit as a git hook, see [pre-commit](/pre-commit). It runs whenwasit before commit, -makes the file [.whenwasit](/.whenwasit), and adds it to the commit. +makes the file [times.csv](/times.csv), and adds it to the commit. **CSV Output Definition:** -data is output on `stdout` in a CSV format. because there are -varying ways to make a CSV, it's described in detail below. +because there are varying ways to make a CSV, it's described in detail below. - there is no header; the first row is data - the data rows are in the format `path,btime,mtime,atime` diff --git a/times.csv b/times.csv new file mode 100644 index 0000000..9011ea4 --- /dev/null +++ b/times.csv @@ -0,0 +1,16 @@ +,1692916976,1693021142,1693020872 +Cargo.toml,1692916976,1693007199,1693007319 +.whenwasit-ignore,1692930937,1692937439,1693004271 +times.csv,1693021142,1693021142,1693021142 +Cargo.lock,1692916991,1692927476,1692931525 +readme.md,1692917240,1693021126,1693021128 +.gitignore,1692916976,1693017172,1693017222 +.rustfmt.toml,1692917231,1692917231,1692919305 +pre-commit,1692931609,1693020891,1693020891 +.github,1693005489,1693005489,1693005673 +.github/workflows,1693005489,1693005489,1693005674 +.github/workflows/release.yml,1693005489,1693007250,1693007319 +.vscode,1693017160,1693017160,1693017160 +.vscode/settings.json,1693017160,1693017166,1693017166 +src,1692916976,1692916976,1692917221 +src/main.rs,1692916976,1693020614,1693020676 -- cgit 1.4.1-3-g733a5