iemejia / catho

A file catalog utility inspired by the awesome Robert Vasicek's Cathy project. Or my excuse to hack something that I really need.
GNU Lesser General Public License v3.0
6 stars 1 forks source link

Save only relative paths #34

Closed iemejia closed 11 years ago

iemejia commented 11 years ago

When saving catalog, save the full path in the metadata. And only relative paths in the catalog table. Currently it works for ., but it fails with the system auto completed paths (e.g. ~)

iemejia commented 11 years ago

I mean not fail, but the system auto completes ~ to the user path, i don't know which other paths are auto completed like that.

rgamez commented 11 years ago

it happens with relative paths too, for example:

$ catho/catho.py add iPad2 ../../../../Users/rgamez/Documents/iPad $ catho/catho.py find * iPad2 (90, 'org.pdf', 1329581153, 1545291, '../../../../Users/rgamez/Documents/iPad', '7cba495b5c510958d2d94ad14be7fe9f7e5771b9')

rgamez commented 11 years ago

I suggest add and extra parameter on the add option for setting a base path:

$ catho/catho.py add name path [basepath]

rgamez commented 11 years ago

And an extra functionality for modifying that basepath:

$ catho/catho.py mv name [basepath]

iemejia commented 11 years ago

I don't think moving to a different basepath would be so important, as it's a simple replacement of the metadata, maybe we should find a more generic way to edit the metadata something like -set-meta key, value.