This finds all instances of @ALPHANUMERIC
(e.g. roughly matches the regex
@[a-zA-Z0-9]
) across .txt
, .md
, and .org
recursively under the current
directory.
The purpose of this script is to basically let me manage information in plaintext much more easily. I've added a separate file giving [a rough overview of how I apply it to different usecases][].
A prime motivation was to move away from more commercial software. Even though I can afford to use a few subscription services, I feel like it's better to simplify my processes down. This has multiple benefits:
The main bit of commercial software I still use is Dropbox, so I can get
information across all my devices without having to worry about doing things
like syncing git. I do however have a cronjob which backs up this information to
git. One change this makes to my process is using the file extension .txt
instead of .md
for my markdown files; this simply lets me utilise Dropbox's
full-text search from the web or android app to find information when I don't
have access to a terminal and my own helper scripts.
Can be either installed from source, or installed with cargo
:
From source:
git clone git@github.com:Chrisdavison/tagsearch
cd tagsearch
cargo install --path . --force
From cargo
cargo install tagsearch
regex = "1"
glob = "0.3.0"
lazy_static = "1.4.0"
structopt = "0.3.3"
Current usage string:
``` tagsearch 0.27.0 search for, and/or summarise, tags in plaintext files
USAGE: tagsearch [FLAGS] [OPTIONS] [--] [keywords]...
FLAGS: -c, --count Show count of tags -h, --help Prints help information -l, --list List all tags for files matching keywords --long Long list (e.g. tall) all tags for files matching keywords -o, --or-filter Filter using ANY, rather than ALL keywords --similar-tags Show similar tags -u, --untagged Show untagged files -V, --version Prints version information -v, --vim Output format suitable for vim quickfix
OPTIONS:
--not
ARGS:
Examples
```
tagsearch
tagsearch --long
tagsearch golang
tagsearch -l golang
tagsearch rust --not video
tagsearch -o spanish espanol ```