CLI Tool for tagging and organizing files by tags.

Related tags

Command-line wutag
Overview

wutag 🔱 🏷️

master

CLI tool for tagging and organizing files by tags.

Example usage

Install

If you use arch Linux and have AUR repositories set up you can use your favourite AUR manager to download wutag. For example with paru:

  • paru -S wutag
  • or latest master branch with paru -S wutag-git

If you're on another Linux distribution or MacOS you can download one of the prebuilt binaries from here.

To build manually you'll need latest rust and cargo. Build with:

  • cargo build --release

Usage

By default each tag will be assigned with a random color from 8 base colors (either bright or normal so 16 colors in total). You can later edit each tag by using edit subcommand like this:

  • wutag edit '**' school --color 0x1f1f1f
  • or wutag edit '**' code --color '#ff00aa'
  • or wutag edit '**' work --color FF0000
  • The colors are case insensitive

Each command by default starts filesystem traversal from current working directory. To override this behaviour specify a global parameter --dir or -d like this:

  • wutag -d ~/photos search doge

Default recursion depth is set to 2. To increase it use --max-depth or -m global parameter.

After tagging your files with set like:

  • wutag set '*.jpg' photos
  • wutag set 'DCIM_12*' doge
    you can easily get the list of files with specified tags by doing wutag search photos doge.

To utilize the list by other programs pass the --raw or -r flag to search subcommand like:

  • wutag search -r --any cat doge | xargs rm -rf # please don't do this :(.

When --any flag is provided as in the example wutag will match files containing any of the provided tags rather than all of them.

If you are into emojis then surely you can use emojis to tag files 🙂 wutag set '*.doc' 📋

Persistance

This tool uses extra attributes also known as xattrs to store metadata so it might not work on certain filesystems. A thing to keep in mind is that most transfer tools require opt-in flag to transfer xattrs like rsync with option -X, --xattrs or cp with --preserve=xattr while mv preserves xattrs by default.

Adding aliases in your .bashrc like alias cp="cp --preserve=xattr" might help avoiding accidental removal of tags.

GUI file managers seem to support them by default, only tested with nautilus, Thunar and Dolphin though so mileage may vary.

Support for Windows will be added through NTFS data streams which offer access to extended attributes. I haven't yet tested if they can be preserved while transfering to other filesystems.

MacOS and Linux should work out of the box.

Tab completion

To get tab completion use wutag print-completions > /path/to/completions/dir/... to enable it in your favourite shell.

Available shells are:

  • bash
  • elvish
  • fish
  • powershell
  • zsh

To enable completions on the fly use:

  • . <(wutag print-completions bash)

User interface

USAGE:
    wutag [FLAGS] [OPTIONS] 

FLAGS:
    -h, --help        Prints help information
    -n, --no-color    If passed the output won't be colored
    -V, --version     Prints version information

OPTIONS:
    -d, --dir                 When this parameter is specified the program will look for files
                                   starting from provided path, otherwise defaults to current
                                   directory
    -m, --max-depth     If provided increase maximum recursion depth of filesystem
                                   traversal to specified value, otherwise default depth is 2

SUBCOMMANDS:
    clear                Clears all tags of the files that match the provided pattern
    cp                   Copies tags from the specified file to files that match a pattern
    edit                 Edits the tag of files that match the provided pattern
    help                 Prints this message or the help of the given subcommand(s)
    list                 Lists all tags of the files that match the provided pattern
    print-completions    Prints completions for the specified shell to stdout
    rm                   Removes the specified tags of the files that match the provided pattern
    search               Searches for files that have all of the provided `tags`
    set                  Tags the files that match the given pattern with specified tags

License

MIT

Comments
  • Rewrite

    Rewrite

    This PR is a big rewrite of the core functionality. Now the tags and entries are stored locally to a file in a OS cache directory. This allows for much better output and faster execution.

    Closes: #6 Closes: #29

    opened by vv9k 13
  • purpose of the program

    purpose of the program

    Can we perform any file operations like copy,remove etc on the files based on tags ? If not, is it intended for viewing tags only ?

    is there a way to pipe file names only to stdout , to perform file operations ?

    I request you to provide that feature ( just printing file names only) to make the program more useful.

    opened by muralikodali 5
  • Make actions and output scriptable first

    Make actions and output scriptable first

    Hello,

    I want to tag a specify directory or file. For file should i specify -m 1 in order to prevent to go in subdir ?

    I think it's because of -d option but we can not use a fullpath to add a file ?

    Maybe i have issues/miss with something.

    feature 
    opened by HumanG33k 3
  • Errors on compile E0061, E0432, E0599

    Errors on compile E0061, E0432, E0599

    I'm trying to compile the latest version, but get errors

    uname -a
    Linux dm 5.18.2-arch1-1 #1 SMP PREEMPT_DYNAMIC Mon, 06 Jun 2022 19:58:58 +0000 x86_64 GNU/Linux
    
    rustc --version
    rustc 1.61.0 (Arch Linux rust 1:1.61.0-1)
    
    cargo version
    cargo 1.61.0
    

    When I clone and run

    cargo build --release
    

    I get this:

    cargo build --release
        Updating crates.io index
        Updating git repository `https://github.com/wojciechkepka/colored`
       Compiling libc v0.2.126
       Compiling autocfg v1.1.0
       Compiling proc-macro2 v1.0.39
       Compiling unicode-ident v1.0.0
       Compiling syn v1.0.96
       Compiling cfg-if v1.0.0
       Compiling memchr v2.5.0
       Compiling serde_derive v1.0.137
       Compiling serde v1.0.137
       Compiling log v0.4.17
       Compiling hashbrown v0.11.2
       Compiling crossbeam-utils v0.8.8
       Compiling lazy_static v1.4.0
       Compiling regex-syntax v0.6.26
       Compiling os_str_bytes v6.1.0
       Compiling bitflags v1.3.2
       Compiling textwrap v0.15.0
       Compiling once_cell v1.12.0
       Compiling termcolor v1.1.3
       Compiling strsim v0.10.0
       Compiling same-file v1.0.6
       Compiling fnv v1.0.7
       Compiling ppv-lite86 v0.2.16
       Compiling linked-hash-map v0.5.4
       Compiling anyhow v1.0.57
       Compiling half v1.8.2
       Compiling ryu v1.0.10
       Compiling base64 v0.13.0
       Compiling walkdir v2.3.2
       Compiling thread_local v1.1.4
       Compiling yaml-rust v0.4.5
       Compiling clap_lex v0.2.0
       Compiling indexmap v1.8.2
       Compiling num-traits v0.2.15
       Compiling num-integer v0.1.45
       Compiling aho-corasick v0.7.18
       Compiling bstr v0.2.17
       Compiling quote v1.0.18
       Compiling atty v0.2.14
       Compiling getrandom v0.2.6
       Compiling time v0.1.43
       Compiling dirs-sys v0.3.7
       Compiling clap v3.1.18
       Compiling dirs v3.0.2
       Compiling rand_core v0.6.3
       Compiling rand_chacha v0.3.1
       Compiling rand v0.8.5
       Compiling regex v1.5.6
       Compiling clap_complete v3.1.4
       Compiling clap_generate v3.0.3
       Compiling globset v0.4.9
       Compiling thiserror-impl v1.0.31
       Compiling ignore v0.4.18
       Compiling globwalk v0.8.1
       Compiling thiserror v1.0.31
       Compiling chrono v0.4.19
       Compiling serde_cbor v0.11.2
       Compiling serde_yaml v0.8.24
       Compiling colored v2.0.0 (https://github.com/wojciechkepka/colored?branch=master#24f77eda)
       Compiling wutag v0.4.0 (/home/dm/opt/wutag)
    error[E0432]: unresolved import `clap::Clap`
     --> src/opt.rs:5:25
      |
    5 | use clap::{AppSettings, Clap};
      |                         ^^^^ no `Clap` in the root
    
    error[E0432]: unresolved import `clap::Clap`
     --> src/main.rs:7:5
      |
    7 | use clap::Clap;
      |     ^^^^^^^^^^ no `Clap` in the root
    
    error: cannot determine resolution for the derive macro `Clap`
      --> src/opt.rs:12:10
       |
    12 | #[derive(Clap)]
       |          ^^^^
       |
       = note: import resolution is stuck, try simplifying macro imports
    
    error: cannot find attribute `clap` in this scope
      --> src/opt.rs:13:3
       |
    13 | #[clap(
       |   ^^^^
       |
       = note: `clap` is in scope, but it is a crate, not an attribute
    
    error: cannot find attribute `clap` in this scope
      --> src/opt.rs:21:7
       |
    21 |     #[clap(short, long)]
       |       ^^^^
       |
       = note: `clap` is in scope, but it is a crate, not an attribute
    
    error: cannot find attribute `clap` in this scope
      --> src/opt.rs:26:7
       |
    26 |     #[clap(long, short)]
       |       ^^^^
       |
       = note: `clap` is in scope, but it is a crate, not an attribute
    
    error: cannot find attribute `clap` in this scope
      --> src/opt.rs:32:7
       |
    32 |     #[clap(long, short)]
       |       ^^^^
       |
       = note: `clap` is in scope, but it is a crate, not an attribute
    
    error: cannot find attribute `clap` in this scope
      --> src/opt.rs:34:7
       |
    34 |     #[clap(subcommand)]
       |       ^^^^
       |
       = note: `clap` is in scope, but it is a crate, not an attribute
    
    error: cannot determine resolution for the derive macro `Clap`
      --> src/opt.rs:38:10
       |
    38 | #[derive(Clap)]
       |          ^^^^
       |
       = note: import resolution is stuck, try simplifying macro imports
    
    error: cannot find attribute `clap` in this scope
      --> src/opt.rs:42:11
       |
    42 |         #[clap(long, short = 't')]
       |           ^^^^
       |
       = note: `clap` is in scope, but it is a crate, not an attribute
    
    error: cannot determine resolution for the derive macro `Clap`
      --> src/opt.rs:48:10
       |
    48 | #[derive(Clap)]
       |          ^^^^
       |
       = note: import resolution is stuck, try simplifying macro imports
    
    error: cannot find attribute `clap` in this scope
      --> src/opt.rs:50:7
       |
    50 |     #[clap(subcommand)]
       |       ^^^^
       |
       = note: `clap` is in scope, but it is a crate, not an attribute
    
    error: cannot find attribute `clap` in this scope
      --> src/opt.rs:53:7
       |
    53 |     #[clap(long, short)]
       |       ^^^^
       |
       = note: `clap` is in scope, but it is a crate, not an attribute
    
    error: cannot determine resolution for the derive macro `Clap`
      --> src/opt.rs:58:10
       |
    58 | #[derive(Clap)]
       |          ^^^^
       |
       = note: import resolution is stuck, try simplifying macro imports
    
    error: cannot find attribute `clap` in this scope
      --> src/opt.rs:62:7
       |
    62 |     #[clap(required = true)]
       |       ^^^^
       |
       = note: `clap` is in scope, but it is a crate, not an attribute
    
    error: cannot determine resolution for the derive macro `Clap`
      --> src/opt.rs:66:10
       |
    66 | #[derive(Clap)]
       |          ^^^^
       |
       = note: import resolution is stuck, try simplifying macro imports
    
    error: cannot determine resolution for the derive macro `Clap`
      --> src/opt.rs:73:10
       |
    73 | #[derive(Clap)]
       |          ^^^^
       |
       = note: import resolution is stuck, try simplifying macro imports
    
    error: cannot determine resolution for the derive macro `Clap`
      --> src/opt.rs:78:10
       |
    78 | #[derive(Clap)]
       |          ^^^^
       |
       = note: import resolution is stuck, try simplifying macro imports
    
    error: cannot find attribute `clap` in this scope
      --> src/opt.rs:80:7
       |
    80 |     #[clap(required = true)]
       |       ^^^^
       |
       = note: `clap` is in scope, but it is a crate, not an attribute
    
    error: cannot find attribute `clap` in this scope
      --> src/opt.rs:82:7
       |
    82 |     #[clap(long, short)]
       |       ^^^^
       |
       = note: `clap` is in scope, but it is a crate, not an attribute
    
    error: cannot find attribute `clap` in this scope
      --> src/opt.rs:85:7
       |
    85 |     #[clap(long, short)]
       |       ^^^^
       |
       = note: `clap` is in scope, but it is a crate, not an attribute
    
    error: cannot determine resolution for the derive macro `Clap`
      --> src/opt.rs:90:10
       |
    90 | #[derive(Clap)]
       |          ^^^^
       |
       = note: import resolution is stuck, try simplifying macro imports
    
    error: cannot determine resolution for the derive macro `Clap`
      --> src/opt.rs:98:10
       |
    98 | #[derive(Clap)]
       |          ^^^^
       |
       = note: import resolution is stuck, try simplifying macro imports
    
    error: cannot find attribute `clap` in this scope
       --> src/opt.rs:102:7
        |
    102 |     #[clap(long, short)]
        |       ^^^^
        |
        = note: `clap` is in scope, but it is a crate, not an attribute
    
    error: cannot determine resolution for the derive macro `Clap`
       --> src/opt.rs:109:10
        |
    109 | #[derive(Clap)]
        |          ^^^^
        |
        = note: import resolution is stuck, try simplifying macro imports
    
    error: cannot determine resolution for the derive macro `Clap`
       --> src/opt.rs:133:10
        |
    133 | #[derive(Clap)]
        |          ^^^^
        |
        = note: import resolution is stuck, try simplifying macro imports
    
    error: cannot determine resolution for the derive macro `Clap`
       --> src/opt.rs:140:10
        |
    140 | #[derive(Clap)]
        |          ^^^^
        |
        = note: import resolution is stuck, try simplifying macro imports
    
    warning: unused import: `AppSettings`
     --> src/opt.rs:5:12
      |
    5 | use clap::{AppSettings, Clap};
      |            ^^^^^^^^^^^
      |
      = note: `#[warn(unused_imports)]` on by default
    
    warning: use of deprecated function `clap_generate::generate`: Renamed to `clap_complete`
       --> src/app.rs:374:13
        |
    374 |             generate,
        |             ^^^^^^^^
        |
        = note: `#[warn(deprecated)]` on by default
    
    warning: use of deprecated function `clap_generate::generate`: Renamed to `clap_complete`
       --> src/app.rs:381:28
        |
    381 |             Shell::Bash => generate::<Bash, _>(&mut app, APP_NAME, &mut io::stdout()),
        |                            ^^^^^^^^
    
    warning: use of deprecated function `clap_generate::generate`: Renamed to `clap_complete`
       --> src/app.rs:382:30
        |
    382 |             Shell::Elvish => generate::<Elvish, _>(&mut app, APP_NAME, &mut io::stdout()),
        |                              ^^^^^^^^
    
    warning: use of deprecated function `clap_generate::generate`: Renamed to `clap_complete`
       --> src/app.rs:383:28
        |
    383 |             Shell::Fish => generate::<Fish, _>(&mut app, APP_NAME, &mut io::stdout()),
        |                            ^^^^^^^^
    
    warning: use of deprecated function `clap_generate::generate`: Renamed to `clap_complete`
       --> src/app.rs:384:34
        |
    384 |             Shell::PowerShell => generate::<PowerShell, _>(&mut app, APP_NAME, &mut io::stdout()),
        |                                  ^^^^^^^^
    
    warning: use of deprecated function `clap_generate::generate`: Renamed to `clap_complete`
       --> src/app.rs:385:27
        |
    385 |             Shell::Zsh => generate::<Zsh, _>(&mut app, APP_NAME, &mut io::stdout()),
        |                           ^^^^^^^^
    
    error[E0599]: no function or associated item named `into_app` found for struct `Opts` in the current scope
       --> src/app.rs:378:29
        |
    378 |         let mut app = Opts::into_app();
        |                             ^^^^^^^^ function or associated item not found in `Opts`
        |
       ::: src/opt.rs:20:1
        |
    20  | pub struct Opts {
        | --------------- function or associated item `into_app` not found for this
        |
        = help: items from traits can only be used if the trait is implemented and in scope
        = note: the following trait defines an item `into_app`, perhaps you need to implement it:
                candidate #1: `CommandFactory`
    
    error[E0061]: this function takes 4 arguments but 3 arguments were supplied
       --> src/app.rs:381:28
        |
    381 |             Shell::Bash => generate::<Bash, _>(&mut app, APP_NAME, &mut io::stdout()),
        |                            ^^^^^^^^^^^^^^^^^^^ --------  --------  ----------------- supplied 3 arguments
        |                            |
        |                            expected 4 arguments
        |
    note: function defined here
       --> /home/dm/.cargo/registry/src/github.com-1ecc6299db9ec823/clap_generate-3.0.3/src/lib.rs:38:8
        |
    38  | pub fn generate<G, S>(gen: G, app: &mut clap::App, bin_name: S, buf: &mut dyn Write)
        |        ^^^^^^^^
    
    error[E0061]: this function takes 4 arguments but 3 arguments were supplied
       --> src/app.rs:382:30
        |
    382 |             Shell::Elvish => generate::<Elvish, _>(&mut app, APP_NAME, &mut io::stdout()),
        |                              ^^^^^^^^^^^^^^^^^^^^^ --------  --------  ----------------- supplied 3 arguments
        |                              |
        |                              expected 4 arguments
        |
    note: function defined here
       --> /home/dm/.cargo/registry/src/github.com-1ecc6299db9ec823/clap_generate-3.0.3/src/lib.rs:38:8
        |
    38  | pub fn generate<G, S>(gen: G, app: &mut clap::App, bin_name: S, buf: &mut dyn Write)
        |        ^^^^^^^^
    
    error[E0061]: this function takes 4 arguments but 3 arguments were supplied
       --> src/app.rs:383:28
        |
    383 |             Shell::Fish => generate::<Fish, _>(&mut app, APP_NAME, &mut io::stdout()),
        |                            ^^^^^^^^^^^^^^^^^^^ --------  --------  ----------------- supplied 3 arguments
        |                            |
        |                            expected 4 arguments
        |
    note: function defined here
       --> /home/dm/.cargo/registry/src/github.com-1ecc6299db9ec823/clap_generate-3.0.3/src/lib.rs:38:8
        |
    38  | pub fn generate<G, S>(gen: G, app: &mut clap::App, bin_name: S, buf: &mut dyn Write)
        |        ^^^^^^^^
    
    error[E0061]: this function takes 4 arguments but 3 arguments were supplied
       --> src/app.rs:384:34
        |
    384 |             Shell::PowerShell => generate::<PowerShell, _>(&mut app, APP_NAME, &mut io::stdout()),
        |                                  ^^^^^^^^^^^^^^^^^^^^^^^^^ --------  --------  ----------------- supplied 3 arguments
        |                                  |
        |                                  expected 4 arguments
        |
    note: function defined here
       --> /home/dm/.cargo/registry/src/github.com-1ecc6299db9ec823/clap_generate-3.0.3/src/lib.rs:38:8
        |
    38  | pub fn generate<G, S>(gen: G, app: &mut clap::App, bin_name: S, buf: &mut dyn Write)
        |        ^^^^^^^^
    
    error[E0061]: this function takes 4 arguments but 3 arguments were supplied
       --> src/app.rs:385:27
        |
    385 |             Shell::Zsh => generate::<Zsh, _>(&mut app, APP_NAME, &mut io::stdout()),
        |                           ^^^^^^^^^^^^^^^^^^ --------  --------  ----------------- supplied 3 arguments
        |                           |
        |                           expected 4 arguments
        |
    note: function defined here
       --> /home/dm/.cargo/registry/src/github.com-1ecc6299db9ec823/clap_generate-3.0.3/src/lib.rs:38:8
        |
    38  | pub fn generate<G, S>(gen: G, app: &mut clap::App, bin_name: S, buf: &mut dyn Write)
        |        ^^^^^^^^
    
    error[E0599]: no function or associated item named `parse` found for struct `Opts` in the current scope
      --> src/main.rs:36:36
       |
    36 |     if let Err(e) = App::run(Opts::parse(), config) {
       |                                    ^^^^^ function or associated item not found in `Opts`
       |
      ::: src/opt.rs:20:1
       |
    20 | pub struct Opts {
       | --------------- function or associated item `parse` not found for this
       |
       = help: items from traits can only be used if the trait is implemented and in scope
       = note: the following trait defines an item `parse`, perhaps you need to implement it:
               candidate #1: `Parser`
    
    warning: unused import: `clap::IntoApp`
     --> src/app.rs:2:5
      |
    2 | use clap::IntoApp;
      |     ^^^^^^^^^^^^^
    
    Some errors have detailed explanations: E0061, E0432, E0599.
    For more information about an error, try `rustc --explain E0061`.
    warning: `wutag` (bin "wutag") generated 8 warnings
    error: could not compile `wutag` due to 34 previous errors; 8 warnings emittedcargo build --release
        Updating crates.io index
        Updating git repository `https://github.com/wojciechkepka/colored`
       Compiling libc v0.2.126
       Compiling autocfg v1.1.0
       Compiling proc-macro2 v1.0.39
       Compiling unicode-ident v1.0.0
       Compiling syn v1.0.96
       Compiling cfg-if v1.0.0
       Compiling memchr v2.5.0
       Compiling serde_derive v1.0.137
       Compiling serde v1.0.137
       Compiling log v0.4.17
       Compiling hashbrown v0.11.2
       Compiling crossbeam-utils v0.8.8
       Compiling lazy_static v1.4.0
       Compiling regex-syntax v0.6.26
       Compiling os_str_bytes v6.1.0
       Compiling bitflags v1.3.2
       Compiling textwrap v0.15.0
       Compiling once_cell v1.12.0
       Compiling termcolor v1.1.3
       Compiling strsim v0.10.0
       Compiling same-file v1.0.6
       Compiling fnv v1.0.7
       Compiling ppv-lite86 v0.2.16
       Compiling linked-hash-map v0.5.4
       Compiling anyhow v1.0.57
       Compiling half v1.8.2
       Compiling ryu v1.0.10
       Compiling base64 v0.13.0
       Compiling walkdir v2.3.2
       Compiling thread_local v1.1.4
       Compiling yaml-rust v0.4.5
       Compiling clap_lex v0.2.0
       Compiling indexmap v1.8.2
       Compiling num-traits v0.2.15
       Compiling num-integer v0.1.45
       Compiling aho-corasick v0.7.18
       Compiling bstr v0.2.17
       Compiling quote v1.0.18
       Compiling atty v0.2.14
       Compiling getrandom v0.2.6
       Compiling time v0.1.43
       Compiling dirs-sys v0.3.7
       Compiling clap v3.1.18
       Compiling dirs v3.0.2
       Compiling rand_core v0.6.3
       Compiling rand_chacha v0.3.1
       Compiling rand v0.8.5
       Compiling regex v1.5.6
       Compiling clap_complete v3.1.4
       Compiling clap_generate v3.0.3
       Compiling globset v0.4.9
       Compiling thiserror-impl v1.0.31
       Compiling ignore v0.4.18
       Compiling globwalk v0.8.1
       Compiling thiserror v1.0.31
       Compiling chrono v0.4.19
       Compiling serde_cbor v0.11.2
       Compiling serde_yaml v0.8.24
       Compiling colored v2.0.0 (https://github.com/wojciechkepka/colored?branch=master#24f77eda)
       Compiling wutag v0.4.0 (/home/dm/opt/wutag)
    error[E0432]: unresolved import `clap::Clap`
     --> src/opt.rs:5:25
      |
    5 | use clap::{AppSettings, Clap};
      |                         ^^^^ no `Clap` in the root
    
    error[E0432]: unresolved import `clap::Clap`
     --> src/main.rs:7:5
      |
    7 | use clap::Clap;
      |     ^^^^^^^^^^ no `Clap` in the root
    
    error: cannot determine resolution for the derive macro `Clap`
      --> src/opt.rs:12:10
       |
    12 | #[derive(Clap)]
       |          ^^^^
       |
       = note: import resolution is stuck, try simplifying macro imports
    
    error: cannot find attribute `clap` in this scope
      --> src/opt.rs:13:3
       |
    13 | #[clap(
       |   ^^^^
       |
       = note: `clap` is in scope, but it is a crate, not an attribute
    
    error: cannot find attribute `clap` in this scope
      --> src/opt.rs:21:7
       |
    21 |     #[clap(short, long)]
       |       ^^^^
       |
       = note: `clap` is in scope, but it is a crate, not an attribute
    
    error: cannot find attribute `clap` in this scope
      --> src/opt.rs:26:7
       |
    26 |     #[clap(long, short)]
       |       ^^^^
       |
       = note: `clap` is in scope, but it is a crate, not an attribute
    
    error: cannot find attribute `clap` in this scope
      --> src/opt.rs:32:7
       |
    32 |     #[clap(long, short)]
       |       ^^^^
       |
       = note: `clap` is in scope, but it is a crate, not an attribute
    
    error: cannot find attribute `clap` in this scope
      --> src/opt.rs:34:7
       |
    34 |     #[clap(subcommand)]
       |       ^^^^
       |
       = note: `clap` is in scope, but it is a crate, not an attribute
    
    error: cannot determine resolution for the derive macro `Clap`
      --> src/opt.rs:38:10
       |
    38 | #[derive(Clap)]
       |          ^^^^
       |
       = note: import resolution is stuck, try simplifying macro imports
    
    error: cannot find attribute `clap` in this scope
      --> src/opt.rs:42:11
       |
    42 |         #[clap(long, short = 't')]
       |           ^^^^
       |
       = note: `clap` is in scope, but it is a crate, not an attribute
    
    error: cannot determine resolution for the derive macro `Clap`
      --> src/opt.rs:48:10
       |
    48 | #[derive(Clap)]
       |          ^^^^
       |
       = note: import resolution is stuck, try simplifying macro imports
    
    error: cannot find attribute `clap` in this scope
      --> src/opt.rs:50:7
       |
    50 |     #[clap(subcommand)]
       |       ^^^^
       |
       = note: `clap` is in scope, but it is a crate, not an attribute
    
    error: cannot find attribute `clap` in this scope
      --> src/opt.rs:53:7
       |
    53 |     #[clap(long, short)]
       |       ^^^^
       |
       = note: `clap` is in scope, but it is a crate, not an attribute
    
    error: cannot determine resolution for the derive macro `Clap`
      --> src/opt.rs:58:10
       |
    58 | #[derive(Clap)]
       |          ^^^^
       |
       = note: import resolution is stuck, try simplifying macro imports
    
    error: cannot find attribute `clap` in this scope
      --> src/opt.rs:62:7
       |
    62 |     #[clap(required = true)]
       |       ^^^^
       |
       = note: `clap` is in scope, but it is a crate, not an attribute
    
    error: cannot determine resolution for the derive macro `Clap`
      --> src/opt.rs:66:10
       |
    66 | #[derive(Clap)]
       |          ^^^^
       |
       = note: import resolution is stuck, try simplifying macro imports
    
    error: cannot determine resolution for the derive macro `Clap`
      --> src/opt.rs:73:10
       |
    73 | #[derive(Clap)]
       |          ^^^^
       |
       = note: import resolution is stuck, try simplifying macro imports
    
    error: cannot determine resolution for the derive macro `Clap`
      --> src/opt.rs:78:10
       |
    78 | #[derive(Clap)]
       |          ^^^^
       |
       = note: import resolution is stuck, try simplifying macro imports
    
    error: cannot find attribute `clap` in this scope
      --> src/opt.rs:80:7
       |
    80 |     #[clap(required = true)]
       |       ^^^^
       |
       = note: `clap` is in scope, but it is a crate, not an attribute
    
    error: cannot find attribute `clap` in this scope
      --> src/opt.rs:82:7
       |
    82 |     #[clap(long, short)]
       |       ^^^^
       |
       = note: `clap` is in scope, but it is a crate, not an attribute
    
    error: cannot find attribute `clap` in this scope
      --> src/opt.rs:85:7
       |
    85 |     #[clap(long, short)]
       |       ^^^^
       |
       = note: `clap` is in scope, but it is a crate, not an attribute
    
    error: cannot determine resolution for the derive macro `Clap`
      --> src/opt.rs:90:10
       |
    90 | #[derive(Clap)]
       |          ^^^^
       |
       = note: import resolution is stuck, try simplifying macro imports
    
    error: cannot determine resolution for the derive macro `Clap`
      --> src/opt.rs:98:10
       |
    98 | #[derive(Clap)]
       |          ^^^^
       |
       = note: import resolution is stuck, try simplifying macro imports
    
    error: cannot find attribute `clap` in this scope
       --> src/opt.rs:102:7
        |
    102 |     #[clap(long, short)]
        |       ^^^^
        |
        = note: `clap` is in scope, but it is a crate, not an attribute
    
    error: cannot determine resolution for the derive macro `Clap`
       --> src/opt.rs:109:10
        |
    109 | #[derive(Clap)]
        |          ^^^^
        |
        = note: import resolution is stuck, try simplifying macro imports
    
    error: cannot determine resolution for the derive macro `Clap`
       --> src/opt.rs:133:10
        |
    133 | #[derive(Clap)]
        |          ^^^^
        |
        = note: import resolution is stuck, try simplifying macro imports
    
    error: cannot determine resolution for the derive macro `Clap`
       --> src/opt.rs:140:10
        |
    140 | #[derive(Clap)]
        |          ^^^^
        |
        = note: import resolution is stuck, try simplifying macro imports
    
    warning: unused import: `AppSettings`
     --> src/opt.rs:5:12
      |
    5 | use clap::{AppSettings, Clap};
      |            ^^^^^^^^^^^
      |
      = note: `#[warn(unused_imports)]` on by default
    
    warning: use of deprecated function `clap_generate::generate`: Renamed to `clap_complete`
       --> src/app.rs:374:13
        |
    374 |             generate,
        |             ^^^^^^^^
        |
        = note: `#[warn(deprecated)]` on by default
    
    warning: use of deprecated function `clap_generate::generate`: Renamed to `clap_complete`
       --> src/app.rs:381:28
        |
    381 |             Shell::Bash => generate::<Bash, _>(&mut app, APP_NAME, &mut io::stdout()),
        |                            ^^^^^^^^
    
    warning: use of deprecated function `clap_generate::generate`: Renamed to `clap_complete`
       --> src/app.rs:382:30
        |
    382 |             Shell::Elvish => generate::<Elvish, _>(&mut app, APP_NAME, &mut io::stdout()),
        |                              ^^^^^^^^
    
    warning: use of deprecated function `clap_generate::generate`: Renamed to `clap_complete`
       --> src/app.rs:383:28
        |
    383 |             Shell::Fish => generate::<Fish, _>(&mut app, APP_NAME, &mut io::stdout()),
        |                            ^^^^^^^^
    
    warning: use of deprecated function `clap_generate::generate`: Renamed to `clap_complete`
       --> src/app.rs:384:34
        |
    384 |             Shell::PowerShell => generate::<PowerShell, _>(&mut app, APP_NAME, &mut io::stdout()),
        |                                  ^^^^^^^^
    
    warning: use of deprecated function `clap_generate::generate`: Renamed to `clap_complete`
       --> src/app.rs:385:27
        |
    385 |             Shell::Zsh => generate::<Zsh, _>(&mut app, APP_NAME, &mut io::stdout()),
        |                           ^^^^^^^^
    
    error[E0599]: no function or associated item named `into_app` found for struct `Opts` in the current scope
       --> src/app.rs:378:29
        |
    378 |         let mut app = Opts::into_app();
        |                             ^^^^^^^^ function or associated item not found in `Opts`
        |
       ::: src/opt.rs:20:1
        |
    20  | pub struct Opts {
        | --------------- function or associated item `into_app` not found for this
        |
        = help: items from traits can only be used if the trait is implemented and in scope
        = note: the following trait defines an item `into_app`, perhaps you need to implement it:
                candidate #1: `CommandFactory`
    
    error[E0061]: this function takes 4 arguments but 3 arguments were supplied
       --> src/app.rs:381:28
        |
    381 |             Shell::Bash => generate::<Bash, _>(&mut app, APP_NAME, &mut io::stdout()),
        |                            ^^^^^^^^^^^^^^^^^^^ --------  --------  ----------------- supplied 3 arguments
        |                            |
        |                            expected 4 arguments
        |
    note: function defined here
       --> /home/dm/.cargo/registry/src/github.com-1ecc6299db9ec823/clap_generate-3.0.3/src/lib.rs:38:8
        |
    38  | pub fn generate<G, S>(gen: G, app: &mut clap::App, bin_name: S, buf: &mut dyn Write)
        |        ^^^^^^^^
    
    error[E0061]: this function takes 4 arguments but 3 arguments were supplied
       --> src/app.rs:382:30
        |
    382 |             Shell::Elvish => generate::<Elvish, _>(&mut app, APP_NAME, &mut io::stdout()),
        |                              ^^^^^^^^^^^^^^^^^^^^^ --------  --------  ----------------- supplied 3 arguments
        |                              |
        |                              expected 4 arguments
        |
    note: function defined here
       --> /home/dm/.cargo/registry/src/github.com-1ecc6299db9ec823/clap_generate-3.0.3/src/lib.rs:38:8
        |
    38  | pub fn generate<G, S>(gen: G, app: &mut clap::App, bin_name: S, buf: &mut dyn Write)
        |        ^^^^^^^^
    
    error[E0061]: this function takes 4 arguments but 3 arguments were supplied
       --> src/app.rs:383:28
        |
    383 |             Shell::Fish => generate::<Fish, _>(&mut app, APP_NAME, &mut io::stdout()),
        |                            ^^^^^^^^^^^^^^^^^^^ --------  --------  ----------------- supplied 3 arguments
        |                            |
        |                            expected 4 arguments
        |
    note: function defined here
       --> /home/dm/.cargo/registry/src/github.com-1ecc6299db9ec823/clap_generate-3.0.3/src/lib.rs:38:8
        |
    38  | pub fn generate<G, S>(gen: G, app: &mut clap::App, bin_name: S, buf: &mut dyn Write)
        |        ^^^^^^^^
    
    error[E0061]: this function takes 4 arguments but 3 arguments were supplied
       --> src/app.rs:384:34
        |
    384 |             Shell::PowerShell => generate::<PowerShell, _>(&mut app, APP_NAME, &mut io::stdout()),
        |                                  ^^^^^^^^^^^^^^^^^^^^^^^^^ --------  --------  ----------------- supplied 3 arguments
        |                                  |
        |                                  expected 4 arguments
        |
    note: function defined here
       --> /home/dm/.cargo/registry/src/github.com-1ecc6299db9ec823/clap_generate-3.0.3/src/lib.rs:38:8
        |
    38  | pub fn generate<G, S>(gen: G, app: &mut clap::App, bin_name: S, buf: &mut dyn Write)
        |        ^^^^^^^^
    
    error[E0061]: this function takes 4 arguments but 3 arguments were supplied
       --> src/app.rs:385:27
        |
    385 |             Shell::Zsh => generate::<Zsh, _>(&mut app, APP_NAME, &mut io::stdout()),
        |                           ^^^^^^^^^^^^^^^^^^ --------  --------  ----------------- supplied 3 arguments
        |                           |
        |                           expected 4 arguments
        |
    note: function defined here
       --> /home/dm/.cargo/registry/src/github.com-1ecc6299db9ec823/clap_generate-3.0.3/src/lib.rs:38:8
        |
    38  | pub fn generate<G, S>(gen: G, app: &mut clap::App, bin_name: S, buf: &mut dyn Write)
        |        ^^^^^^^^
    
    error[E0599]: no function or associated item named `parse` found for struct `Opts` in the current scope
      --> src/main.rs:36:36
       |
    36 |     if let Err(e) = App::run(Opts::parse(), config) {
       |                                    ^^^^^ function or associated item not found in `Opts`
       |
      ::: src/opt.rs:20:1
       |
    20 | pub struct Opts {
       | --------------- function or associated item `parse` not found for this
       |
       = help: items from traits can only be used if the trait is implemented and in scope
       = note: the following trait defines an item `parse`, perhaps you need to implement it:
               candidate #1: `Parser`
    
    warning: unused import: `clap::IntoApp`
     --> src/app.rs:2:5
      |
    2 | use clap::IntoApp;
      |     ^^^^^^^^^^^^^
    
    Some errors have detailed explanations: E0061, E0432, E0599.
    For more information about an error, try `rustc --explain E0061`.
    warning: `wutag` (bin "wutag") generated 8 warnings
    error: could not compile `wutag` due to 34 previous errors; 8 warnings emitted
    
    opened by devpew 1
  • fixed issue where completions would interpret `tag` as $(tag) and cal…

    fixed issue where completions would interpret `tag` as $(tag) and cal…

    When generating completions (at least for zsh), the phrase tag would be interpolated and would attempted to be called, resulting in an error on screen. Replacing the backtick with a single quote seemed to fix the issue.

    opened by lmburns 1
  • Keeping track of all tags for a global search

    Keeping track of all tags for a global search

    Feature Request

    I'm on macOS and I also use this program which is another tagging tool. It has quite a few features and I understand that your version is compatible with more than just macOS, so not all features would necessarily be compatible; however, here is my request:

    Add support to somehow keep track of all the tags that are set. For instance a file could be placed in ${XDG_DATA_HOME:-$HOME/.local/share}/wutag that could be some sort of database, or just some plain text file that would allow for the user to list all their tagged files. Perhaps the option to sort by tag and or directory as well (in this global feature). This feature is similar to the --home or --local option in the program I linked above.

    Edit: I might also add that it would help to have this feature because when using the closes thing to it (wutag -d ~ list '**'), I get several errors on some files. For example:

    ERROR error: Permission denied (os error 13)
    ERROR provided file doesn't exists
    

    It would be helpful if I could clear these with clear or know which files these are referring to.

    opened by lmburns 1
  • Add a daemon to track tagged files

    Add a daemon to track tagged files

    What did you implement:

    This PR rewrites wutag into a client-server architecture with a wutagd daemon running in the background and wutag acting as a frontend. This allows wutag to keep track of changes made to files by utilizing OS native fs notify apis.

    Closes: #38

    opened by vv9k 0
  • Add a daemon that will observe tagged files

    Add a daemon that will observe tagged files

    It would be nice if there was a lightweight daemon that uses inotify to observe tagged files for changes so that the registry is always up to date.

    The inotify api only works on Linux but there are analogous apis on other OSes like FSEvents on MacOS

    opened by vv9k 0
  • Add `-r` shorthand to `--raw flag

    Add `-r` shorthand to `--raw flag

    What did you implement:

    Closes: #21

    How did you verify your change:

    What (if anything) would need to be called out in the CHANGELOG for the next release:

    opened by vv9k 0
Releases(0.5.0)
Owner
Wojciech Kępka
Wojciech Kępka
An efficient pictures manager based on custom tags and file system organization.

PicturesManager An efficient pictures manager based on custom tags and file system organization. Developed with Tauri (web app) with a Rust backend an

Clément Grennerat 2 Dec 21, 2022
Rust File Management CLI is a command-line tool written in Rust that provides essential file management functionalities. Whether you're working with files or directories, this tool simplifies common file operations with ease.

Rust FileOps Rust File Management CLI is a command-line tool written in Rust that provides essential file management functionalities. Whether you're w

Harikesh Ranjan Sinha 5 May 2, 2024
A tool that allow you to run SQL-like query on local files instead of database files using the GitQL SDK.

FileQL - File Query Language FileQL is a tool that allow you to run SQL-like query on local files instead of database files using the GitQL SDK. Sampl

Amr Hesham 39 Mar 12, 2024
CLI tool to bake your fresh and hot MD files

At least once in your Rust dev lifetime you wanted to make sure all code examples in your markdown files are up-to-date, correct and code is formated, but you couldn't make that done with already existing tools - fear not!

Patryk Budzyński 39 May 8, 2021
miniserve - a CLI tool to serve files and dirs over HTTP

?? For when you really just want to serve some files over HTTP right now!

Sven-Hendrik Haase 4.1k Jan 6, 2023
Voila is a domain-specific language launched through CLI tool for operating with files and directories in massive amounts in a fast & reliable way.

Voila is a domain-specific language designed for doing complex operations to folders & files. It is based on a CLI tool, although you can write your V

Guillem Jara 86 Dec 12, 2022
A cli tool to download specific GitHub directories or files

cloneit A cli tool to download specific GitHub directories or files. Installation From git git clone https://github.com/alok8bb/cloneit cd cloneit car

Alok 54 Dec 20, 2022
A CLI tool to rename files to randomly generated strings.

rng-rename A CLI tool to rename files to randomly generated strings. Why? Suppose you downloaded a few hundred images to use as your desktop wallpaper

null 2 Feb 24, 2022
A CLI tool used for rendering Blender files to a cropped spritesheet

BuilderGenerator A CLI tool used for rendering Blender files to a cropped spritesheet Clients Rust

Eric Olson 1 Feb 18, 2022
'apk-yara-checker' is a little CLI tool written in Rust to check Yara rules against a folder of APK files.

apk-yara-checker 'apk-yara-checker' is a little CLI tool written in Rust to check Yara rules against a folder of APK files. You have to pass the folde

alberto__segura 15 Oct 5, 2022
CLI tool to find duplicate files based on their hashes.

Dupper Dupper is a CLI tool that helps you identify duplicate files based on their hashes (using the Seahash hashing algorithm). Installation You can

Rubén J.R. 4 Dec 27, 2022
CLI tool to convert image files.

?? F1sh CLI tool to convert image files. ??️ Supported formats File Supported AviF ✅ BMP ✅ DDS ✅ Farbfeld ✅ GIF ✅ HEIF ❌ ICO ✅ JPEG ✅ OpenEXR ✅ PNG ✅

Sammwy 5 Apr 3, 2023
tpp (Tera Pre-Processor) is a versatile CLI (Command Line Interface) tool crafted for preprocessing files using the Tera templating engine.

tpp (Tera Pre-Processor) is a versatile CLI (Command Line Interface) tool crafted for preprocessing files using the Tera templating engine. Drawing inspiration from pre-processors like cpp and gpp, tpp is the next evolution with its powerful expressive toolset.

null 3 Nov 23, 2023
A CLI tool to get help with CLI tools 🐙

A CLI tool to get help with CLI tools ?? halp aims to help find the correct arguments for command-line tools by checking the predefined list of common

Orhun Parmaksız 566 Apr 16, 2023
This CLI utility facilitates effortless manipulation and exploration of TOML, YAML, JSON and RON files.

???????? This CLI utility facilitates effortless manipulation and exploration of TOML, YAML, JSON and RON files.

Moe 3 Apr 26, 2023
A simple CLI for combining json and yaml files

A simple CLI for combining json and yaml files

Avencera 16 Jul 4, 2022
CLI and library for uploading files to Arweave.

arloader Command line application and library for effortlessly uploading files to Arweave. Arweave enables you to store documents and applications for

Caleb Everett 79 Nov 20, 2022
🍅 A command-line tool to get and set values in toml files while preserving comments and formatting

tomato Get, set, and delete values in TOML files while preserving comments and formatting. That's it. That's the feature set. I wrote tomato to satisf

C J Silverio 15 Dec 23, 2022
This tool was developed as part of a course on forensic analysis and cybersecurity. It is intended to be used as a training resource to help students understand the structure and content of job files in Windows environments.

Job File Parser Job File Parser is a Rust-based tool designed for parsing both legacy binary job files and modern XML job files used by the Windows Ta

Mehrnoush 3 Aug 12, 2024