* arthur/xml_transform/README
* arthur/xml_transform/main.cc
* arthur/xml_transform/TODO: New.
---
scribo/sandbox/ChangeLog | 8 ++++++
scribo/sandbox/arthur/xml_transform/README | 33 +++++++++++++--------------
scribo/sandbox/arthur/xml_transform/main.cc | 11 +++++---
3 files changed, 31 insertions(+), 21 deletions(-)
diff --git a/scribo/sandbox/ChangeLog b/scribo/sandbox/ChangeLog
index 1a84b5f..052bd6d 100644
--- a/scribo/sandbox/ChangeLog
+++ b/scribo/sandbox/ChangeLog
@@ -1,5 +1,13 @@
2010-08-06 Arthur Crepin-Leblond <crepin(a)lrde.epita.fr>
+ Open Document bug warning.
+
+ * arthur/xml_transform/README
+ * arthur/xml_transform/main.cc
+ * arthur/xml_transform/TODO: New.
+
+2010-08-06 Arthur Crepin-Leblond <crepin(a)lrde.epita.fr>
+
Fix man error.
* arthur/xml_transform/README
diff --git a/scribo/sandbox/arthur/xml_transform/README b/scribo/sandbox/arthur/xml_transform/README
index cb04495..5c22a15 100644
--- a/scribo/sandbox/arthur/xml_transform/README
+++ b/scribo/sandbox/arthur/xml_transform/README
@@ -2,39 +2,38 @@ xml_transform
OPTIONS:
HTML output:
- --html <xml> <ppm> <out_dir> : HTML output with non-text regions cropped into many png files.
- --html-base64 <xml> <out_dir> : HTML output from a container XML file.
+ --html input.xml image output.html Creates HTML file, images are embedded inside in base 64 format.
+ --html-base64 input.xml output.html Same as --html but input is a XML file with images encoded in base 64 inside.
+ --html-full input.xml image output_dir Creates HTML file without converting images in base 64. Images + HTML file are placed in output_dir.
PDF output:
- --pdf <xml> <ppm> <out_dir> : PDF output with non-text regions cropped into many png files.
- --pdf-no-crop <xml> <ppm> <out_dir>: PDF output with the entire picture displayed over the text.
- --pdf-base64 <xml> <out_dir> : PDF output from a container XML file.
- --pdf-base64-no-crop <xml> <ppm> <out_dir> : PDF with the entire picture displayed over the text, the picture is loaded from a container XML file.
+ --pdf input.xml image output.pdf Creates PDF file, images are embedded inside in base 64 format.
+ --pdf-base64 input.xml output.pdf Same as --pdf but input is a XML file with images encoded in base 64 inside.
-SVG output:
- --svg <xml> <out_dir> : SVG output (works only with base 64 xml encoded.
-
-Base 64 operations:
- --to-base64 <xml> <ppm> <out_xml> : Produces a container XML file by converting cropped pictures into base 64 format.
+SVG output (experimental, may not work with all files):
+ --svg input.xml image output.svg Creates SVG file, images are embedded inside in base 64 format.
+ --svg-base64 input.xml output.svg Same as --svg but input is a XML file with images encoded in base 64 inside.
OpenDocument output:
- --open <xml> <ppm> <out_dir> : OpenDocument output (odt, odf).
+ --oo-doc input.xml image output.odt Creates Open Document Writer (odt) file.
+ This is experimental, Open Office will warn you and ask you to repair the file which is corrupted, click on repair.
Base 64 operations:
- --to-base64 input.xml image output.xml Creates a container XML file. It will contain regions which are cropped and converted in base 64.
- --to-base64-no-crop input.xml image output.xml Same as --to-base64 but only the full picture will be converted, regions are not cropped
- --from-base64 input.xml output_dir Decodes a XML file which has been encoded in base 64, regions will be converted into png files and saved in output_dir.
+ --to-base64 input.xml image output.xmlc Creates a container XML file. It will contain regions which are cropped and converted in base 64.
+ --to-base64-no-crop input.xml image output.xmlc Same as --to-base64 but only the full picture will be converted, regions are not cropped
+ --from-base64 input.xml output_dir Decodes a XML file which has been encoded in base 64, regions will be converted into png files and saved in output_dir.
For PDF/HTML/SVG/OD output, Bourne shell scripts are provided to produce the outputs, just run sh *_generator.sh
Requirements:
PDF : fop >= 0.95
HTML : xsltproc
SVG : trunk version of fop
-OpenDocument : ooconvert
+OpenDocument : ooconvert (included) and OpenOffice >= 3.xx
+
BUILD:
-Chnage the environment variable QMAKE_CXXFLAGS in xml_transfrom.pro then
+Change the environment variable QMAKE_CXXFLAGS in xml_transfrom.pro then
mkdir _build
cd _build
diff --git a/scribo/sandbox/arthur/xml_transform/main.cc b/scribo/sandbox/arthur/xml_transform/main.cc
index 9c2b5ce..8489376 100644
--- a/scribo/sandbox/arthur/xml_transform/main.cc
+++ b/scribo/sandbox/arthur/xml_transform/main.cc
@@ -22,12 +22,15 @@ int main(int argc, char **argv)
"\t--to-base64 <xml> <ppm> <out_xml> : Produces a container XML file by converting cropped pictures into base 64 format.\n\n"
"OpenDocument output:\n"
- "\t--open <xml> <ppm> <out_dir> : OpenDocument output (odt, odf).\n\n"
+ "\t\033[01m--oo-doc\033[00m \033[04minput.xml\033[00m \033[04mimage\033[00m \033[04moutput.odt\033[00m"
+ "\t\t\tCreates Open Document Writer (odt) file.\n"
+ "\tThis is experimental, Open Office will warn you and ask you to repair the file which is corrupted, click on repair.\n\n"
+
"Base 64 operations:\n"
- "\t\033[01m--to-base64\033[00m \033[04minput.xml\033[00m \033[04mimage\033[00m \033[04moutput.xml\033[00m"
+ "\t\033[01m--to-base64\033[00m \033[04minput.xml\033[00m \033[04mimage\033[00m \033[04moutput.xmlc\033[00m"
"\t\t\tCreates a container XML file. It will contain regions which are cropped and converted in base 64.\n"
- "\t\033[01m--to-base64-no-crop\033[00m \033[04minput.xml\033[00m \033[04mimage\033[00m \033[04moutput.xml\033[00m"
+ "\t\033[01m--to-base64-no-crop\033[00m \033[04minput.xml\033[00m \033[04mimage\033[00m \033[04moutput.xmlc\033[00m"
"\t\tSame as --to-base64 but only the full picture will be converted, regions are not cropped\n"
"\t\033[01m--from-base64\033[00m \033[04minput.xml\033[00m \033[04moutput_dir\033[00m"
@@ -37,7 +40,7 @@ int main(int argc, char **argv)
"PDF : fop >= 0.95\n"
"HTML : xsltproc\n"
"SVG : trunk version of fop\n"
- "OpenDocument : ooconvert";
+ "OpenDocument : ooconvert (included) and OpenOffice >= 3.xx";
if (argc > 4)
{
--
1.5.6.5
* arthur/xml_transform/README
* arthur/xml_transform/main.cc
---
scribo/sandbox/ChangeLog | 7 +++++++
scribo/sandbox/arthur/xml_transform/README | 6 +++---
scribo/sandbox/arthur/xml_transform/main.cc | 13 +++++++++----
3 files changed, 19 insertions(+), 7 deletions(-)
diff --git a/scribo/sandbox/ChangeLog b/scribo/sandbox/ChangeLog
index 7f2e9a1..1a84b5f 100644
--- a/scribo/sandbox/ChangeLog
+++ b/scribo/sandbox/ChangeLog
@@ -1,3 +1,10 @@
+2010-08-06 Arthur Crepin-Leblond <crepin(a)lrde.epita.fr>
+
+ Fix man error.
+
+ * arthur/xml_transform/README
+ * arthur/xml_transform/main.cc
+
2010-08-05 Arthur Crepin-Leblond <crepin(a)lrde.epita.fr>
Output change in xml_tranform.
diff --git a/scribo/sandbox/arthur/xml_transform/README b/scribo/sandbox/arthur/xml_transform/README
index 9ac4973..cb04495 100644
--- a/scribo/sandbox/arthur/xml_transform/README
+++ b/scribo/sandbox/arthur/xml_transform/README
@@ -21,9 +21,9 @@ OpenDocument output:
--open <xml> <ppm> <out_dir> : OpenDocument output (odt, odf).
Base 64 operations:
- --to-base64 <xml> <ppm> <out_xml> : Produces a container XML file by converting cropped pictures into base 64 format.
- --to-base64-no-crop <xml> <ppm> <out_xml> : Same as to-base64 but only the picture is converted in base 64.
- --from-base64 <xml> <out_dir> : Decodes a XML container file to produce original image files.
+ --to-base64 input.xml image output.xml Creates a container XML file. It will contain regions which are cropped and converted in base 64.
+ --to-base64-no-crop input.xml image output.xml Same as --to-base64 but only the full picture will be converted, regions are not cropped
+ --from-base64 input.xml output_dir Decodes a XML file which has been encoded in base 64, regions will be converted into png files and saved in output_dir.
For PDF/HTML/SVG/OD output, Bourne shell scripts are provided to produce the outputs, just run sh *_generator.sh
Requirements:
diff --git a/scribo/sandbox/arthur/xml_transform/main.cc b/scribo/sandbox/arthur/xml_transform/main.cc
index 34a1b6e..9c2b5ce 100644
--- a/scribo/sandbox/arthur/xml_transform/main.cc
+++ b/scribo/sandbox/arthur/xml_transform/main.cc
@@ -24,10 +24,15 @@ int main(int argc, char **argv)
"OpenDocument output:\n"
"\t--open <xml> <ppm> <out_dir> : OpenDocument output (odt, odf).\n\n"
"Base 64 operations:\n"
- "\t--to-base64 <xml> <ppm> <out_xml> : Produces a container XML file by converting cropped pictures into base 64 format.\n"
- "\t--to-base64-no-crop <xml> <ppm> <out_xml> : Same as to-base64 but only the picture is converted in base 64.\n"
- "\t--from-base64 <xml> <out_dir> : Decodes a XML container file to produce original image files.\n\n"
- "For PDF/HTML/SVG/OD output, Bourne shell scripts are provided to produce the outputs, just run sh *_generator.sh \n"
+ "\t\033[01m--to-base64\033[00m \033[04minput.xml\033[00m \033[04mimage\033[00m \033[04moutput.xml\033[00m"
+ "\t\t\tCreates a container XML file. It will contain regions which are cropped and converted in base 64.\n"
+
+ "\t\033[01m--to-base64-no-crop\033[00m \033[04minput.xml\033[00m \033[04mimage\033[00m \033[04moutput.xml\033[00m"
+ "\t\tSame as --to-base64 but only the full picture will be converted, regions are not cropped\n"
+
+ "\t\033[01m--from-base64\033[00m \033[04minput.xml\033[00m \033[04moutput_dir\033[00m"
+ "\t\t\tDecodes a XML file which has been encoded in base 64, regions will be converted into png files and saved in output_dir.\n\n"
+
"Requirements:\n"
"PDF : fop >= 0.95\n"
"HTML : xsltproc\n"
--
1.5.6.5
* scribo/sandbox/arthur/xml_transform/README
* scribo/sandbox/arthur/xml_transform/image_crop.cc: Delete verbose mode.
* scribo/sandbox/arthur/xml_transform/main.cc: Small fix.
---
scribo/ChangeLog | 9 +++++++++
scribo/sandbox/arthur/xml_transform/README | 7 ++++++-
scribo/sandbox/arthur/xml_transform/image_crop.cc | 8 ++++----
scribo/sandbox/arthur/xml_transform/main.cc | 6 +++---
4 files changed, 22 insertions(+), 8 deletions(-)
diff --git a/scribo/ChangeLog b/scribo/ChangeLog
index ddd6a10..1462eb2 100644
--- a/scribo/ChangeLog
+++ b/scribo/ChangeLog
@@ -1,5 +1,14 @@
2010-07-21 Arthur Crepin-Leblond <crepin(a)ptaouchnok.lrde.epita.fr>
+ Small changes in xml_transform.
+
+ * scribo/sandbox/arthur/xml_transform/README
+
+ * scribo/sandbox/arthur/xml_transform/image_crop.cc: Delete verbose mode.
+ * scribo/sandbox/arthur/xml_transform/main.cc: Small fix.
+
+2010-07-21 Arthur Crepin-Leblond <crepin(a)ptaouchnok.lrde.epita.fr>
+
Files headers change + base64 data hide in xml tree.
* scribo/demo/viewer/README,
diff --git a/scribo/sandbox/arthur/xml_transform/README b/scribo/sandbox/arthur/xml_transform/README
index 1f358e3..aedf220 100644
--- a/scribo/sandbox/arthur/xml_transform/README
+++ b/scribo/sandbox/arthur/xml_transform/README
@@ -21,4 +21,9 @@ Base 64 operations:
BUILD:
-Chnage the environment variable QMAKE_CXXFLAGS to indicate the correct paths to milena and olena in the .pro file then, just type qmake and make.
\ No newline at end of file
+Chnage the environment variable QMAKE_CXXFLAGS in xml_transfrom.pro then
+
+mkdir _build
+cd _build
+qmake ../xml_transfrom.pro
+make
\ No newline at end of file
diff --git a/scribo/sandbox/arthur/xml_transform/image_crop.cc b/scribo/sandbox/arthur/xml_transform/image_crop.cc
index 8aafe45..ffe2b44 100644
--- a/scribo/sandbox/arthur/xml_transform/image_crop.cc
+++ b/scribo/sandbox/arthur/xml_transform/image_crop.cc
@@ -61,10 +61,10 @@ void ImageCrop::save_image(QString file)
else
filename = file;
- std::cout << "Saving " << image_.toStdString() << " to "
- << output_dir_.toStdString() << "img/"
- << filename.toStdString() << ".png"
- << std::endl;
+ // std::cout << "Saving " << image_.toStdString() << " to "
+ // << output_dir_.toStdString() << "img/"
+ // << filename.toStdString() << ".png"
+ // << std::endl;
io::magick::save(ima, output_dir_.toStdString() + "img/" + filename.toStdString() + ".png");
}
diff --git a/scribo/sandbox/arthur/xml_transform/main.cc b/scribo/sandbox/arthur/xml_transform/main.cc
index e097430..c259c76 100644
--- a/scribo/sandbox/arthur/xml_transform/main.cc
+++ b/scribo/sandbox/arthur/xml_transform/main.cc
@@ -9,15 +9,15 @@ int main(int argc, char **argv)
man = "xml_transform\n";
man += "OPTIONS:\n\n";
man += "HTML output:\n";
- man += "\t--html <xml> <ppm> <out_dir> : HTML output with non-text regions croped into many png files.\n";
+ man += "\t--html <xml> <ppm> <out_dir> : HTML output with non-text regions cropped into many png files.\n";
man += "\t--html-base64 <xml> <out_dir> : HTML output from a container XML file.\n\n";
man += "PDF output:\n";
- man += "\t--pdf <xml> <ppm> <out_dir> : PDF output with non-text regions croped into many png files.\n";
+ man += "\t--pdf <xml> <ppm> <out_dir> : PDF output with non-text regions cropped into many png files.\n";
man += "\t--pdf-no-crop <xml> <ppm> <out_dir>: PDF output with the entire picture displayed over the text.\n";
man += "\t--pdf-base64 <xml> <out_dir> : PDF output from a container XML file.\n";
man += "\t--pdf-base64-no-crop <xml> <ppm> <out_dir> : PDF with the entire picture displayed over the text, the picture is loaded from a container XML file.\n\n";
man += "Base 64 operations:\n";
- man += "\t--to-base64 <xml> <ppm> <out_xml> : Produces a container XML file by converting croped pictures into base 64 format.\n";
+ man += "\t--to-base64 <xml> <ppm> <out_xml> : Produces a container XML file by converting cropped pictures into base 64 format.\n";
man += "\t--to-base64-no-crop <xml> <ppm> <out_xml> : Same as to-base64 but only the picture is converted in base 64.\n";
man += "\t--from-base64 <xml> <out_dir> : Decodes a XML container file to produce original image files.\n";
--
1.5.6.5