Merge "Camera2: Docs - Add output_file option to metadata_parser_xml.py"
diff --git a/camera/docs/docs.html b/camera/docs/docs.html
index dcd40cd..94834d1 100644
--- a/camera/docs/docs.html
+++ b/camera/docs/docs.html
@@ -9928,4 +9928,3 @@
</body>
</html>
-
diff --git a/camera/docs/metadata-generate b/camera/docs/metadata-generate
index 38f8ac7..7869763 100755
--- a/camera/docs/metadata-generate
+++ b/camera/docs/metadata-generate
@@ -33,7 +33,7 @@
local in=$thisdir/$1
local out=$thisdir/$2
- python $thisdir/metadata_parser_xml.py $thisdir/metadata_properties.xml $in > $out
+ python $thisdir/metadata_parser_xml.py $thisdir/metadata_properties.xml $in $out
local succ=$?
diff --git a/camera/docs/metadata-parser-sanity-check b/camera/docs/metadata-parser-sanity-check
index a7ff41e..520a5f2 100755
--- a/camera/docs/metadata-parser-sanity-check
+++ b/camera/docs/metadata-parser-sanity-check
@@ -29,7 +29,7 @@
tmp_tidy1=$(mktemp)
tmp_tidy2=$(mktemp)
-python $thisdir/metadata_parser_xml.py $thisdir/metadata_properties.xml $thisdir/metadata_template.mako > $tmp_out || exit 1
+python $thisdir/metadata_parser_xml.py $thisdir/metadata_properties.xml $thisdir/metadata_template.mako $tmp_out || exit 1
tidy -indent -xml -quiet $thisdir/metadata_properties.xml > $tmp_tidy1
tidy -indent -xml -quiet $tmp_out > $tmp_tidy2
diff --git a/camera/docs/metadata_model.py b/camera/docs/metadata_model.py
index c1f4e09..fa85a58 100644
--- a/camera/docs/metadata_model.py
+++ b/camera/docs/metadata_model.py
@@ -1173,4 +1173,3 @@
setattr(self, p, getattr(entry.entry, p))
else:
setattr(self, p, getattr(entry, p))
-
diff --git a/camera/docs/metadata_parser_xml.py b/camera/docs/metadata_parser_xml.py
index d42a8b4..7b55273 100755
--- a/camera/docs/metadata_parser_xml.py
+++ b/camera/docs/metadata_parser_xml.py
@@ -21,8 +21,8 @@
over a Mako template.
Usage:
- metadata_parser_xml.py <filename.xml> <template.mako>
- - outputs the resulting template to stdout
+ metadata_parser_xml.py <filename.xml> <template.mako> [<output_file>]
+ - outputs the resulting template to output_file (stdout if none specified)
Module:
The parser is also available as a module import (MetadataParserXml) to use
@@ -253,14 +253,16 @@
#####################
if __name__ == "__main__":
- if len(sys.argv) <= 1:
- print >> sys.stderr, "Usage: %s <filename.xml> <template.mako>" \
- % (sys.argv[0])
+ if len(sys.argv) <= 2:
+ print >> sys.stderr, \
+ "Usage: %s <filename.xml> <template.mako> [<output_file>]" \
+ % (sys.argv[0])
sys.exit(0)
file_name = sys.argv[1]
template_name = sys.argv[2]
+ output_name = sys.argv[3] if len(sys.argv) > 3 else None
parser = MetadataParserXml(file_name)
- parser.render(template_name)
+ parser.render(template_name, output_name)
sys.exit(0)
diff --git a/camera/include/system/camera_metadata_tags.h b/camera/include/system/camera_metadata_tags.h
index c5fbec2..2cd5b31 100644
--- a/camera/include/system/camera_metadata_tags.h
+++ b/camera/include/system/camera_metadata_tags.h
@@ -627,4 +627,3 @@
uint32_t value,
char *dst,
size_t size);
-
diff --git a/camera/src/camera_metadata_tag_info.c b/camera/src/camera_metadata_tag_info.c
index 5eee140..c9161cf 100644
--- a/camera/src/camera_metadata_tag_info.c
+++ b/camera/src/camera_metadata_tag_info.c
@@ -1776,4 +1776,3 @@
#define CAMERA_METADATA_ENUM_STRING_MAX_SIZE 23
-