Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make actions and output scriptable first #33

Closed
HumanG33k opened this issue Aug 17, 2021 · 3 comments
Closed

Make actions and output scriptable first #33

HumanG33k opened this issue Aug 17, 2021 · 3 comments
Labels
feature New feature to be added

Comments

@HumanG33k
Copy link

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.

@vv9k
Copy link
Owner

vv9k commented Aug 17, 2021

Hi,

That is correct, To tag a single file or a directory you have to do wutag -m 1 set filename <tags>....

And if you want to do this in other directory you have to add -d or change the shell's directory with cd before executing wutag.

Example:


~ ❯ ls -l ~/dev/ | grep rust
drwxr-xr-x  - user 26 Jul 07:43 rust

~ ❯ wutag -d ~/dev -m 1 set rust code
/home/user/dev/rust:
        + code

Or like this:

~ ❯ cd ~/dev/

~/dev ❯ wutag -m 1 set rust code2
/home/user/dev/rust:
        + code2

This looks like something that should be improved, perhaps a flag that will make wutag treat the pattern as a path to the file would work.

@HumanG33k
Copy link
Author

Thx for the feedback.
Mainly my use cases are :

  • pattern tag. Like in documentation)
  • directory tag. Use as semantic information for my workflow : (Status : Alpha, Beta [...], Mature) (State : Working, Pause, etc)(Project : Personnal, Profesionnal)
  • file tag. for notes and todo

I have some good application for tags :
With file/dir watcher auto-tag.
Software can also use as in/out action filter.
For ie :

  • a dir Pictures with a file watcher
  • autotag photo if .jpg || .png
  • one by day an opencv run on photo tags with AI and auto add tags cats || dog

Wutag should be design scriptable. As ip vs ifconfig.

@vv9k
Copy link
Owner

vv9k commented Jun 14, 2022

I'm revisiting this issue as I might have some more time to spare soon and I do like the idea of redoing the CLI interface to be scriptable first so that it can be easily integrated into scripts and other tools. The pretty output could perhaps be preserved as an additional flag but by default all output should be easily parseable and the exit codes should respect actual results.

@vv9k vv9k changed the title Tag a directory Make actions and output scriptable first Jun 14, 2022
@vv9k vv9k added the feature New feature to be added label Jun 14, 2022
@vv9k vv9k closed this as completed Sep 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature to be added
Projects
None yet
Development

No branches or pull requests

2 participants