blob: 1890876b4d5e434bdcd21473849079b6c45b1efd [file]
texinfo/contrib/read_dump_tree/README
Copyright 2026 Free Software Foundation, Inc.
Copying and distribution of this file, with or without modification,
are permitted in any medium without royalty provided the copyright
notice and this notice are preserved.
Two scripts that dump/read an XML representation of the Texinfo tree used in
texi2any:
* dump_texinfo_tree_xml.py: dump the XML representation of the Texinfo tree
of a Texinfo manual;
* read_texinfo_tree_xml.py: read an XML dump and recreate a Texinfo tree
and a parsed Document.
These scripts are based on the Texinfo Python SWIG interface.
To test the conversions on the Texinfo manual:
rm -rf check_manual
mkdir check_manual
../../tta/perl/texi2any.pl --ifhtml -c TEXINFO_OUTPUT_FORMAT=structure ../../doc/texinfo.texi -c DUMP_STRUCTURE=check_manual/texinfo-ref.struct
../../tta/perl/texi2any.pl --ifhtml -c TEXINFO_OUTPUT_FORMAT=plaintexinfo ../../doc/texinfo.texi > check_manual/texinfo-ref-html.texi
export PYTHONPATH=../../tta/swig/python:../../tta/swig/python/.libs
./dump_texinfo_tree_xml.py ../../doc/texinfo.texi > check_manual/texinfo-tree.xml
./read_texinfo_tree_xml.py check_manual/texinfo-tree.xml 2>check_manual/texinfo.tree | diff -u check_manual/texinfo-ref-html.texi - > check_manual/texinfo_manual.diff
diff -u check_manual/texinfo-ref.struct check_manual/texinfo.tree > check_manual/print_test_texinfo.diff