oniony / TMSU

TMSU lets you tags your files and then access them through a nifty virtual filesystem from any other application.
Other
2.01k stars 115 forks source link

Feature Request in VFS: Listing files outside of the `files` folder and hiding `queries` folder #265

Open jpmvferreira opened 1 year ago

jpmvferreira commented 1 year ago

I would like to know if it's possible to add a feature that would get rid of the files directory in the VFS and list the files in the directory directly below the tag directory. There is a counter-argument to this proposal, that is provided in the Supertag FAQ, where it argues that by including the files one directory above it would increase the response time of the autocomplete in very long databases significantly. However, this depends on the combination of hardware and database size, which in my case is very fast hardware for very small databases. As such, I would like to know if it was possible to add a flag which would allow the users to list the files directly below the corresponding tags an not inside the unnecessary files folder, pleasing users with all sizes of databases.

With respect to the queries folder, I see it as something useful for a new user, however, it becomes pointless after its first read. Additionally, the information it provides it's already present in the quick start guide. The only disadvantage I see in hiding this folder is that it might remove backwards compatibility to users who already created automated scripts, so once again a flag could be created and used at mount time, such that the default behavior remains consistent with previous releases.

So, my suggestions would make the VFS that looks something like this:

├── queries
│   └── README.md
└── tags
    ├── tag1
    │   └── files
    │       └── *files that have tag1*
    ├── tag2
    │   ├── files
    │   │   └── *files that have tag2*
    │   └── tag3
    │       └── files
    │           └── *files that have tag2 and tag3*
    ├── tag3
    │   ├── files
    │   │   └── *files that have tag3*
    │   └── tag2
    │       └── files
    │           └── *files that have tag3 and tag2*

To simplify a good bit and look like this instead:

├── tag1
│   └── *files that have tag1*
├── tag2
│   ├── *files that have tag2*
│   └── tag3
│       └── *files that have tag2 and tag3*
├── tag3
│   ├── *files that have tag3*
│   └── tag2
│       └── *files that have tag3 and tag2*

I would also like to ask something completely unrelated with this issue: In Supertag, the only time an identifier shows up in the VFS file name is when there is a conflict between two files with the same name and the same tag. By contrast, in TMSU, the internal file identifier is always present. Would it be possible to add this change to TMSU's behavior to match that of Supertag in the roadmap?