commit
4017f79c83
@ -1,47 +0,0 @@
|
||||
################################################################################
|
||||
# File : iptc.awk
|
||||
# Author(s): Andreas Huggel (ahu) <ahuggel@gmx.net>
|
||||
# History : 07-Feb-04, ahu: created
|
||||
#
|
||||
# Description:
|
||||
# Awk script to convert a taglist to XML format used in the documentation.
|
||||
# $ taglist [SectionName] | awk -f iptc.awk > iptc.xml
|
||||
################################################################################
|
||||
|
||||
BEGIN {
|
||||
FS = ", "
|
||||
print "<?xml version = '1.0'?>";
|
||||
print "<?xml-stylesheet type=\"text/xsl\" href=\"iptc.xsl\"?>";
|
||||
|
||||
print "<TAGLIST>"
|
||||
print "<HEADER>"
|
||||
print "<title>Iptc datasets defined in Exiv2</title>"
|
||||
print "<text>"
|
||||
print "<p>Datasets are defined according to the specification of the Iptc "
|
||||
print "<a href=\"http://www.iptc.org/IIM/\">Information Interchange Model (IIM)</a>.</p>"
|
||||
print "<p>Click on a column header to sort the table.</p>"
|
||||
print "</text>"
|
||||
print "</HEADER>"
|
||||
print "<ROWSET>"
|
||||
}
|
||||
|
||||
{
|
||||
print " <ROW num=\"" ++row "\">";
|
||||
print " <tagname>" $1 "</tagname>"
|
||||
print " <tagdec>" $2 "</tagdec>"
|
||||
print " <taghex>" $3 "</taghex>"
|
||||
print " <recname>" $4 "</recname>"
|
||||
print " <mandatory>" $5 "</mandatory>"
|
||||
print " <repeatable>" $6 "</repeatable>"
|
||||
print " <minbytes>" $7 "</minbytes>"
|
||||
print " <maxbytes>" $8 "</maxbytes>"
|
||||
print " <key>" $9 "</key>"
|
||||
print " <type>" $10 "</type>"
|
||||
print " <tagdesc>" $11 "</tagdesc>"
|
||||
print " </ROW>";
|
||||
}
|
||||
|
||||
END {
|
||||
print "</ROWSET>"
|
||||
print "</TAGLIST>"
|
||||
}
|
@ -0,0 +1,39 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
import sys
|
||||
import csv
|
||||
|
||||
print("""<?xml version = '1.0'?>
|
||||
<?xml-stylesheet type=\"text/xsl\" href=\"tags.xsl\"?>
|
||||
<TAGLIST>
|
||||
<HEADER>
|
||||
<title>Iptc datasets defined in Exiv2</title>
|
||||
<text>
|
||||
<p>Datasets are defined according to the specification of the Iptc
|
||||
<a href=\"http://www.iptc.org/IIM/\">Information Interchange Model (IIM)</a>.</p>
|
||||
<p>Click on a column header to sort the table.</p>
|
||||
</text>
|
||||
</HEADER>
|
||||
<ROWSET>""")
|
||||
|
||||
row=0
|
||||
data = sys.stdin.readlines()
|
||||
for line in csv.reader(data,quotechar='"',skipinitialspace=True):
|
||||
row=row+1
|
||||
print(" <ROW num=\"%d\">" % row)
|
||||
print(" <tagname>" + line[ 0] + "</tagname>")
|
||||
print(" <tagdec>" + line[ 1] + "</tagdec>")
|
||||
print(" <taghex>" + line[ 2] + "</taghex>")
|
||||
print(" <recname>" + line[ 3] + "</recname>")
|
||||
print(" <mandatory>" + line[ 4] + "</mandatory>")
|
||||
print(" <repeatable>" + line[ 5] + "</repeatable>")
|
||||
print(" <minbytes>" + line[ 6] + "</minbytes>")
|
||||
print(" <maxbytes>" + line[ 7] + "</maxbytes>")
|
||||
print(" <key>" + line[ 8] + "</key>")
|
||||
print(" <type>" + line[ 9] + "</type>")
|
||||
print(" <tagdesc>" + line[10] + "</tagdesc>")
|
||||
print(" </ROW>")
|
||||
|
||||
print("</ROWSET>")
|
||||
print("</TAGLIST>")
|
||||
|
@ -1,43 +0,0 @@
|
||||
################################################################################
|
||||
# File : tags.awk
|
||||
# Author(s): Andreas Huggel (ahu) <ahuggel@gmx.net>
|
||||
# History : 07-Feb-04, ahu: created
|
||||
#
|
||||
# Description:
|
||||
# Awk script to convert a taglist to XML format used in the documentation.
|
||||
# $ taglist [itemName] | awk -f tags.awk > tags.xml
|
||||
################################################################################
|
||||
|
||||
BEGIN {
|
||||
FS = ", " # ,\t
|
||||
print "<?xml version = '1.0'?>";
|
||||
print "<?xml-stylesheet type=\"text/xsl\" href=\"tags.xsl\"?>";
|
||||
|
||||
print "<TAGLIST>"
|
||||
print "<HEADER>"
|
||||
print "<title>XYZ MakerNote Tags defined in Exiv2</title>"
|
||||
print "<text>"
|
||||
print "<p>Tags found in the MakerNote of images taken with XYZ cameras. These tags "
|
||||
print "are defined by Exiv2 in accordance with <a href=\"makernote.html#RX\">[X]</a>.</p>"
|
||||
print "<p>Click on a column header to sort the table.</p>"
|
||||
print "</text>"
|
||||
print "</HEADER>"
|
||||
print "<ROWSET>"
|
||||
}
|
||||
|
||||
{
|
||||
print " <ROW num=\"" ++row "\">";
|
||||
print " <tagname>" $1 "</tagname>"
|
||||
print " <tagdec>" $2 "</tagdec>"
|
||||
print " <taghex>" $3 "</taghex>"
|
||||
print " <ifd>" $4 "</ifd>"
|
||||
print " <key>" $5 "</key>"
|
||||
print " <type>" $6 "</type>"
|
||||
print " <tagdesc>" $7 "</tagdesc>"
|
||||
print " </ROW>";
|
||||
}
|
||||
|
||||
END {
|
||||
print "</ROWSET>"
|
||||
print "</TAGLIST>"
|
||||
}
|
@ -0,0 +1,35 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
import sys
|
||||
import csv
|
||||
|
||||
print("""<?xml version = '1.0'?>
|
||||
<?xml-stylesheet type=\"text/xsl\" href=\"tags.xsl\"?>
|
||||
<TAGLIST>
|
||||
<HEADER>
|
||||
<title>XYZ MakerNote Tags defined in Exiv2</title>
|
||||
<text>
|
||||
<p>Tags found in the MakerNote of images taken with XYZ cameras. These tags
|
||||
are defined by Exiv2 in accordance with <a href=\"makernote.html#RX\">[X]</a>.</p>
|
||||
<p>Click on a column header to sort the table.</p>
|
||||
</text>
|
||||
</HEADER>
|
||||
<ROWSET>""")
|
||||
|
||||
row=0
|
||||
data = sys.stdin.readlines()
|
||||
for line in csv.reader(data,quotechar='"',skipinitialspace=True):
|
||||
row=row+1
|
||||
print(" <ROW num=\"%d\">" % row)
|
||||
print(" <tagname>" + line[0] + "</tagname>")
|
||||
print(" <tagdec>" + line[1] + "</tagdec>")
|
||||
print(" <taghex>" + line[2] + "</taghex>")
|
||||
print(" <ifd>" + line[3] + "</ifd>")
|
||||
print(" <key>" + line[4] + "</key>")
|
||||
print(" <type>" + line[5] + "</type>")
|
||||
print(" <tagdesc>" + line[6] + "</tagdesc>")
|
||||
print(" </ROW>")
|
||||
|
||||
print("</ROWSET>")
|
||||
print("</TAGLIST>")
|
||||
|
@ -1,42 +0,0 @@
|
||||
################################################################################
|
||||
# File : xmp.awk
|
||||
# Author(s): Andreas Huggel (ahu) <ahuggel@gmx.net>
|
||||
# History : 23-Nov-07, ahu: created
|
||||
#
|
||||
# Description:
|
||||
# Awk script to convert an XMP property list to XML format used in the
|
||||
# documentation.
|
||||
# $ taglist [xmpList] | awk -f xmp.awk > [xmpList].xml
|
||||
################################################################################
|
||||
|
||||
BEGIN {
|
||||
FS = ", " # ,\t
|
||||
print "<?xml version = '1.0'?>";
|
||||
print "<?xml-stylesheet type=\"text/xsl\" href=\"xmp.xsl\"?>";
|
||||
|
||||
print "<TAGLIST>"
|
||||
print "<HEADER>"
|
||||
print "<title>XMP tags defined in Exiv2</title>"
|
||||
print "<text>"
|
||||
print "<p>Some description</p>"
|
||||
print "<p>Click on a column header to sort the table.</p>"
|
||||
print "</text>"
|
||||
print "</HEADER>"
|
||||
print "<ROWSET>"
|
||||
}
|
||||
|
||||
{
|
||||
print " <ROW num=\"" ++row "\">";
|
||||
print " <tagname>" $1 "</tagname>"
|
||||
print " <title>" $2 "</title>"
|
||||
print " <xmpvaltype>" $3 "</xmpvaltype>"
|
||||
print " <type>" $4 "</type>"
|
||||
print " <category>" $5 "</category>"
|
||||
print " <tagdesc>" $6 "</tagdesc>"
|
||||
print " </ROW>";
|
||||
}
|
||||
|
||||
END {
|
||||
print "</ROWSET>"
|
||||
print "</TAGLIST>"
|
||||
}
|
@ -0,0 +1,34 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
import sys
|
||||
import csv
|
||||
|
||||
print("""<?xml version = '1.0'?>
|
||||
<?xml-stylesheet type=\"text/xsl\" href=\"tags.xsl\"?>
|
||||
<TAGLIST>
|
||||
<HEADER>
|
||||
<title>XMP tags defined in Exiv2</title>
|
||||
<text>
|
||||
<p>Some description</p>
|
||||
<p>Click on a column header to sort the table.</p>
|
||||
</text>
|
||||
</HEADER>
|
||||
<ROWSET>""")
|
||||
|
||||
row=0
|
||||
data = sys.stdin.readlines()
|
||||
print(data)
|
||||
for line in csv.reader(data,quotechar='"',skipinitialspace=True):
|
||||
row=row+1
|
||||
print(" <ROW num=\"%d\">" % row)
|
||||
print(" <tagname>" + line[0] + "</tagname>")
|
||||
print(" <title>" + line[1] + "</title>")
|
||||
print(" <xmpvaltype>" + line[2] + "</xmpvaltype>")
|
||||
print(" <type>" + line[3] + "</type>")
|
||||
print(" <category>" + line[4] + "</category>")
|
||||
print(" <tagdesc>" + line[5] + "</tagdesc>")
|
||||
print(" </ROW>")
|
||||
|
||||
print("</ROWSET>")
|
||||
print("</TAGLIST>")
|
||||
|
Loading…
Reference in New Issue