diff options
author | Olivier Tilloy <olivier@tilloy.net> | 2010-12-17 20:58:36 +0100 |
---|---|---|
committer | Olivier Tilloy <olivier@tilloy.net> | 2010-12-17 20:58:36 +0100 |
commit | cc22de6ce7bec06bfa6843fdc8a010d9fe6f0061 (patch) | |
tree | 9abfb80c1c0364f17ae0037febb339a8281f8d77 /doc | |
parent | 59e0e77c26f533a8492808183abb51a068f01d0d (diff) | |
download | pyexiv2-cc22de6ce7bec06bfa6843fdc8a010d9fe6f0061.tar.gz |
Added a section on custom XMP namespaces to the tutorial.
Diffstat (limited to 'doc')
-rw-r--r-- | doc/tutorial.rst | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/doc/tutorial.rst b/doc/tutorial.rst index 9f5a418..709b686 100644 --- a/doc/tutorial.rst +++ b/doc/tutorial.rst @@ -240,6 +240,19 @@ If the tag was not present, one is created and its value is set:: >>> metadata[key] = value +If you need to write custom metadata, you can register a custom XMP namespace:: + + >>> pyexiv2.xmp.register_namespace('http://example.org/foo/', 'foo') + >>> metadata['Xmp.foo.bar'] = 'baz' + +Note that a limitation of the current implementation is that only simple text +values can be written to tags in a custom namespace. + +A custom namespace can be unregistered. This has the effect of invalidating all +tags in this namespace for images that have not been written back yet:: + + >>> pyexiv2.xmp.unregister_namespace('http://example.org/foo/') + Accessing embedded previews ########################### |