3 # xml_export - Retrieve data from the SF.net XML export for project data
5 # Copyright (C) 2002 Open Source Development Network, Inc. ("OSDN")
7 # Permission is hereby granted, free of charge, to any person obtaining a
8 # copy of this software and associated documentation files (the "Software"),
9 # to deal in the Software without restriction, including without limitation
10 # the rights to use, copy, modify, merge, publish, distribute, sublicense,
11 # and/or sell copies of the Software, and to permit persons to whom the
12 # Software is furnished to do so, subject to the license details found
13 # below in the section marked "$LICENSE_TEXT".
15 # SCons: modified the following RCS Id line so it won't expand during
18 # $_Id: adocman,v 1.51 2002/06/07 18:56:35 moorman Exp _$
20 # Written by Nate Oostendorp <oostendo@sourceforge.net>
21 # and Jacob Moorman <moorman@sourceforge.net>
22 ###########################################################################
25 use Alexandria
::Client
;
26 use HTTP
::Request
::Common
;
27 my $client = new Alexandria
::Client
;
29 util_verifyvariables
("groupid");
31 my $res = $ua->simple_request(GET
"$config{hosturl}/export/xml_export.php?group_id=$config{groupid}");
33 if (not $res->is_success()) {
34 die "Failed to connect: ".$res->as_string();
38 ###########################################################################
43 xml_export - Retrieve data for a project via the SF.net XML export facility
47 B<This program> provides a simple mechanism to download data from the
48 XML data export facility on SourceForge.net. This utility is needed
49 (in place of a downloader like wget or curl) since authentication by
50 a project administrator is required to access the XML export facility.
54 xml_export [options] > output_file
57 --login Login to the SourceForge.net site
58 --logout Logout of the SourceForge.net site
59 --groupid=GROUPID Group ID of the project whose data you wish to export
63 The following error levels are returned upon exit of this program:
67 1 failure: general (requested DocManager operation failed)
69 2 failure: authentication failure
71 3 failure: must --login before performing this operation
73 4 failure: bad command-line option specified or variable setting problem
75 5 failure: error in accessing/creating a file or directory
77 6 failure: failed to enter requested input before timeout expired
79 =head1 AUTHORITATIVE SOURCE
81 The original version of B<this program> may be found in the materials
82 provided from the SourceForge.net Site Documentation project (sitedocs)
83 on the SourceForge.net site. The latest version of this program
84 may be found in the CVS repository for the sitedocs project on
85 SourceForge.net. The sitedocs project pages may be accessed at:
86 http://sourceforge.net/projects/sitedocs
90 For security-related information for this application, please review
91 the documentation provided for the adocman utility.
95 The following are examples for using this program to export project
96 data via the XML data export facility on SourceForge.net. It is presumed
97 that you have a valid SourceForge.net user account, which is listed as
98 a project administrator on the project in question. This tool will
99 only work for project administrators. The group ID for the project
100 may be derived from the URL for the Admin page for the project, or by
101 viewing the Project Admin page for the project (look for the text
102 "Your Group ID is: xxxxxx").
104 To login to the SourceForge.net site via the command-line:
106 adocman --username=myusername --password=mypassword --login \
109 To login to the SourceForge.net site, and be prompted to enter your
110 password interactively:
112 adocman --username=myusername --interactive --login --groupid=8675309
114 To perform an export (after logging-in):
116 xml_export --groupid=8675309 > output.xml
118 To logout of SourceForge.net:
122 Additional capabilities (including the use of configuration files to
123 specify information that would otherwise be provided interactively
124 or on the command-line) are detailed in the documentation provided for
127 To obtain output for debugging a problem, perform the same command
128 as originally tested, but first add the --verbose flag, and determine
129 whether you are able to solve the issue on your own. If the problem
130 persists, see the "SUPPORT AND BUGS" section, below.
132 =head1 SUPPORT AND BUGS
134 This program was written by a member of the SourceForge.net staff
135 team. This software has been released under an Open Source license,
136 for the greater benefit of the SourceForge.net developer community.
138 The SourceForge.net Site Documentation project is the caretaker of
139 this software. Issues related to the use of this program, or bugs
140 found in using this program, may be reported to the SourceForge.net
141 Site Documentation project using their Support Request Tracker at:
142 https://sourceforge.net/tracker/?func=add&group_id=52614&atid=467457
144 Any support that is provided for this program is provided as to
145 further enhance the stability and functionality of this program
146 for SourceForge.net users. The SourceForge.net Site Documentation
147 project makes use of this software for its own internal purposes,
148 in managing the Site Documentation collection for the SourceForge.net
153 Nathan Oostendorp <oostendo@sourceforge.net> and
154 Jacob Moorman <moorman@sourceforge.net>
158 C<LWP::UserAgent>, C<HTML::TokeParser>, C<Crypt::SSLeay>, C<Digest::MD5>,
161 These prerequisites may be installed in an interactive, but automated
162 fashion through the use of perl's CPAN module, invoked as:
164 perl -MCPAN -e shell;
168 Copyright (c) 2002 Open Source Development Network, Inc. ("OSDN")
170 Permission is hereby granted, free of charge, to any person obtaining a
171 copy of this software and associated documentation files (the "Software"),
172 to deal in the Software without restriction, including without limitation
173 the rights to use, copy, modify, merge, publish, distribute, sublicense,
174 and/or sell copies of the Software, and to permit persons to whom the
175 Software is furnished to do so, subject to the following conditions:
177 1. The above copyright notice and this permission notice shall be included
178 in all copies or substantial portions of the Software.
180 2. Neither the names of VA Software Corporation, OSDN, SourceForge.net,
181 the SourceForge.net Site Documentation project, nor the names of its
182 contributors may be used to endorse or promote products derived from
183 the Software without specific prior written permission of OSDN.
185 3. The name and trademarks of copyright holders may NOT be used in
186 advertising or publicity pertaining to the Software without specific,
187 written prior permission. Title to copyright in the Software and
188 any associated documentation will at all times remain with copyright
191 4. If any files are modified, you must cause the modified files to carry
192 prominent notices stating that you changed the files and the date of
193 any change. We recommend that you provide URLs to the location from which
196 5. Altered versions of the Software must be plainly marked as such, and
197 must not be misrepresented as being the original Software.
199 6. The origin of the Software must not be misrepresented; you must not
200 claim that you wrote the original Software. If you use the Software in a
201 product, an acknowledgment in the product documentation would be
202 appreciated but is not required.
204 7. The data files supplied as input to, or produced as output from,
205 the programs of the Software do not automatically fall under the
206 copyright of the Software, but belong to whomever generated them, and may
207 be sold commercially, and may be aggregated with the Software.
209 8. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
210 EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
211 MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
212 IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
213 CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
214 TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
215 SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE OR DOCUMENTATION.
217 This Software consists of contributions made by OSDN and many individuals
218 on behalf of OSDN. Specific attributions are listed in the accompanying
223 B<2002-12-03> Completed version 0.10 - move to classes, added POD