Tags:
create new tag
view all tags

Question

We are using TWiki as a database for several applications. I've set up a number of status pages that use SEARCH and the spreadsheet plugin to generate current statistics/etc. What I'd like is to be able to archive search results periodically so that an auditor can go back and see project status at various points. Any ideas on a slick way to do this?

  • TWiki version: 01 Dec 2001
  • Web server: Apache
  • Server OS: Linux
  • Web browser: Mostly IE
  • Client OS: NT, Solaris, Linux

-- DaveAlsup - 12 Jun 2002

Answer

(My solution might be not the most elegant, but requires no coding. So here it goes:)

What about manually generating search page, saving it locally as HTML page, and then upload it as attachment? Like I did in Sandbox.QueryHistory.

Warning: you probably need to think about naming conventions for files you will upload (better than I did wink ), and how to spread them accross TWiki pages. Issues like how long you want to keep a copy of query in history and how to discard it when not needed...

-- PeterMasiar - 13 Jun 2002

That will work, I guess that I had myself wrapped around the server-side axle smile My fear is that it won't always be done, but with a client-side script using something like wget I suppose that I can dependably generate the pages, then all I have to do is remember to upload them at some point.

-- DaveAlsup - 13 Jun 2002

At work we have a TWiki-based test tracking results database that has statistical data updated automatically. This requires some programming. Here is the pseudo code of the script that is called once a day by a cron job:

  • Read the web.topic specified in command line argument. (TWiki::Store::readTopic)
  • Make sure that the topic has the format we expect, else exit.
    • Assuming the the topic has a Table 1 showing the latest statistical data we want to save, and also a Table 2 with historical data which needs to be updated.
  • Expand the common variables to a temporary space (this will activate the embedded SEARCH and CALC), thus generate the latest stats we need in Table 1. (TWiki::Func::expandCommonVariables)
  • Extract latest stats data from the temporary space.
  • Append new row to Table 2
  • Save the web.topic specified in command line argument. (TWiki::Store::saveTopic)

The plugin API is not sufficient to do that, you need to use undocumented TWiki::Store functions. The EditTablePlugin is an example app that reads and saves a topic.

-- PeterThoeny - 13 Jun 2002

Thanks, I'll take a stab at it.

-- DaveAlsup - 13 Jun 2002

Edit | Attach | Watch | Print version | History: r5 < r4 < r3 < r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r5 - 2002-06-13 - DaveAlsup
 
  • 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-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.