Some idea

Asked by Kuzemko Aleksandr on 2008-08-24

I have some idea, that I think, help recognise many files in one directory.
I propose make output file name as "image_file_name+extension"
=== modified file 'cuneiform_src/Kern/cuneiform-cli.cpp'
--- cuneiform_src/Kern/cuneiform-cli.cpp 2008-08-22 13:58:24 +0000
+++ cuneiform_src/Kern/cuneiform-cli.cpp 2008-08-24 14:14:17 +0000
@@ -162,7 +162,9 @@
     Bool32 dotmatrix = FALSE;
     Bool32 fax = FALSE;
     const char *defaulttextname = "cuneiform-out.txt";
+ const char *text_extension=".txt";
     const char *defaulthtmlname = "cuneiform-out.html";
+ const char *html_extension=".html";
     const char *outfilename = NULL;
     Int32 outputformat = PUMA_TOTEXT;

@@ -202,6 +204,13 @@
         } else {
         /* No switches, so set input file. */
         infilename = argv[i];
+ /* */
+ char* s = new char[250];
+ strcat(s,infilename);
+ if (outputformat==PUMA_TOHTML)
+ strcat(s,html_extension);
+ else strcat(s,text_extension);
+ outfilename=s;

Question information

English Edit question
Cuneiform for Linux Edit question
No assignee Edit question
Last query:
Last reply:
Alex Samorukov (samm-os2) said : #1

As for me it`s better than to substitute default filename. but there is another question - it is possible (in engine, not in cli now) to recognize more than one page and use "add" flag in the output. As far as i could see this is supported even on rtf/html output and allows to make batch tasks. May be later i will try to patch cli to allow usage of more than one filename to recognize, or even to recognize multipage tiff/pdf/ps files (via ImageMagick).

Jussi Pakkanen (jpakkane) said : #2

This is basically an ok request. However what you want to accomplish is extremely easy to do with some shell scripting. This combined with a lack of time means that this feature is probably not going to appear very soon.