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

Tag-based management system #151

Open
6 tasks
aaronleopold opened this issue Sep 5, 2023 · 8 comments
Open
6 tasks

Tag-based management system #151

aaronleopold opened this issue Sep 5, 2023 · 8 comments
Labels
enhancement New feature or request

Comments

@aaronleopold
Copy link
Collaborator

Stump currently supports tags for the 3 big entities, Media, Series, and Library, however there are no functional interfaces for managing them.

  • Tags can be created (by a server owner):
    • during the library creation process
    • on a dedicated section somewhere in settings?
  • Tags are created and assigned to media automatically if metadata contains tags (during scan)
  • Series can be assigned tags
  • Tags can be used to restrict access for users, via an excluded_tags field on User
@aaronleopold aaronleopold added the enhancement New feature or request label Sep 5, 2023
@github-project-automation github-project-automation bot moved this to Backlog in v0.1.x Jan 20, 2024
@ecraven
Copy link

ecraven commented Dec 14, 2024

If I may ask, is there a way to actually assign tags in the UI at the moment? I have ~50k PDFs, and if possible would love to add the tags to the filename (so that they will never be lost in the future). Would it be possible to have some sort of default format that stump understands and parses the tags from, e.g. The Best Book Ever [tag1 tag2 tag3].pdf (or whatever other delimiters seem fine and workable on all supported platforms).

@aaronleopold
Copy link
Collaborator Author

aaronleopold commented Dec 14, 2024

is there a way to actually assign tags in the UI at the moment?

No, this is something that would likely be handled alongside #258 (comment) since it fits nicely with other bulk operations IMO.

I'd be hesitant to add a custom format, I generally like adopting more broadly used standards so people don't at any point get locked in. This also, on the surface, seems to immediately clash with another filename-based method for extracting metadata: #500.

I'd be happy to use this issue as a means of discussing some options, though!

@ecraven
Copy link

ecraven commented Dec 14, 2024

Unfortunately the amount of standardisation around PDF metadata is ... small :-/

I understand that one focus of Stump is comics / manga, which I do not have at all. My books fall into the following categories:

  • just "normal" books, I'd like to look for them by author and series. E.g. Fantasy, Scifi, Technical books, Self-Help, ...
  • papers, mostly just the title, authors and publication date is relevant here

I've looked into DDC and BISAC a bit, but don't think those will really help. I've been using a purely tag-based email client for years now, and I think that this would actually be a good way to organise all the books: extract all the metadata from the file, and also have some way to add tags. I can rename the files (or write tags into the metadata), Stump picks it up, and I can then look for books that way.

I'm not sure whether this is really a good idea, but maybe even a hierarchy of tags would be useful, so everything tagged compilers or proglang would also show up under computers.

I'm not sure whether support for languages is already in, but I have a lot of grammars that are written in one language but deal with another one, it would be great if there were some way to capture this information (maybe tags are the best option here too)...

Sorry for the rambling, unfortunately I don't have a perfect solution to suggest, but I really believe that a good way to tag my books would help deal with the large amount.

@ecraven
Copy link

ecraven commented Dec 14, 2024

https://github.com/novoid/filetags for example takes anything after -- in a filename as a space separated list of tags. so My favourite book -- favourite lang-en.pdf would have the two tags favourite and lang-en.

Would it be possible to have an optional plugin to read the tags from the filename, so that users can load or not load that plugin? (I'd gladly try to write that plugin, if this is something that can be done).

@aaronleopold
Copy link
Collaborator Author

I understand that one focus of Stump is comics / manga, which I do not have at all. My books fall into the following categories

I don't read manga, either 🙂 I'd estimate my own usage is 60% ebooks and 40% comics, granted I avoid PDF files so I don't have the same metadata issues.

I've been using a purely tag-based email client for years now, and I think that this would actually be a good way to organise all the books

I think a modality for exploring books purely based on tags is valuable, for sure. There isn't an issue open for this kind of feature, at the moment

...extract all the metadata from the file, and also have some way to add tags

These are both within the domain of this issue, for sure

I'm not sure whether this is really a good idea, but maybe even a hierarchy of tags would be useful, so everything tagged compilers or proglang would also show up under computers

I think this would be a really neat feature, but depending on the approach implementation might be tricky. I think some kind of programmatic "reaction" or trigger would be easiest, e.g. register relations and if a book has one it auto-adds another. If it was query-based, it greatly increases query complexity. I like this though! Just something I'd need to sit on and give a think

For the languages question, I think tags are honestly the best approach. That or adding additional metadata for the language.

@aaronleopold
Copy link
Collaborator Author

Sorry for the rambling, unfortunately I don't have a perfect solution to suggest, but I really believe that a good way to tag my books would help deal with the large amount

Forgot to respond in my last message, but literally no worries! I enjoy rambling, I don't have all the answers either

Would it be possible to have an optional plugin to read the tags from the filename

That's tricky to answer! There isn't really a plugin system at the moment, and I'm not sure how it would be best to approach implementing one. There are two related plugin issues I can recall:

For 510, I suggested a custom service using the SDK. This works in that instance, but I imagine you'd want more of a post-scan script or something instead of a long-running process.

Plugins are cool, though! I'd be happy to help further thinking through some system where they are possible. It could even just be literal commands registered to run after a scan, maybe.

@ecraven
Copy link

ecraven commented Dec 14, 2024

I think one of the most versatile ways to do this is to call a script (or executable) with the full path of the file, and have it output yaml / json / xml / some other structured format. you read this output and merge it into the internal data structures. This way, you still get to decide what to actually use, but the external program can be written in any language and do whatever it wants to get the data.

So you'd need to have a way to find all relevant scripts, maybe just have a dedicated directory where they should be put? something like ~/.local/share/stump/scan-plugin.d/ (or anything in that spirit).

@ecraven
Copy link

ecraven commented Dec 14, 2024

as an example, this would allow someone to add ISBNs to the filename, then the plugin could download the metadata from various internet sources

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: Up Next
Development

No branches or pull requests

2 participants