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

Mark files as read/watched/listened/viewed and changing color by there status #187

Open
spychodelics opened this issue Oct 28, 2012 · 8 comments
Labels
Milestone

Comments

@spychodelics
Copy link

Hi,

i would like to see a feature which allows users to give their files a status, given the status of a file you either get a checkmark or a colored filenamed displayed. Green as "read/watched/..", yellow/orange as "in progress", red as "untouched".

Thank you

@jpfleury
Copy link
Contributor

Seems related to the issue #153

@stewie
Copy link

stewie commented Oct 30, 2012

Providing the ability to store metadata bound to a given inode
is, IMO, really appealing functionality for a file management app.

As addon functionailty, we've tried creating this for the xfce Thunar file manager:
http://salinelinux.proboards.com/index.cgi?board=testing&action=display&thread=737
but, alas, Thunar API lacks a means for an addon (custom action) to trigger per-file rendering of custom fg/bg color or conditional display of an icon/emblem. Even if we COULD cause Thunar to render an assigned emblem (atop the mimetype-specific icon) for each item, doing so would displace the "is executable" emblem for *.sh files etc.

So, regardless how the metadata status indicator is displayed for a given item, it begs placement within an additional display column. Would that column display (conditionally) a select icon... or a conditional bgcolor (legend for which the user would be expected to setup, along with various status "tags")... or a text string representing the user's freeform (arbitrarily assigned) "tag" labeltext?

Display of the metadata flag column should probably be optional. Performing a lookup against 2000+ child nodes in a given directory, to check for metadata flag value, would add considerable overhead.

Personally, I find that neither "color coded" markings nor "tagword" markings will suffice.
For me, the goal is to achieve a 1:1 (annotation:file) repository to store/lookup relavent notes.
As a datastore, those notes "travel with me" ~~ across various (Debian+Thunar -flavored) installs.

In my use, the notes are not necessarily intended to be private (per-user). Ultimately, I envision multiple users ~~ local accounts, or even all users of a given distro ~~ incrementally building a datastore. A user right-clicking a given file would have an opportunity to create a local note, or to visit a forum thread dedicated to (and created on-the-fly if a matching thread does not already exist) to that exact file, existing in that exact path across every installation of a given distro.

Yes, I read man pages... and typically find their content to be sorely lacking. Spending half my waking hours researching examples of correct syntax use for a given beast... sooner or later I'll run out of hours, or patience. I suspect this is a huge deterrent to anyone attempting to "look under the hood" of their desktop operating system.

@IgnorantGuru
Copy link
Owner

One of the challenges here is how to identify a file. If you're going to attach a database entry to a file, how do you find it? By its path? What if spacefm moves it? Does the data move? What if another process moves, renames, or copies the file and spacefm doesn't know? Is it the same file or a different one? How can you tell? What if the file has a few or a lot of bytes modified? Is it a different file? What if another file is given the same name or copied to the same path, replacing another file that had annotations? What happens to the data if a file is deleted?

Even if the data were stored in the file itself it presents challenges when duplicating and modifying, not to mention how or where do you store it. This can be simplified somewhat by just using a relative or absolute path to identify the file and tag it, but that has its limitations and becomes awkward when you want to reorganize, duplicate, backup, etc.

But I agree it would be nice to make notes and annotations, mark as 'watched' etc. But storing more critical, less volatile data involves all of the above management issues. If a file is moved or renamed (by spacefm or outside of it), you might not mind losing your 'watched' tag and color. But you might mind losing all your notes, links, etc.

How do other file managers handle this? Is there a common file placed in a directory with info about contained files? What format is used and is there any spec or convention?

@stewie
Copy link

stewie commented Oct 31, 2012

In the "custom action" script written for use with thunar, an annotated "object" is an inode (user is able to right-click and annotate any folder object, any file, any symlink). The bash script is straightforward, easily-readable, 40 lines of code ~~ it's pasted into the forum post I linked to, above.

YES, in this simplistic approach, if an annotated file is moved (or renamed), the inode{--}note association is lost.
Similarly, if the file associated with a given annotation is deleted, the "stray" note remain. (Not a bad thing, for my use case).

I wasn't suggesting/requesting spaceFM should take care of managing the external "notes database"... probably because I had resigned myself to the status quo of employing the thunar action & later "finding" note content via those myriad txt files via recoll (file indexer).
No, I don't believe a "standard" exists for a file manager to handle/recognize file tags/annotations. Under, KDE a fm app might poll Kontact or whatever PIM app via the akonadi bus... but I reject the prospect of using app which use such an approach (DE dependency lock-in).

As an interim step, I might investigate creation of a spaceFM plugin to provide "one step up from" copy-path-to-clipboard functionality.
Maybe "Send To" functionality, so that right-click context menu presents an option to send the path+filename to cherrytree notes app.

Personally, I don't particularly care to track/monitor/worry whether a file associated with a given annotation is subsequently changed / renamed / moved / deleted. I would want the content of the datastore to endure, unaffected by file deletions, etc. For any users not sharing that mindset, I'd argue that a periodic (manual) sync-n-purge-stray notes operation should suffice.

Although many of my notes contain URIs, the yad dialog only handles ascii chars. I'm fine with copy/pasting to make my way back to whatever reference page I've cited. I really don't expect to rely on a file manager app to support indexing / freeform search for the notes. Recoll index 'em just fine ~~ with the added benefit of recognizing embedded URIs and converting 'em into clickable links. Even if the file manager app were storing the notes to, say, a sqlite database... I believe their content will still be indexable. (For each search result, I think Recoll will display xx lines prior to and xx lines following, with the search term(s) within the sqlite stream highlighted.)

Above, I spouted "inode". Admittedly, I'm unsure I have a firm grasp of what constitutes an inode?
I meant "any right-clickable item currently displayed in the items grid/pane".
If you could, in fact, base the association on inode ID... the association should survive regardless of edited content, edited filename, changed path, eh?

I did not intend to recommend/suggest some fandangled mechanism which employs notifyd (or whatever).
If writing to (and lookup against) a sqlite database, what (how many) columns are needed, minimally, for each record?
Above all else, I need a freeform text column.
Color, as an attribute, that might beg a user-customizable lookup list of fixed values.
Tagwords... would the app search for an exact match? Would the app be expected to support Boolean search?
Ouch. Sounds like scope creep.

Restating my immediate hope/goal for added functionality:
If user preferences indicate that the "note" column is to be displayed in the detailed list gridview,
display a callout {bgcolor, or icon} in that column to signify each annotated item in the currently-displayed directory.
-=-
Within the right-click context menu, display "add note" if none exists for the clicked item, or "edit note" otherwise.

@stewie
Copy link

stewie commented Nov 17, 2012

further down the rabbit hole I go...

When using caja (nautilus fork), the file manager component of "MATE desktop", right-clicking a file
(or directory, or symlink, or .desktop file) exposes a "properties" dialog which includes a tab labeled "Notes".
I searched its code to find out how these "file notes" are created and managed.

Yuk! the metadata annotations are handled via gvfs
https://github.com/mate-desktop/mate-file-manager/blob/master/libcaja-private/caja-file.c
https://github.com/mate-desktop/mate-file-manager/blob/master/libcaja-private/caja-metadata.h
https://github.com/mate-desktop/mate-file-manager/blob/master/libcaja-private/caja-emblem-utils.c

I read that spaceFM utilizes an inbuilt vfs (http://ignorantguru.github.com/spacefm/spacefm-manual-en.html)

also read ( http://blogs.gnome.org/alexl/category/nautilus ) that sqlite is not a suitable vehicle
"...not safe on NFS. It uses a database, so each read operation is an IPC call that gets resolved to a database query, causing performance issues"
and, on this same page, read something worrisome (to me):
"All apps should be able to access the store for both writing and reading"

No, I surely do NOT want file annotations stored to a shared datastore
(and limited to 1000 chars, a limit under the caja/nautilus implementation).
I'm still hoping that 1:1 individual, freestanding note files will be feasible.
Also, I woulc hope the path to the dir containing the notefiles could be settable, via spacefm.conf

related reading:

http://nuclear-imaging.info/site_content/2011/12/28/when-gvfsd-metadata-starts-using-100-processor/

http://ubuntuforums.org/showthread.php?t=1406468
("Huge UUID file in gvfs-metadata - 8.4 gigs - Help??")

http://askubuntu.com/questions/90853/file-notes-tab-gone-in-nautilus-3-2-1

http://askubuntu.com/questions/14669/are-file-notes-exclusive-to-nautilus-is-there-a-terminal-cli

http://anxiousnut.wordpress.com/2010/09/22/getnotes-a-script-to-retrieve-metadata-notes/

http://answerpot.com/showthread.php?3237367-Gvfs+metadata+handling+on+removed+%2F+new+files

https://bugs.launchpad.net/ubuntu/+source/gvfs/+bug/459439
(“Heavy Memory leak in gvfsd-metadata” Bugs “gvfs” package Ubuntu)

http://blogs.gnome.org/alexl/2012/01/26/resources-in-glib/
http://developer.gnome.org/glib/stable/glib-GVariant.html

@IgnorantGuru
Copy link
Owner

I do have some ideas for how this could be done reasonably and in keeping with the open format of spacefm's other extensible features. As the above problems show, it's not something to be done carelessly, and spacefm certainly wouldn't use gvfs. Not sure when I will get to look at this more or implement some of it, but I agree it has potential.

@stewie
Copy link

stewie commented Nov 29, 2012

After quite a LOT of feature-searching, across various linux distros and various DEs... I've realized that the sorely-absent functionality doesn't fit the scope of a "Mark files as..." file manager app feature request. As a followup, to further explain my wish/hope/request, I'll open a discussion thread in the spaceFM forum at sourceforge.

@precutcolours
Copy link

A simpler variation. A color and/or icon for system folders. These are basically just a root listing

/bin/ls -l /

SpaceFM already signifies symlinks with a special icon. Users need similar clues on which folders are "system" and which are "for us." They aren't Linux gearheads and think of "/etc" as some kind of grab-bag available to them, not a system folder.

I can't lock permissions. Over the phone I must tell people "open the file /etc/X11/xorg.conf and tweak this value..." Even in person, I need to save myself time playing sudo games and whatnot.

Users will gladly follow "color" directions and can follow them without becoming geeks.

Thanks...

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

No branches or pull requests

5 participants