Displaying 4 results from an estimated 4 matches for "shell_protect".
2008 Jul 30
3
Dealing with image PDF's
...aying around and added a bit of code to omindex.cc so I
could ocr tiff and tif with gocr which seems to work. Here's what it
looks like:
// Tiff:
} else if (startswith(mimetype, "image/tif"))
{
// Inspired by http://mjr.towers.org.uk/comp/sxw2text
string safefile = shell_protect(file);
string cmd = "tifftopnm " + safefile + " | gocr -f UTF8 -";
try {
dump = stdout_to_string(cmd);
} catch (ReadError) {
cout << "\"" << cmd << "\" failed - skipping\n";
return;
}
//...
2008 Jul 30
3
Dealing with image PDF's
...aying around and added a bit of code to omindex.cc so I
could ocr tiff and tif with gocr which seems to work. Here's what it
looks like:
// Tiff:
} else if (startswith(mimetype, "image/tif"))
{
// Inspired by http://mjr.towers.org.uk/comp/sxw2text
string safefile = shell_protect(file);
string cmd = "tifftopnm " + safefile + " | gocr -f UTF8 -";
try {
dump = stdout_to_string(cmd);
} catch (ReadError) {
cout << "\"" << cmd << "\" failed - skipping\n";
return;
}
//...
2009 Feb 02
2
Ticket #282: omindex-assorted-enhancements.patch woes
...************
*** 397,406 ****
} else if (mimetype == "text/rtf") {
// The --text option unhelpfully converts all non-ASCII characters to
// "?" so we use --html instead, which produces HTML entities.
- string cmd = "unrtf --nopict --html 2>/dev/null " +
shell_protect(file);
MyHtmlParser p;
try {
- p.parse_html(stdout_to_string(cmd));
} catch (ReadError) {
cout << "\"" << cmd << "\" failed - skipping\n";
return;
--- 426,435 ----
} else if (mimetype == "text/rtf") {
//...
2009 Feb 03
1
PowerPoint 2007 filter
...out that also extracts notes
and comments from the powerpoint file.
// Start: PowerPoint 2007 .pptx
} else if (startswith(mimetype,
"application/vnd.openxmlformats-officedocument.presentationml."))
{
// Inspired by http://mjr.towers.org.uk/comp/sxw2text
string safefile = shell_protect(file);
/* string cmd = "unzip -p " + safefile + " ppt/slides/slide*.xml
ppt/notesSlides/notesSlide*.xml ppt/comments/comment*.xml"; */
string cmd = "unzip -p " + safefile + " ppt/slides/slide*.xml";
try {
XmlParser xmlparser;
xm...