Page 4 of 7
Re: Automatic import
PostPosted:Sun May 08, 2011 10:31 am
by jllort
I would like to see the errors when you upload from web UI
Re: Automatic import
PostPosted:Mon May 09, 2011 11:01 pm
by joako
My issue is how to run OpenKM as service in MacOS Server? Right now I add /opt/openkm/bin/run.sh to launch daemon but when I attempt to stop the repository becomes corrupt. I restored a backup and after I try to start/stop OpenKM I am faced with the issue again.
Re: Automatic import
PostPosted:Wed May 11, 2011 5:37 am
by jllort
To shutdown the service the command must be ./bin/shutdown.sh -s jnp://localhost:1099
You must investigate how start stop services on mac ... because I'm not and expert on that OS.
I would like you try start stop service using terminal and tell me if repository is corrupted too, and why are you sure repository is corrupted ... because major times openkm is not stopped correctly repository not becomes corrupted but for what you telling in your case happens always ... than seems very strange.
Re: Automatic import
PostPosted:Fri May 13, 2011 8:27 am
by joako
until now I run openkm as:
nohup bin/run.sh &
no issues. To stop I ps aux | grep java and kill <PID> and nohup.out shows a clean shutdown.
But when I setup launchd with /opt/openkm/bin/run.sh it has issues shutting down.
Re: Automatic import
PostPosted:Sat May 14, 2011 3:40 pm
by jllort
I suggest you looking for "install jboss as service on mac" on google or post there the problems you've got.
Only for your information the next OpenKM version will coming only with tomcat or jboss ( probably will got two bundle )
Re: Automatic import
PostPosted:Mon May 16, 2011 5:46 am
by joako
So the next version (5.2?) we will need to install our own jboss?
Anyways not much development on the MacOS side, but in terms of the importer script I am trying to go live with OpenKM this week. I have it installed on another server using Scientific Linux 6 on VMWare ESXi.
I haven't forgot my promise, just fixed some bug in the script and these week I will post after it's imported a few thousand files. I'll also show the details how I OCR non-tiff files (create searchable PDF)
Re: Automatic import
PostPosted:Mon May 16, 2011 8:20 am
by pavila
In future OpenKM version, the "downloadable" bundle will become "Tomcat + OpenKM" replacing the "JBoss + OpenKM" because it is more simple to setup and configure. But OpenKM will be able to run on JBoss also.
Re: Automatic import under Windows
PostPosted:Mon May 16, 2011 11:16 am
by ocaselvaggia
Hi
the feature of Automatic import in a OpenKM folder it's just what i need to complete an automatic upload flow job as i planned to do:
Scan in TIF format (300 dpi) to a folder ---> this folder watched by a running OmniPage wich OCR and converts to pdf searcheable format and send it to a folder in the computer where OpenKM it's running....
(I found that OmniPage PRO, for a reasonable price, it gives very good results!)
At this point an autoimport task (registered in a crontab) feeding the OpenKM database would automate the stream SCANNER ---> OpenKM!
But the crontab (in the administration section) permit only to launch a task with BSH (or jar) wich it's suppose to be a Linux job; how to make the autoimport feature under windows?
Thank you for any suggestion
Re: Automatic import
PostPosted:Mon May 16, 2011 2:13 pm
by jllort
here you've got two solutions:
1- mapping openkm as network using webdav
2- create a simply windows client and upload files with webservices
Re: Automatic import
PostPosted:Tue May 17, 2011 4:26 am
by joako
The script provided above is PHP. You can write something in Windows scripting that will import the files from a directory and then you can use "Scheduled Tasks" to run it frequently.
I found a Linux based solution that does the same as yours. Have a look:
http://watchocr.com/
Re: Automatic import
PostPosted:Fri May 20, 2011 9:00 pm
by joako
So now the issue is with the OCR engine.
If only the OpenKM OCR could work. Using 5.1.3 now on Linux I still don't get OCR on even the .tiff files. Too bad there isn't a way to debug this.
Re: Automatic import
PostPosted:Sat May 21, 2011 6:40 am
by jllort
Please joako ... post OCR problem in other to post, because this is too much long and must not be talking of several question on same place.
Re: Automatic import
PostPosted:Wed Jul 06, 2011 7:08 am
by loolik
Sorry for a stupid question, but how use the script for automatically import? If you can, please, give detail instruction! Thanks.
Re: Automatic import
PostPosted:Mon Jul 11, 2011 9:31 pm
by ocaselvaggia
Hi
i wish to show my approach for autoimport, working with a net scanner and addressing all scanned documents stright to a directory in the server where OpenKM is running:
It's based on this simple php script (i've just modified others script from this thread) that can be customized to automatically import every file found in a given directory. Under windows can be launched in a scheduled task how often you like.
Any improvement it's wellcome!
autoimport.php
Code: Select all<?php
$okmurl="http://localhost:8080/OpenKM/";
$okmid="autoImport";
$okmpw="upload";
$OKMAuth = new SoapClient($okmurl."OKMAuth?wsdl");
$OKMDocument = new SoapClient($okmurl."OKMDocument?wsdl");
// Login
$token = $OKMAuth->login($okmid, $okmpw);
foreach (glob("/converted/*.pdf") as $filename) {
echo "$filename size " . filesize($filename) . '<br />';
// open file and encode if necessary
$handle = fopen($filename,'rb');
$file_content = fread($handle,filesize($filename));
fclose($handle);
$encoded = base64_encode($file_content);
$filename1 = substr($filename,12);
echo "$filename1" . '<br />';
$OKMDocument->createSimple($token,"/okm:root/imported/".$filename1,$file_content);
//delete the file uoloaded
unlink("c:/converted/".$filename1);
}
// Logout
$OKMAuth->logout($token);
?>
Re: Automatic import
PostPosted:Tue Jul 12, 2011 2:29 pm
by jllort
ocaselvaggia can share the script on wiki ? could be useful to other users