When you need to run a saved Project Tracker query or report repeatedly, you can write a shell script.
You can do this, using the wget utility to automate the process of running the query or report and exporting it to a spreadsheet format, from which it can be easily extracted for analysis by an external tool, such as a spreadsheet.
Wget is a network utility to retrieve files from the Web using http and ftp, the two most widely used Internet protocols. It works non-interactively, so it will work in the background, after having logged off. For more information about wget, see the wget Web site.
Note: To use this example code, you must have wget 1.10 or later installed locally. You will also need a working knowledge of Project Tracker, HTML, HTTP, and shell scripting.
Note: If you are using RedHat 9, please note the
wget binary shipped with RedHat 9 is known to have problems with client certificates.
To create a script, follow these steps:
Note: The string follows the pattern
<a href="[URL]">[query name]</a>. Copy only the
[URL] portion of the string to use in your script.
wget --save-cookies /tmp/cookies --keep-session-cookies '[domain name]/servlets/TLogin?Login=Login&loginID=[username]&password=[password]'
--no-check-certificateoption to bypass the certificate check. Use this option only if you have some other way to determine the authenticity of the server. For help using wget with SSL, see the wget documentation.
wget -O [filename] --load-cookies /tmp/cookies 'http://[project name].[domain name]/[URL]'
Note: Although the example commands above are specific to wget, you can use any scripting or programming language to script Project Tracker to export data. The sequence of operations remains the same for any scripting or programming language you would use to drive an export.