create new tag
, view all tags

Import of Topics created by other applications

I'm using some applications that are able to create TWiki code (e.g. Freemind) and our company has developed a software which is able to create output for several wiki systems including TWiki (which we use in our company). It creates full featured topics including Actions from the action tracker, backlinks to other application etc.

I was wondering what would be the best way to bring those externally created TWiki topics into TWiki without spoiling consistency and security.

My first idea was to put those topics into an transfer directory (e.g. via FTP) and create a CRON job and a script that imports them into TWiki.

The functionlity would be similar to the MailInContrib or the installer script. Some customization should be possible e.g. specify source directories for different webs. Attachments would also be an interesting aspect.

I'm not sure if that idea of using a transfer directory is really the best way. Of course as an application programmer I also prefer API-Functions which i can call directly from another application but I do not know if the TWiki API offers such functionalities.

Any ideas anybody?

-- MichaelGulitz - 2010-04-29

There are many ways to integrate TWiki with the world, see diagram of TWikiPresentation2010x02x25.

A low hanging fruit approach is to dump content in an htdoc enabled directory and INCLUDE that in a TWiki page as seen in Sandbox.IncludeFilesAsURL. Note that you will not get version control, e.g. once external content is gone it's gone.

Another way is to push content via http. See CurlTool, WwwMechanize.

Look also into creating a plugin using TWikiScripts#rest

To learn from other people how to push content into TWiki see other Extensions:import. Personally I created and use UploadToTWikiAddOn.

-- PeterThoeny - 2010-04-29

I have now created a plugin with some REST handler functions that allow our JAVA-Application to update topic form fields in TWiki. The function works fine so far but it lacks proper error handling and I'm sure the code can be improved. I'd be glad if someone could give me some hints.

I attached the code to this topic. I am not using the SVN yet because I am still experimenting a lot and things are still changing a lot and I did not have the time to create a proper development area.

-- MichaelGulitz - 2010-09-28

Thanks for sharing Michael! Please consider packaging this as a plugin, upload to twiki.org to share with the TWiki community. More at ReadmeFirst.

-- PeterThoeny - 2010-09-28

Topic attachments
I Attachment History Action Size Date Who Comment
Texttxt updateformfield.txt r1 manage 1.8 K 2010-09-28 - 08:16 MichaelGulitz REST function for changing a topic form field
Edit | Attach | Watch | Print version | History: r4 < r3 < r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r4 - 2010-09-28 - PeterThoeny
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2017 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.