aboutsummaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorOlivier Tilloy <olivier@tilloy.net>2010-12-17 20:58:36 +0100
committerOlivier Tilloy <olivier@tilloy.net>2010-12-17 20:58:36 +0100
commitcc22de6ce7bec06bfa6843fdc8a010d9fe6f0061 (patch)
tree9abfb80c1c0364f17ae0037febb339a8281f8d77 /doc
parent59e0e77c26f533a8492808183abb51a068f01d0d (diff)
downloadpyexiv2-cc22de6ce7bec06bfa6843fdc8a010d9fe6f0061.tar.gz
Added a section on custom XMP namespaces to the tutorial.
Diffstat (limited to 'doc')
-rw-r--r--doc/tutorial.rst13
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
###########################