metadatagit-annexhttp://git-annex.branchable.com/metadata/git-annexikiwiki2015-05-06T14:24:56Zaccess metadata by key?http://git-annex.branchable.com/metadata/comment_1_d367fdaf0425b59d694bf16059d47192/bremner2014-03-17T01:26:53Z2014-03-17T01:26:44Z
<p>I'm hacking around with using metadata from an external special remote. Those work with keys, not files, so one option would be to add a GETMETADATA to the protocol. It also seems like it would not be too hard to add
an option to "git annex metadata" to take a key rather than a file.</p>
comment 2http://git-annex.branchable.com/metadata/comment_2_e15d2b5a405db4ccdb91d6aad4a22983/joeyh.name2014-03-17T19:32:39Z2014-03-17T19:32:39Z
<p>I've made <code>git annex metadata --key</code> work.</p>
<p>I'll wait and see what you come up with your special remote and add something to the protocol later if it makes sense.</p>
Overwriting metadata from jsonhttp://git-annex.branchable.com/metadata/comment_3_50b17af1cf75ce88c4aef59dcd971b82/madduck2015-04-30T18:42:45Z2015-04-30T18:42:45Z
I see that --json allows me to export metadata in a well-parseable format. I'd really like to be able to pipe this into a file, edit the file and then pipe it back to git-annex, causing the metadata for each file to be rewritten from the JSON input. This would make it trivial to write an external metadata editor (like vidir, vorbistagedit, git annex vicfg even… etc.)
comment 4http://git-annex.branchable.com/metadata/comment_4_237721c5e8f66f303a1828810573a23d/joey2015-05-01T21:45:17Z2015-05-01T19:38:36Z
<p>@madduck, you could file a todo if you want about that.</p>
<p>However, I have my doubts; if the json supposed to include the full set of
metadata for the file? If so, that seems a potentially expensive interface.
If not, it would be hard to tell when metadata should be deleted, or when
multiple values are being set, vs a value being changed.</p>
<p>The current interface to set metadata deals with these possibilities in a
compact and sensible way.</p>
TODO writtenhttp://git-annex.branchable.com/metadata/comment_5_fd30444aecfc4792eb4dbfdebc230786/madduck2015-05-06T14:24:56Z2015-05-06T14:24:56Z
<p>@joeyh, yes, it would overwrite all metadata. The idea would be to export with --json, manipulate, import…</p>
<p>http://git-annex.branchable.com/todo/ability_to_set_metadata_from_json/?updated</p>