Skip to content

madmurphy/nautilus-annotations

Repository files navigation

Nautilus Annotations

Annotate files and directories

Details

Long time ago GNOME Files (Nautilus) had the ability to handle custom annotations attached to files and directories. This ability has slowly gone lost in the folds of time. Things however are rarely really unlearned, and an ability rarely goes away for good.

Nautilus Annotations brings back Nautilus' annotation capabilities. It exploits the same machinery that was used back then: that of relying on GIO to store custom information about a file or a directory.

Each annotation is stored as a metadata::annotation entry in GIO's database. An “Annotations” column containing a short preview of what has been annotated is made available to Nautilus. Annotated files are shown in the viewport with an emblem attached.

To erase an annotation it is sufficient to leave the content blank, and the extension will take care of erasing the database entry.

The dialog window for editing the annotations is very minimal, albeit polished and with Markdown highlighting enabled.

Thanks to GIO, when a file is moved or renamed its annotations remain synchronized with the new path.

Annotations are “per user”. This means that although Alice has the right to annotate Bob's files, only Alice will have access to her own annotations.

Annotation emblems are displayed by the extension and will not be shown once the extension is uninstalled (the metadata::emblems database entry for the file is left untouched). The content of the annotations instead is managed by GIO and will survive uninstalling the extension.

With version 2.0.0 an emblem picker has been added to the annotations window. Differently than the text annotation emblem, this will change the metadata::emblems database entry for the file and the emblems set in this way will survive uninstalling the extension.

Emblems and annotations are stored in ~/.local/share/gvfs-metadata. It is possible to access annotations via command line by launching:

gio info -a metadata::annotation /path/to/file

To set an annotation via command line launch:

gio set /path/to/file metadata::annotation 'Content of annotation goes here'

To unset an annotation via command line launch:

gio set -t unset /path/to/file metadata::annotation

To set the group of emblems via command line launch:

gio set -t stringv /path/to/file metadata::emblems emblem-one emblem-two \
	emblem-three ... emblem-nth

To unset all emblems via command line launch:

gio set -t unset /path/to/file metadata::emblems

Get involved

The package needs help with internationalization. If a translation into your language is missing and you wish to get involved, here is what to do.

Let's say you want to create a Dutch translation of Nautilus Annotations (nl). First thing to do is to make sure that GNU Autotools and GNU gettext are installed on your system. Then clone this repository and launch the following commands:

./bootstrap
make -C po nautilus-annotations.pot
(cd po && msginit -l nl)
./bootstrap --clean

Now edit the po/LINGUAS file and add a new line containing the abbreviated name of the new language (nl).

Finally, open the po/nl.po file and translate the strings present. All you have to do now is to commit your changes.

For any issue, drop a message.

Installation

On most Unix-like systems, you should be able to install this package using the following common steps:

./configure
make
make install-strip

If the strip utility is not available on your machine, use make install instead (it will produce larger binaries).

If the configure script is missing from your package you need to generate it by running the bootstrap script. By default, bootstrap will also run the configure script immediately after having generated it, so you may type the make command directly after bootstrap. To list different options use ./bootstrap --help.

For further information, see INSTALL.

NExtGen

This extension has been created using NExtGen Nautilus extension generator.

Free software

Nautilus Annotations is free software. You can redistribute it and/or modify it under the terms of the GPL license version 3 or any later version. See COPYING for details.