[[PageOutline(2-5,Contents,pullout)]] = OpenHub statistics widgets macro == Description [[Image(logo-openhub.png, align=right)]] [https://www.openhub.net/ OpenHub] has some nice [https://www.openhub.net/p/ohloh_widgets_macro/widgets widgets] which you can put on your site to show some statistics about your project. OpenHub, formerly Ohloh, is a website which provides a web services suite and online community platform that aims to index the open source software development community. [[Image(wiki:OhlohWidgetsMacroPlugin:ohloh_widgets_macro.png, border=2)]] Check the '''[http://www.schwarz.eu/opensource/projects/ohloh_widgets_macro/ online demo]''' to see the macro in action. Display a single widget by specifying your project id and the widget name, ie the Javascript file name without the '.js' suffix: {{{ [[OhlohWidget(483602, project_basic_stats)]] }}} Also you can display a group of widgets together: {{{ [[OhlohWidgetGroup(483602, project_basic_stats, project_factoids, project_users?style=green)]] }}} This has the advantage that all widgets are grouped in a div so you can style it easily. This plugin is a [trac: Trac] macro to make embedding these widgets in your Trac wiki easy and does not force you to lower Trac's security settings. It includes a special API so you can modify any OpenHub widget, so it blends in better with your layout. See also: OhlohBadgeMacro == Download Download the zipped source from [pypi:OhlohWidgetsMacro PyPi]. == Source Actual development and bug tracking happens on '''[http://www.schwarz.eu/opensource/projects/ohloh_widgets_macro/ macro development site]'''. You can also find more information about the API to customize OpenHub plugins on that page. == Installation Prerequisites: * Python 2.3 - 2.6 * pypi:pycerberus * Trac 0.11+ Once you have installed the macro, enable the macro in your `trac.ini` file: {{{#!ini [components] ohloh_widgets.macro = enabled # if you want to have better display of certain macros, enable also widget modifiers: ohloh_widgets.* = enabled }}} == Configuration Some OpenHub widgets do not look nice on a Trac page, because some elements do not respect Trac's layout, eg they use different colors for links. This macro already includes some modifiers which can change the appearance of some OpenHub macros with Javascript (jQuery) and CSS, but you can easily add your own by writing a small plugin which implements this interface: {{{#!python # This class is in ohloh_widgets.api class IOhlohWidgetModifier(Interface): def widget_name(self): """Return the name of the widget which this modifier can modify. The widget name is the name of the JS file (e.g. 'project_factoids.js') without the '.js' suffix (=> 'project_factoids'). """ def widget_fix(self): """Return a Genshi tag which is inserted directly after the widget's script tag. Use this to add custom CSS/Javascript which whips the widget into shape (again).""" }}} == Author/Contributors '''Author:''' [wiki:felix_schwarz] [[BR]] '''Maintainer:''' [[Maintainer]] [[BR]] '''Contributors:'''