Files icon indicating copy to clipboard operation
Files copied to clipboard

Feature: Combine Alternate Data Streams with Database approach for tags

Open Foadsf opened this issue 9 months ago • 9 comments

What feature or improvement do you think would benefit Files?

Integrating support for TagSpaces tagging conventions would significantly enhance the usability of Files for users who manage their files with TagSpaces tags. TagSpaces offers two tagging methods: an invasive method that incorporates tags directly into filenames within square brackets [tag], and a non-invasive method that utilizes JSON files stored in a .ts directory adjacent to the tagged files or folders. Enabling Files to recognize and display these tags in its "info panel" would provide a seamless experience for users who rely on TagSpaces for file organization, making it easier to view and manage tagged files directly within Files. This is a follow-up to this question on Discord.

Requirements

  • Implement a parser in Files that can recognize and extract tags from filenames formatted according to TagSpaces' invasive tagging convention (tags within square brackets).
  • Develop functionality to read and interpret JSON metadata files stored in .ts directories according to the non-invasive TagSpaces convention.
  • Display the extracted tags in the Files' "info panel" for easy viewing.
  • Ensure that tag data is updated in the Files interface when changes are made to filenames or JSON metadata files.
  • Provide settings options in Files to enable or disable TagSpaces tag recognition, accommodating users' preferences.
  • Conduct performance testing to ensure the new tagging features do not adversely affect the app’s performance.
  • Create documentation and help guides to assist users in utilizing the new TagSpaces tagging features in Files.

Files Version

3.3.0.0

Windows Version

10.0.19045.4291

Comments

This feature would be particularly beneficial for users who use TagSpaces extensively for file management but wish to utilize the sleek and powerful interface of Files for their daily tasks. It bridges the gap between two powerful tools, enhancing the organizational capabilities of Files while adhering to users' established workflows.

Foadsf avatar Apr 29 '24 18:04 Foadsf

Thanks for the feedback, I've added this to the project board.

Josh65-2201 avatar Apr 29 '24 20:04 Josh65-2201

How does TagSpaces work if a file is transferred or renamed?

yaira2 avatar May 01 '24 02:05 yaira2

@yaira2 Not sure, TBH. ¯\_(ツ)_/¯ Asked them a question here on Twitter, let's see if they respond.

Foadsf avatar May 01 '24 08:05 Foadsf

How does TagSpaces work if a file is transferred or renamed?

File tagged with the filename method have no issues with the transferring or renaming.

If files tagged with the sidecar method are renamed or transferred, TagSpaces renames/moves the sidecar files with the meta data as well. If a folders with tagged files is moved outside of TagSpaces all the meta data is moved automatically. If you rename/transfer such file outside of TagSpaces, the connection with meta file is lost, this happens also by the database based tagging solutions.

uggrock avatar May 03 '24 12:05 uggrock

If you rename/transfer such file outside of TagSpaces, the connection with meta file is lost, this happens also by the database based tagging solutions.

This is why we went with alternate data streams, they allow files to be moved externally without losing the tags.

yaira2 avatar May 03 '24 14:05 yaira2

Alternate data streams do not work on Linux, Android or Mac and are not synced by Dropbox, Google Drive etc... They are not supported even on (ex)fat formatted USB drives.

uggrock avatar May 04 '24 06:05 uggrock

Correct, there are limitations with our approach but the same is true for using a database.

From our docs (https://files.community/docs/features/tags)

Tags are saved using alternate data streams (and not in a database). We found that alternate data streams is the best approach for Files because it allows items to be transferred between locations (even without using Files) without losing their tags. However, this system has some limitations:

Tags only work on drives formatted as NTFS Tags may not work with all cloud storage providers

yaira2 avatar May 05 '24 02:05 yaira2

This feature request suggests that we provide an option for both methods. This is a possibility be we would prefer picking a single method based on popular demand.

yaira2 avatar May 05 '24 02:05 yaira2

I have a propasal that should work

  1. Central Database Storage: Implement a centralized database to store the paths of all tagged items. This will serve as the primary reference point for tagged data.
  2. Tag Embedding: Concurrently, embed the unique tag identifier (GUID) directly into the tagged file’s metadata. Note: This method is applicable exclusively to NTFS file systems due to their support for alternate data streams.
  3. Database Retrieval: Upon initiating the tagged items’ loading process, the system will first retrieve the list from the central database. It will then apply a filter to exclude any items that are no longer accessible or have been removed.
  4. Search For Embedded Tags: Files can then scan the file system for items containing tag-related alternate data streams. It will eliminate any duplicates already accounted for in the database to prevent redundancy.

yaira2 avatar May 12 '24 22:05 yaira2