martin f krafft wrote:
> With views, filenames seem to be created as a function of their
> original path relative to the repo root. For instance, a file
> 
>   2013.08.19/DSC_2764.JPG
> 
> tagged "gallery" becomes DSC_2764_%2013.08.19%.JPG when the
> tag==gallery view is in effect.
> 
> It would be great to be able to control the function that creates
> this filename. In particular, I would love to be able to deduce the
> filename from other metadata, e.g. having a "filename_caption" field
> associated with the file, which could then be used in a template to
> generate those filenames.

It's not that simple. The function has to be reversible, so that when a
filepath in a view is changed, git-annex can calculate a delta to apply
to its metadata.

Also, the function must be guaranteed to never assign the same filename
within the view to two files from its parent branch.

These are some pretty hairy constraints, which led to the current
implementation. Of course it can be modified using a function, as long
as the function is written in haskell. ;) See Annex/View/ViewedFile.hs

-- 
see shy jo

Attachment: signature.asc
Description: Digital signature

Reply via email to