# Authors: Vincent Untz <*****@*****.**> # from libdissector import config from libdissector import libhttp if config.cgitb: import cgitb; cgitb.enable() ####################################################################### libhttp.print_html_header() libhttp.print_header("Our playground for openSUSE") print ''' <h2>Our playground for openSUSE</h2> <p>If you're simply interested in browsing the openSUSE source, head to the <a href="http://build.opensuse.org/">openSUSE instance</a> of the <a href="http://open-build-service.org/">Open Build Service</a>! No need to login, just browse the packages; the most interesting projects are the ones starting with "openSUSE:", like <a href="https://build.opensuse.org/project/show?project=openSUSE%3AFactory">openSUSE:Factory</a>.</p> <p>The original idea behind this playground was to analyze the packages of the GNOME team to know what kind of work is needed, but it has evolved and it's now a good place to get some data about all packages in openSUSE.</a> <p>This playground also hosts a service that makes it easier to collaborate within the openSUSE community, via <a href="http://en.opensuse.org/openSUSE:Osc_Collab">osc collab</a>. This service works for all packages part of <a href="https://build.opensuse.org/project/show?project=openSUSE%3AFactory">openSUSE:Factory</a>!</p> <p>On the right side, you can find a few links that are, hopefully, self-explanatory :-)</p> ''' libhttp.print_foot()
row += '<td>%s</td>' % version_cell row += '</tr>' s += row s += '\n' s += '</table>\n' return s ####################################################################### form = cgi.FieldStorage() only_missing_upstream = libhttp.get_arg_bool(form, 'missing-upstream', False) only_missing_parent = libhttp.get_arg_bool(form, 'missing-parent', False) libhttp.print_html_header() project = libhttp.get_project(form) table = get_table_for_project(project, only_missing_upstream, only_missing_parent) libhttp.print_header('Versions of packages in the Build Service for project %s' % escape(project)) print libdbhtml.get_project_selector(current_project = project) print table libhttp.print_foot(additional_box = get_legend_box())
s += row s += '\n' s += '</table>\n' return s ####################################################################### form = cgi.FieldStorage() only_missing_upstream = libhttp.get_arg_bool(form, 'missing-upstream', False) only_missing_parent = libhttp.get_arg_bool(form, 'missing-parent', False) libhttp.print_html_header() project = libhttp.get_project(form) table = get_table_for_project(project, only_missing_upstream, only_missing_parent) libhttp.print_header( 'Versions of packages in the Build Service for project %s' % escape(project)) print libdbhtml.get_project_selector(current_project=project) print table libhttp.print_foot(additional_box=get_legend_box())
if srcpackage: return get_package(db, project, srcpackage, tag) else: return get_project(db, project, tag) ####################################################################### form = cgi.FieldStorage() libhttp.print_html_header() project = libhttp.get_project(form) srcpackage = libhttp.get_srcpackage(form) tag = libhttp.get_arg(form, 'tag') db = libdbcore.ObsDb() title = get_page_title(project, srcpackage, tag) content = get_page_content(db, project, srcpackage, tag) libhttp.print_header(title) if not srcpackage: print libdbhtml.get_project_selector(current_project = project, db = db) print content libhttp.print_foot()