Page 1 of 7
Automatic import
PostPosted:Mon Feb 21, 2011 8:41 pm
by snowman
Hello,
I have not yet found an option to automatically import documents into openkm. Is this possible?
I would like to put PDF documents in a directory on the server and get them automatically imported into openKM.
Best regards,
Snowman
Re: Automatic import
PostPosted:Tue Feb 22, 2011 7:28 am
by jllort
You've not read administration guide documentation
http://wiki.openkm.com/index.php/Administration_Guide there's a section talking about import / export
Re: Automatic import
PostPosted:Tue Feb 22, 2011 6:55 pm
by mhamlett
i have read and implementted your approach to import of documents and it works as described.
i setup an input folder, put documents in it, click the send button and the docs go into the system.
however, how do you do this automatically and control the folders the documents import into? i want to put document(s) into a windows file folder, the repository input should then automatically sync the documents in this folder to the corresponding document folder in the system, for example every 15 minutes.
for example, i should be able to create multiple folders in the system such as SalesReports,ExpenseReports,Budgets. then create folders on file windows file system by the same name. then every X minutes the SalesReports folder docs sync to the same folder in the system.
is this possible or maybe a future enhancement. it does me no good to auto import documents into the same folder everytime. i have to organize the information by folders for security and subscription purposes. i also have 1000s of documents. the documents that have not changed should be skipped.
thx
Re: Automatic import
PostPosted:Tue Feb 22, 2011 7:01 pm
by mhamlett
during the repository import, it said the document already existed. what if i am trying to overlay an existing document with a new version? how does the import work?
Re: Automatic import
PostPosted:Tue Feb 22, 2011 10:16 pm
by snowman
@jllort: sorry to disagree. But I do not want a one-time import of a structure. I want to let openkm check a specific folder every n minutes and automatically import all files in it. I wouldbe thankful if you could point me to the according section in the manual.
Otherwise, I would also be happy to import a file using a script, if that is possible. Then I would cron job the a wrapper script to to check my folder.
Best regards,
Tobias
Re: Automatic import
PostPosted:Wed Feb 23, 2011 9:56 pm
by jllort
You're not on import scenario you're on syncronizing one. Then want you need is connecting OpenKM as network resource, and use the typical sync application to some folder to adding or deleting folders or documents. Depending if you're on windows or linux are several options ( programs for doing it ). The idea is synchronizing two folders ( some folder structure ), that can be bi-directional or only one-directional ( depending software capabilities ).
That's not a future OpenKM enhancement because it's only some kind of configuration with thirdparty application ( it could be free or payment )
Re: Automatic import
PostPosted:Wed Feb 23, 2011 11:24 pm
by snowman
Hello jllort,
i dont know if I get your point. Especially, I do not understand what you mean by synchronizing. There are not two folder structures (one in openkm and the in file system) to sync. I just want to put a PDF into openKM without user interaction. If I understand the second part of your answer, then I guess there is an API that I could use to import - in my terms - over a network connection by mimicking the file uploader? Could you point to a program, an example or a script that can do this or the API documentation?
Thank you very much
Re: Automatic import
PostPosted:Thu Feb 24, 2011 6:35 am
by joako
This is also what I am looking for. I do not need two way sync, but the ability to have a "watch folder" or "hot folder" where new files added in a directory are imported into OpenKM automatically and then perhaps deleted.
It seems what snowman wants is multiple "hot folders" each one is mapped to be an input to a particular folder within OpenKM. I would also desire such a feature, for e.g. a fax might not be handled the same way as an e-mail.
Re: Automatic import
PostPosted:Thu Feb 24, 2011 7:08 am
by snowman
Hello joako,
exactly. What I need is a hot folder. But a single one would be enough for me. Your suggestion would be even better to differentiate document types.
Either as a feature of the scheduler (?) OR a program/script to put a file into openKM like :
>importkm.sh -s myserver -d where_to_put_it -u username -p pass myfile.pdf
The latter would solve all my problems

Re: Automatic import
PostPosted:Thu Feb 24, 2011 9:05 am
by jllort
You want some folder ( folders ) on your personal computer be synhronized in only one direction ( from your computer to OpenKM ) and then delete the contents of your local folder. It's that ?
Re: Automatic import
PostPosted:Thu Feb 24, 2011 9:19 am
by pavila
OpenKM has its API exposed via web services. Is relatively easy to implement a client which make this job. The program will run as a scheduled task and will import only the new documents, isn't it? If you want we can make the development for you.
Re: Automatic import
PostPosted:Fri Feb 25, 2011 3:25 am
by joako
It seems right now to work around the situation some sort of script that triggers the repository import and then rm the source files would be fine. Because if the source files remain if we rename or move files in OpenKM from the defaults location it will import that file again -- it seems the checks are only against the filename.
Re: Automatic import
PostPosted:Mon Feb 28, 2011 10:10 am
by pavila
In a near future we expect to release a client tool which can make what you need: define a local hot folder where every file in dropped, will be uploaded to OpenKM. Also will take care of local file modifications. This is the main requirement, isn't it?
Re: Automatic import
PostPosted:Tue Mar 01, 2011 12:13 am
by joako
pavila wrote:OpenKM has its API exposed via web services. Is relatively easy to implement a client which make this job. The program will run as a scheduled task and will import only the new documents, isn't it? If you want we can make the development for you.
Is what you talk about here of the API the same thing you are considering in your next post?
pavila wrote:In a near future we expect to release a client tool which can make what you need: define a local hot folder where every file in dropped, will be uploaded to OpenKM. Also will take care of local file modifications. This is the main requirement, isn't it?
My requirement would be closer to something that runs on the server monitoring certain folder(s) instead of an application that runs apart from the server. Even if we are processing the PDFs with OCR or something on another server I like doing NFS and that sort of arrangement. Is this something that your development is capable of?
Re: Automatic import
PostPosted:Tue Mar 01, 2011 8:17 pm
by pavila
joako wrote:Is what you talk about here of the API the same thing you are considering in your next post?
The solution will be implemented using these API.
joako wrote:My requirement would be closer to something that runs on the server monitoring certain folder(s) instead of an application that runs apart from the server. Even if we are processing the PDFs with OCR or something on another server I like doing NFS and that sort of arrangement. Is this something that your development is capable of?
This scenario is easier for me. In this case I can implement a plugin which can be scheduled within OpenKM using the CronTab. So, all the files in a predefined server path have to be imported into OpenKM and deleted after this?