Version 28 (modified by 8 years ago) (diff) | ,
---|
Contents
SQL Table in Wiki Page
Notice: This plugin is unmaintained and available for adoption.
Description
This is a simple macro that enables you to place tables resulting from SQL queries into a wiki page. For usage examples, see below.
It is similar to, but simpler than, SqlQueryMacro or SqlAlchemyQueryMacro. The main differences are that it has fewer dependencies and always queries the Trac database, rather than requiring you to set up a separate database connection.
Bugs/Feature Requests
Existing bugs and feature requests for WikiTableMacro are here.
If you have any issues, create a new ticket.
defect |
7 / 7 |
||
---|---|---|---|
enhancement |
8 / 10 |
||
task |
4 / 4 |
Download
Download the zipped source from here.
Source
You can check out WikiTableMacro from here using Subversion, or browse the source with Trac.
Installation
- Install globally:
sudo easy_install https://trac-hacks.org/svn/wikitablemacro/trunk
- Enable the plugin by updating TracIni file (
conf/trac.ini
):[components] wikitable.* = enabled
- Restart web server on command line:
sudo /etc/init.d/apache2 restart
Usage
Use the SQLTable macro as follows:
{{{#!SQLTable SELECT count(id) as "Number of Tickets" FROM ticket }}}
The result will be a table displayed in a html page.
You can also use wiki markup in the table:
{{{#!SQLTable SELECT '[milestone:' || name || ' ' || name || ']' as name, due, completed, description FROM milestone }}}
Use the SQLScalar macro:
{{{#!SQLScalar SELECT count(id) as "Number of Tickets" FROM ticket }}}
The result will be a single number.
Recent Changes
- 18458 by rjollos on 2021-12-14 15:55:25
-
WikiTableMacro 0.3dev: Make exception handling Py3 compatible
Refs #14101.
- 16994 by rjollos on 2017-11-20 00:43:24
-
WikiTableMacro 0.3: Release version 0.3
Fixes #13336.
- 16993 by rjollos on 2017-11-20 00:41:44
-
WikiTableMacro 0.3dev: Conform to PEP8
Refs #13336.
(more)
Author/Contributors
Author: optilude
Maintainer: none (needsadoption)
Contributors: jun66j5