[annodex-users] pyannodex - addition of meta tags.

Denis Crowdy Denis.Crowdy at mq.edu.au
Sat Aug 18 20:03:39 PDT 2007


Hi,

I am trying to modify anx media, by adding meta information to the head 
or a clip.  Is this doable with pyannodex?  I can't see how to do it 
with the head yet, but have been trying code like this:

import annodex
anx = annodex.Writer("tmp.anx")
anx.import_file("test.anx")
mymeta = annodex.Meta(name="dbid", content="4")

myanchor=annodex.Anchor(text="Find out about Annodex media",
                       href="http://www.annodex.net/")

#clip3 = annodex.Clip(meta=mymeta)  # doesn't work..
clip3 = annodex.Clip(anchor=myanchor, meta=mymetas)  # works, but only 
the anchor is created

So in the above  - a clip can be added with an anchor, but not a meta 
(either with an anchor or alone).  had a quick look in the pyannodex 
source and can see the following function in py_anx.c:

pyanchor_to_clip(PyObject *pyanchor, AnxClip *clip)

But not pymeta_to_clip...

Actually more useful to me would be the ability to add a meta tag to a head.

I can try and add this implementation, but any clues as to a rough plan 
to go about this would be much appreciated.

Cheers,

Denis

-- 
Dr Denis Crowdy
Department of Contemporary Music Studies, Macquarie University
+61 2 9850 6787
http://www.dcms.mq.edu.au
http://www.motekulo.net    http://www.melanesianmusic.org



More information about the annodex-users mailing list