Skip to content

Commit

Permalink
Update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisDavison committed Mar 10, 2021
1 parent aaada0b commit 5e03830
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 34 deletions.
78 changes: 47 additions & 31 deletions README.md
Expand Up @@ -43,17 +43,19 @@ have access to a terminal and my own helper scripts.

## Installation

Download the repo
Can be either installed from source, or installed with `cargo`:

git clone git@github.com:Chrisdavison/tagsearch
***From source:***

Change to the repo directory
```
git clone git@github.com:Chrisdavison/tagsearch
cd tagsearch
cargo install --path . --force
```

cd tagsearch
***From cargo***

Build and install

cargo install --path . --force
`cargo install tagsearch`

### Dependencies

Expand All @@ -66,35 +68,49 @@ Build and install

Current usage string:

tagsearch 0.9.0
search for, and/or summarise, tags in plaintext files

USAGE:
tagsearch [FLAGS] [keywords]...
```
tagsearch 0.27.0
search for, and/or summarise, tags in plaintext files
FLAGS:
-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
-u, --untagged Show untagged files
-V, --version Prints version information
USAGE:
tagsearch [FLAGS] [OPTIONS] [--] [keywords]...
ARGS:
<keywords>... Keywords to filter by (prefix with ! for negative-match)
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
Unimplemented (as of yet), after change to rust:
OPTIONS:
--not <not>... Keywords to inverse filter (i.e. ignore matching files)
-n, --numeric When listing, sort by number of tags, and show number
-s, --summarise List tags and matching files
ARGS:
<keywords>... Keywords to filter
```

Examples

tagsearch # defaults to -l|--long
tagsearch --long # to show a tall list of tags
tagsearch golang # Show files tagged 'golang'
tagsearch -l golang # List all tags associated with files tagged 'golang'
tagsearch rust '!video' # Show files tagged 'rust', but NOT tagged 'video'
tagsearch --OR spanish espanol # Show files that match spanish OR espanol
```
# display all tags
tagsearch
# display all tags in a column (like ls -l)
tagsearch --long
# Show files tagged 'golang'
tagsearch golang
# List all tags that occur along with golang
tagsearch -l golang
# Show files tagged 'rust', but NOT tagged 'video'
tagsearch rust --not video
Note that you must wrap *not*-filters in quotes, as shells often do something special with `!`
# Show files that match spanish OR espanol
tagsearch -o spanish espanol
```
5 changes: 2 additions & 3 deletions bin/main.rs
Expand Up @@ -7,8 +7,7 @@ use tagsearch::{filter, utility::*};
#[derive(Debug, StructOpt)]
#[structopt(
name = "tagsearch",
about = "search for, and/or summarise, tags in plaintext files",
version = "0.9.1"
about = "search for, and/or summarise, tags in plaintext files"
)]
struct Opt {
/// Keywords to filter
Expand Down Expand Up @@ -150,5 +149,5 @@ fn display_tag_count(f: filter::Filter, files: &[String]) -> Result<(), std::io:
for (count, key) in f.count_of_tags(&files) {
writeln!(&mut std::io::stdout(), "{:5} {}", count, key)?;
}
files Ok(())
Ok(())
}

0 comments on commit 5e03830

Please sign in to comment.