• Automatic import

  • We tried to make OpenKM as intuitive as possible, but an advice is always welcome.
We tried to make OpenKM as intuitive as possible, but an advice is always welcome.
Forum rules: Please, before asking something see the documentation wiki or use the search feature of the forum. And remember we don't have a crystal ball or mental readers, so if you post about an issue tell us which OpenKM are you using and also the browser and operating system version. For more info read How to Report Bugs Effectively.
 #10947  by jllort
 
I would like to see the errors when you upload from web UI
 #10953  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.
 #10967  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.
 #10981  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.
 #10995  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 )
 #11010  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)
 #11018  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.
 #11020  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
 #11026  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
 #11031  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/
 #11078  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.
 #11089  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.
 #11481  by loolik
 
Sorry for a stupid question, but how use the script for automatically import? If you can, please, give detail instruction! Thanks.
 #11519  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);
?>
 #11529  by jllort
 
ocaselvaggia can share the script on wiki ? could be useful to other users
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7

About Us

OpenKM is part of the management software. A management software is a program that facilitates the accomplishment of administrative tasks. OpenKM is a document management system that allows you to manage business content and workflow in a more efficient way. Document managers guarantee data protection by establishing information security for business content.