• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..09-Nov-2020-

MakefileH A D08-Nov-2020243 139

READMEH A D08-Nov-20201.7 KiB4231

repair-path.cH A D08-Nov-20208 KiB233170

README

1Libgda F-Spot example
2=====================
3
4Description:
5------------
6
7WARNING: this is a demonstration program and should _not_ be used on production systems as
8some yet unknown bug may corrupt your F-Spot database. You'll have been warned.
9
10This example helps "repairing" an F-Spot database corrupted because you may have moved some
11of your pictures into another directory while the F-Spot database still references the picture
12file in the original directory.
13
14This example also illustrates how to use the GdaVconnectionHub virtual connection, as the following
15environment is set up:
16* a connection (CNC) is opened on the F-Spot database
17* a GdaDataModelDir data model is created listing the files in the specified directory (on the
18  command line) or in the current directory
19* a virtual connection is created with the CNC's tables in the "spot" namespace, in which the tables are:
20  * spot.photos: virtual table representing the CNC.photos table
21  * files: virtual table representing the contents of the GdaDataModelDir data model
22  * some other tables from the CNC connection under the "spot" namespace
23
24The program then uses SQL to determine missing files from the spot.photos table, and to propose
25corrections. The F-Spot database is not modified unless the -w option is given.
26
27Compiling and running:
28----------------------
29
30To compile (make sure Libgda is installed prior to this):
31> make
32
33For help:
34> ./repair-path --help
35
36Use the -f option to specify the F-Spot database file ($HOME/.gnome2/f-spot/photos.db by default)
37Use the -w option to actually write corrections to the database file
38Speficy an optional directory as the topmost directory where your files may be
39
40> ./repair-path /path/to/files
41> ./repair-path -f ./photos.db -w /path/to/files
42