2015-03-25 16:09:49 +00:00
|
|
|
# NAME
|
|
|
|
|
|
|
|
git-annex metadata - sets or gets metadata of a file
|
|
|
|
|
|
|
|
# SYNOPSIS
|
|
|
|
|
|
|
|
git annex metadata `[path ...]`
|
|
|
|
|
|
|
|
# DESCRIPTION
|
|
|
|
|
|
|
|
The content of an annexed file can have any number of metadata fields
|
|
|
|
attached to it to describe it. Each metadata field can in turn
|
|
|
|
have any number of values.
|
|
|
|
|
|
|
|
This command can be used to set metadata, or show the currently set
|
|
|
|
metadata.
|
|
|
|
|
|
|
|
When run without any -s or -t parameters, displays the current metadata.
|
|
|
|
|
|
|
|
# OPTIONS
|
|
|
|
|
2016-02-29 17:00:46 +00:00
|
|
|
* `-g field` / `--get field`
|
2015-03-25 16:09:49 +00:00
|
|
|
|
|
|
|
Get the value(s) of a single field.
|
|
|
|
|
|
|
|
The values will be output one per line, with no other output, so
|
|
|
|
this is suitable for use in a script.
|
|
|
|
|
2016-02-29 17:00:46 +00:00
|
|
|
* `-s field=value` / `--set field=value`
|
2015-03-25 16:09:49 +00:00
|
|
|
|
|
|
|
Set a field's value, removing any old values.
|
|
|
|
|
2016-02-29 17:00:46 +00:00
|
|
|
* `-s field+=value` / `--set field+=value`
|
2015-03-25 16:09:49 +00:00
|
|
|
|
|
|
|
Add an additional value, preserving any old values.
|
|
|
|
|
2016-02-29 17:00:46 +00:00
|
|
|
* `-s field?=value` / `--set field?=value`
|
2015-03-25 16:09:49 +00:00
|
|
|
|
2016-02-29 17:00:46 +00:00
|
|
|
Set a value, but only if the field does not already have a value set.
|
2015-03-25 16:09:49 +00:00
|
|
|
|
2016-02-29 17:00:46 +00:00
|
|
|
* `-s field-=value` / `--set field-=value`
|
2015-03-25 16:09:49 +00:00
|
|
|
|
2016-02-29 17:00:46 +00:00
|
|
|
Remove a value from a field, leaving any other values that the field has
|
|
|
|
set.
|
|
|
|
|
|
|
|
* `-r field` / `--remove field`
|
|
|
|
|
|
|
|
Remove all current values of the field.
|
|
|
|
|
|
|
|
* `-t tag` / `--tag tag`
|
2015-03-25 16:09:49 +00:00
|
|
|
|
|
|
|
Set a tag. Note that a tag is just a value of the "tag" field.
|
|
|
|
|
2016-02-29 17:00:46 +00:00
|
|
|
* `-u tag` / `--unset tag`
|
2015-03-25 16:09:49 +00:00
|
|
|
|
|
|
|
Unset a tag.
|
|
|
|
|
|
|
|
* `--force`
|
|
|
|
|
|
|
|
By default, `git annex metadata` refuses to recursively set metadata
|
|
|
|
throughout the files in a directory. This option enables such recursive
|
|
|
|
setting.
|
|
|
|
|
|
|
|
* file matching options
|
|
|
|
|
|
|
|
The [[git-annex-matching-options]](1)
|
|
|
|
can be used to specify files to act on.
|
|
|
|
|
|
|
|
* `--json`
|
|
|
|
|
|
|
|
Enable JSON output. This is intended to be parsed by programs that use
|
|
|
|
git-annex. Each line of output is a JSON object.
|
|
|
|
|
2015-04-21 20:31:00 +00:00
|
|
|
* `--all`
|
|
|
|
|
|
|
|
Specify instead of a file to get/set metadata on all known keys.
|
|
|
|
|
|
|
|
* `--unused`
|
|
|
|
|
|
|
|
Specify instead of a file to get/set metadata on
|
|
|
|
files found by last run of git-annex unused.
|
|
|
|
|
|
|
|
* `--key=keyname`
|
|
|
|
|
|
|
|
Specify instead of a file to get/set metadata of the specified key.
|
|
|
|
|
2015-03-25 16:09:49 +00:00
|
|
|
# EXAMPLES
|
|
|
|
|
|
|
|
To set some tags on a file and also its author:
|
|
|
|
|
|
|
|
git annex metadata annexscreencast.ogv -t video -t screencast -s author+=Alice
|
|
|
|
|
|
|
|
# SEE ALSO
|
|
|
|
|
|
|
|
[[git-annex]](1)
|
|
|
|
|
2015-05-29 16:12:55 +00:00
|
|
|
[[git-annex-view]](1)
|
|
|
|
|
2015-03-25 16:09:49 +00:00
|
|
|
# AUTHOR
|
|
|
|
|
|
|
|
Joey Hess <id@joeyh.name>
|
|
|
|
|
|
|
|
Warning: Automatically converted into a man page by mdwn2man. Edit with care.
|