Home

ericpignet edited this page Sep 14, 2010 · 14 revisions
Clone this wiki locally

New in version 0.3

  • Neposync can now execute a Mysql query on Amarok database.
    Ex: neposync --query-amarok "select * from albums"
  • Standardized display of filenames in the output
  • Bugfix: when tag did not exist in Nepomuk, Neposync created a tag without label
  • Bugfix: some strings with accents were not successfully displayed

Presentation

With KDE SC 4.4 and integration of Virtuoso in distributions, semantic desktop is no more a futuristic project but a reality: I tested tagging, rating, filters in Gwenview, searches in Dolphin, all works fine.

But before starting the long work of tagging my gigabytes of photos, I wanted to be sure the work would not be lost if I change my computer or my distribution.
The problem is that there is no utility to backup/export the Nepomuk Virtuoso database at this time.

So I decided to write a simple tool to:

  • read tags/ratings from Nepomuk and store them in files metadata (same metadata used by Digikam)
  • read tags/ratings from files metadata and store them in Nepomuk

This is a command-line tool very easy to use. You just cd to a directory containing images tagged/rated via Dolphin or Gwenview and you type:
neposync --nepomuk-to-files

That’s it: all tags/ratings for images in the current directory are now stored in files metadata and will never be lost.
If you copy these images on another KDE powered computer, you just have to type:
neposync --files-to-nepomuk
to fill Nepomuk database with your valuable manual work.

The tool also allows you to display all tags/ratings stored in Nepomuk, or to clear them (see usage below).

Download

Neposync is a simple Qt C++ program, using KDE libs. At your choice, you can:

  • install the package for your distribution: check Install page for more details
  • install from source:
    - download the source tarfile (available in Downloads page)
    - or retrieve git sources: git clone git://github.com/ericpignet/neposync.git
    - to compile, just type qmake && make. More details in Install page

Please tell me if you use the tool !

Usage

The full usage of the tool is:

Common usage:
neposync -nf [OPTIONS..] [DIRECTORY]
neposync -fn [OPTIONS..] [DIRECTORY]
Actions (nepomuk):
-nf, —nepomuk-to-files Read tags/ratings from Nepomuk and store them in files metadata
-fn, —files-to-nepomuk Read tags/ratings from files metadata and store them in Nepomuk
-dn, —display-nepomuk Display all Nepomuk tags/ratings
-cn, —clear-nepomuk Clear all Nepomuk tags/ratings
Actions (amarok):
-af, —amarok-to-files Read ratings from Amarok collection and store them in files metadata
-fa, —files-to-amarok Read ratings from files metadata and store them in Amarok collection
-da, —display-amarok Display all Amarok ratings
Options:
-r —recursive Recurse into sub-directories
-f —force Copy tags/ratings even if empty on source side
-V —verbose Display all nepomuk output (depending on KDebug settings)
-h —help Display this usage information
DIRECTORY is optional, if absent the current directory is synchronized
Remarks: neposync uses IPTC ‘keyword’ metadata to read/store tags in image files (as Digikam)
neposync uses XMP ‘Rating’ metadata to read/store ratings in image files (as Digikam)
neposync uses ID3v2 ‘Popularimeter/POPM’ metadata to read/store ratings in MP3 files