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

List all the tags with values #257

Open
nkh opened this issue Oct 15, 2022 · 11 comments
Open

List all the tags with values #257

nkh opened this issue Oct 15, 2022 · 11 comments

Comments

@nkh
Copy link

nkh commented Oct 15, 2022

I'm integrating TMSU in my file manager (maybe this time I'll tag for longer than 2 weeks before giving up) and adding the possibility to select existing tags to apply on the selected files

tmsu tags doesn't report "tag=value" but just "tag", this means that I have to first get all the tags, then get all the files that have the tag, then parse all the files tags till I get the one that has a value, if it has one, then extract the values.

Can we, I please , get a tmsu tags --with-values, or something equivalent that wouldn't force one to go through hoops (that would be fine if it didn't take a noticeable time) or shall one hack the data out of the database?

Cheers

@oniony
Copy link
Owner

oniony commented Oct 15, 2022 via email

@nkh
Copy link
Author

nkh commented Oct 16, 2022

certainly not too bad!

is there a way to get all the queries? I can "find" ~/mnt/queries but there may be a simpler way

@nkh
Copy link
Author

nkh commented Oct 16, 2022

and nice that one can give multiple tags to "tmsu values"!

@oniony
Copy link
Owner

oniony commented Oct 16, 2022 via email

@nkh
Copy link
Author

nkh commented Oct 17, 2022

@oniony, could you please add the possibility to query the queries? I'd rather avoid mounting a filesystem just to find them but I'll do it in the worst case.

I'm adding the possibility to find files per tags, via fzf, and I'd like to add the queries to the list as I believe that I will most often re-use the same queries. I'll be ready with most of the integration in a few days, I can send a video if you're interested.

@oniony
Copy link
Owner

oniony commented Oct 17, 2022 via email

@nkh
Copy link
Author

nkh commented Oct 17, 2022

query the db directly is fine for me, could you please set me on the tracks?

@oniony
Copy link
Owner

oniony commented Oct 17, 2022 via email

@nkh
Copy link
Author

nkh commented Oct 17, 2022

Will the filesystem still be the same? in that case I may as well use it, it's just a few lines of code and speed is no problem for what I want to do. It's also fewer dependencies and I think it's nice to use core utilities.

@oniony
Copy link
Owner

oniony commented Oct 17, 2022 via email

@nkh
Copy link
Author

nkh commented Oct 18, 2022

OK, then, I'll get it out of the file system in the meantime, it's just a few lines. Apropos file system, I had some difficulties getting to work as I expected, I got broken links and error messages about "Transport endpoint is not connected" and "deleted directories". I'll fill an issue when I'm sure I'm not the one doing something wrong.

I made a short video about the integration of tmsu in a file manager, download the video to play it, the preview's resolution is horrible and a waste of internet bits.

https://drive.google.com/file/d/1BgTiiwqBTEy9jMGwYGPcMGe2jvoBodsN/view?usp=sharing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants