diff options
-rwxr-xr-x | pre-commit | 4 | ||||
-rw-r--r-- | readme.md | 15 | ||||
-rw-r--r-- | times.csv (renamed from .whenwasit) | 10 |
3 files changed, 15 insertions, 14 deletions
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/.whenwasit b/times.csv index b2e7823..9011ea4 100644 --- a/.whenwasit +++ b/times.csv @@ -1,16 +1,16 @@ -,1692916976,1693017160,1693017161 +,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,1693017166,1693017222 -.whenwasit,1692931791,1693020676,1693017222 +readme.md,1692917240,1693021126,1693021128 .gitignore,1692916976,1693017172,1693017222 .rustfmt.toml,1692917231,1692917231,1692919305 -pre-commit,1692931609,1692931684,1692931791 +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,1693020618 +src/main.rs,1692916976,1693020614,1693020676 |