Project

General

Profile

FNAL Redmine tricks » History » Version 1

Version 1/5 - Next » - Current version
Katherine Lato, 07/14/2016 03:19 PM


FNAL Redmine tricks

Empty page - for testing

An empty page for your tests: LArSoft Redmine sandbox; remember to clean up after yourself!

Calling macros

A macro can be called by enclosing its name in double braces; for example:

{{hello_world(arg="argument text")
  block of text
}}

Hello world! Object: WikiContent::Version, Arguments: arg="argument text" and a 13 bytes long block of text.

Syntax highlight for code

The standard way to get some syntax highlight is to switch to HTML mode with.

Class names are

C c
C++ cpp (does not know C++11 keywords)
python python
ruby ruby
JSON json
bash n/a
FHiCL n/a (try with python)

Custom macro test

(this is currently incorrect or not working)

macro :my_macro, :desc => 'This is a custom macro' do |obj, args| # args is an array # and this macro does not accept a block of text
end

{{my_macro}}

Collapsing text

The following macro creates a collapsible window with the specified text as short description.
The extended text can contain macros; e.g.:

{{collapse(View details...)
  bq. {{child_pages}}
  This is a block of text that is collapsed by default.
  It can be expanded by clicking a link.
}}

Mathematical formulas with LaTeX

{{latex($\beta\tau\Theta\theta$)}}

$\beta\tau\Theta\theta$

DOT graphs

This seems not to work...

{{graphviz( a -> b ;)}}

Error executing the graphviz macro (Error applying external filter: stdout is , stderr is )

List of supported macros

The following list can be rendered by running the {{macro_list}} macro:


hello_world
Sample macro.
macro_list
Displays a list of all available macros, including description if available.
child_pages
Displays a list of child pages. With no argument, it displays the child pages of the current wiki page. Examples:

{{child_pages}} -- can be used from a wiki page only
{{child_pages(depth=2)}} -- display 2 levels nesting only
{{child_pages(Foo)}} -- lists all children of page Foo
{{child_pages(Foo, parent=1)}} -- same as above with a link to page Foo
include
Includes a wiki page. Examples:

{{include(Foo)}}
{{include(projectname:Foo)}} -- to include a page of a specific project wiki
collapse
Inserts of collapsed block of text. Examples:

{{collapse
This is a block of text that is collapsed by default.
It can be expanded by clicking a link.
}}

{{collapse(View details...)
With custom link text.
}}
thumbnail
Displays a clickable thumbnail of an attached image. Examples:

{{thumbnail(image.png)}}
{{thumbnail(image.png, size=300, title=Thumbnail)}} -- with custom title and size
review
This is my macro link to code review
latex
Converts LaTeX to embedded image
latex_include
Converts LaTeX to embedded image
graphviz
Constructs graph image from its textual description in DOT language, see http://www.graphviz.org
graphviz_include
Constructs graph image from its textual description in DOT language, see http://www.graphviz.org
ritex
Converts WebTeX expression to MathML, see http://ritex.rubyforge.org/
ritex_include
Converts WebTeX expression to MathML, see http://ritex.rubyforge.org/
video
Converts video file given by its filename to FLV and displays it via Flowplayer
video_include
Converts video file given by its filename to FLV and displays it via Flowplayer
video_url
Converts video file given by its URL to FLV and displays it via Flowplayer
video_url_include
Converts video file given by its URL to FLV and displays it via Flowplayer
fortune
Prints a random, hopefully interesting, adage, see http://en.wikipedia.org/wiki/Fortune_(Unix)
fortune_include
Prints a random, hopefully interesting, adage, see http://en.wikipedia.org/wiki/Fortune_(Unix)
repository
Prints path to project repository, args are (mode,reponame) mode is 'ro' or 'rw', reponame only if multiple repositories on project
repository_include
Prints path to project repository, args are (mode,reponame) mode is 'ro' or 'rw', reponame only if multiple repositories on project