linuxmint / nemo

File browser for Cinnamon
GNU General Public License v2.0
1.2k stars 299 forks source link

Idea of a new feature for Nemo: Folder notes #3047

Open albertgallego opened 2 years ago

albertgallego commented 2 years ago

The idea is to have a panel in the sidebar which loads the contents of a specified file in the active folder. Let's say, for example, a hidden file with the name ".info.md". If the directory we are in has this file, it is shown at the sidebar. Ideally, the panel showing the file contents must have a way to not just display the file, but to edit it as well.

The idea is similar to that of the README.md in Github and similar platforms. It could be an easy way to give context to some folders, for example, shared folders over a LAN or through the internet, keep track of seen videos in a folder, nomenclature explanation... In Git folders, could be used to display README.md instead (or this could be the filename chosen across all the system, though it may be a little too shout-y).

If a markdown interpreter is too much to implement, it could work with simple plain text, though it wouldn't be as appealing.

If this is not the place to post something like this, I apologize. Please, let me know where do I need to post this request.

Also, I would appreciate if someone points me to any kind of documentation on Nemo's extension system. Thanks a lot

Jeremy7701 commented 2 years ago

There seems to be little documentation for nemo, but you could navigate to:-

/home/username/.local/share/nemo/scripts which allows you to click on a short markdown display. Similarly for /home/username/.local/share/nemo/actions which allows a text only display.

These are special nemo folders, but maybe these illustrate your suggestion?

albertgallego commented 2 years ago

Thanks for the reply, I'll take a look into it, but I don't think I can do what I was trying to explain. My idea was more in line with this mockup:

Captura de 2022-08-08 22-40-02

fredcw commented 2 years ago

Nemo seems to have a built in text file previewer where you just highlight the file and press space. Maybe this could be extended in some way so that it shows markdown files properly formatted.

Jeremy7701 commented 2 years ago

The previewer (the space bar) does show a markdown display for text/markdown files - usually text files ending with .MD

ghost commented 2 years ago

The idea is to have a panel in the sidebar which loads the contents of a specified file in the active folder. Let's say, for example, a hidden file with the name ".info.md". If the directory we are in has this file, it is shown at the sidebar.

So basically you want a respin of the ancient descript.ion hidden files feature in Windows. Oh, that'd be too much for little Nemo... 😢

albertgallego commented 2 years ago

So basically you want a respin of the ancient descript.ion hidden files feature in Windows. Oh, that'd be too much for little Nemo... cry

To be honest, I don't know what are you talking about (it has been like 20 years since I used Windows), but I am guessing... ¿yes? The idea came to me from Nextcloud files. At the top of each directory view, the system charges automatically the file Readme.md, if it exists in that directory. It is not as I want to preview markdown files, but to have the option to give context to some folders.

fredcw commented 2 years ago

Let's be honest, this is not a feature that there's going to be much demand for. Even if you are curious about what a folder is for, once you find out, the file no longer serves any purpose, and for most users, they don't care what the 100,000 folders on their hard drive are for.

ghost commented 2 years ago

To be honest, I don't know what are you talking about [...]

Here is an article chosen arbitrarily upon a web search, which describes the descript.ion files: link and here's a more technical description of those files (make sure any redirection is disabled in browser since it's a webarchive link): link

this is not a feature that there's going to be much demand for.

Actually it does make some sense. At least with regard of the old descript.ion files such system would be useful for multiple files bearing very similar names, such as pictures or videos downloaded from camera. When renaming the files themselves may not be desired for whatever reasons, the descriptions in that unique file would provide hints about what they contain. Problem is, those files need to be tracked/split/joined by the OS itself not only by the default file manager, otherwise copying/moving/renaming the files through a third-party file manager will immediately lose those descriptions.

Now, the feature suggested by Albert may not be that complicated since it only involves describing the current folder contents as a whole, but it begs the question what happens when folder contents gets split to other (sub)folders - would the description file be duplicated/split automatically or should the user manually create new file(s).

albertgallego commented 2 years ago

Let's be honest, this is not a feature that there's going to be much demand for. Even if you are curious about what a folder is for, once you find out, the file no longer serves any purpose, and for most users, they don't care what the 100,000 folders on their hard drive are for.

Well, as I said, I think it is interesting with shared folders, or git folders, to say a couple of uses. As @Drugwash2 says, I don't think this is anything complicated, and the functionality it can add is interesting, to say the least. It may not be interesting to everyone, but for those who would use it, it will be priceless.

ghost commented 2 years ago

An example of the descript.ion files usage in Windows. Recorded in Total Commander 8 under Mint 19.2 + Wine 5.14:

https://user-images.githubusercontent.com/29117024/184008635-3cb014ac-7fa1-4fb6-a19f-b3a3361006ae.mp4

Jeremy7701 commented 2 years ago

Surely the path name tells you all you need to know in the previous screenshot?

ghost commented 2 years ago

You mean the video...

Path names aren't always (fully) visible, and not always accurately represent the contents of the folder. In the descript.ion file case it's a tooltip that describes each file being hovered, where again file name can be too common, confusing or unexplanatory.

The generic folder description file as suggested by the OP could hold all file descriptions (and more) or only for certain files. Or it could just say "Various stuff copied over from web/uncle Johnny/etc waiting to be sorted out".

QmwJlHuSg9pa commented 1 year ago

I'd be interested in using this feature if the pollution of directories with meta-files (descript.ion) could be avoided.

Jeremy7701 commented 1 year ago

You could always just give your directories/files sensible names.

QmwJlHuSg9pa commented 1 year ago

Sorry, but overloading file names with all sorts of arbitrary meta-data is not a solution. It is often not practical to change file names on a whim, nor is it always possible. The logical conclusion may be to abuse sym-links as a form of note-taking?

In the example @Drugwash2 gave, it may be useful for the user to denote compatibility regressions and other minutiae of a set of files in the context of their hierarchy within a set of directories. Obviously, the use case would vary depending on the person and their organisational style.

Personally, I'd rather see such a service architected as some sort of database, rather than a file in each directory. Perhaps it could exist as a Nemo plugin? Regardless, I think note-taking tied to an organised file store is an interesting concept, especially as collections of files may grow large and complex.

ghost commented 1 year ago

Personally, I'd rather see such a service architected as some sort of database, rather than a file in each directory. Perhaps it could exist as a Nemo plugin?

I guess what you're thinking of is actually a new - or extended - filesystem where such notes/details on file/folder contents would be managed by the filesystem itself. Nemo is just one of the possible file managers, and some people would never use it (I certainly don't despite me using the Cinnamon desktop) so working on such feature for just one file manager would be a waste.

But then again, creating a new filesystem would be a challenge in itself, and its adoption could take too long - if ever. Maybe extending one or more of the existing filesystems - at least the more widely used currently - would be a solution, provided backward compatibility would be ensured, and conversion would be seamless without loss of data. A tall order nevertheless.

QmwJlHuSg9pa commented 1 year ago

I'm not sure it would be sane to try and tackle an arbitrary database on a filesystem level. There's bound to be too much abstraction and overhead. Filesystems should be effective and reliable at managing files, not juggling what could effectively be considered someone's personal blog.

I mean, I'm sure there are countless Content Management Systems that could be looked at for inspiration. The service itself could potentially be abstracted enough that the plugin would effectively act as an interface, rather than having it tied to Nemo exclusively. And, I can't see why it couldn't also handle metadata files within directories as an alternative (as you and OP describe). But these are all just spontaneous thoughts; I haven't actually researched existing solutions for this exact use-case.

ghost commented 1 year ago

The main reason would be that the filesystem is the only one that can properly handle the manipulation of files and folders across media. In a static environment any other method would work but when it comes to the user - or even automated applications - moving files and folders around all the time it becomes nearly impossible to keep track of the metadata manually.

Having the filesystem itself keep track of the metadata through simple path links, DB references, or whatever internal method, would ensure every piece of metadata would end up in its rightful place in real time. File managers and any other enabled applications would only have to get the respective path/address/reference of the metadata from the filesystem, get the actual data from the DB, and display it as it sees fit, also allowing editing when desired.

A SQLite3 database could hold all the metadata, and the filesystem would only hold the references to the database entries. Moving/renaming a file or folder would only change the path or name but the metadata reference would remain the same.

The only downside to this would be additional space occupied with the database references in the file allocation table - or whatever method the filesystem uses. But nowadays space is not really that much of a concern I guess.

Anyway, that's just an idea off the top of my head. I'm sure professionals could envision a much better method if they wanted to.

Jeremy7701 commented 1 year ago

I use the emblem feature to highlight characteristics of a file; for folders the colour feature can work better. If you don't have enough system provided emblems, you can create your own personal ones in a folder, ~/.icons/ Each emblem should be named 'emblem-XXXXX.YYY' - where XXXX is a name of your choice and YYY is png for all my emblems - but I guess any image format would work.

This works best in icon mode - but is usable in all display modes: example:- Screenshot from 2023-07-25 14-55-40

This has the advantage that if I modify or add an entry to a folder in the CLI then it doesn't cause any problems for nemo - such as invalid metadata. GNU copy or move do not support links to metadata in SQL databases!