Skip to content

Commit

Permalink
add ShowUserGroup and ShowWikiDict macros to help-en; #1595
Browse files Browse the repository at this point in the history
moved some definitions into alphabetical order, used
consistent spacing.
  • Loading branch information
RogerHaase committed Feb 21, 2024
1 parent 43f0aa0 commit 1f6d905
Show file tree
Hide file tree
Showing 2 changed files with 80 additions and 33 deletions.
103 changes: 75 additions & 28 deletions src/moin/help/help-en/MoinWikiMacros.data
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ Features that are not working correctly are marked with '''MOINTODO:'''

There are four built-in macros.


=== TableOfContents ===

The number of levels in the table of contents can be limited by passing an integer parameter.
Expand All @@ -23,6 +24,7 @@ The number of levels in the table of contents can be limited by passing an integ

See TOC floated to right.


=== FootNotes ===

'''Markup:'''
Expand All @@ -47,6 +49,7 @@ By default footnotes are placed at the bottom of the page. Explicit placement of

Subsequent footnotes<<FootNote(This footnote is placed at bottom of page by default.)>> will be numbered starting with 1 and placed at the bottom of the page by default.


=== BR - Forced Line Break ===

'''Markup:'''
Expand All @@ -59,6 +62,7 @@ Use a BR macro <<BR>>to force a line break.

Use a BR macro <<BR>>to force a line break.


=== Include ===

'''Markup:'''
Expand Down Expand Up @@ -117,6 +121,7 @@ link inside Item Views to show/hide the inclusion.

== Extension Macros from MoinMoin/macro/ ==


=== Anchor ===

Anchors are created (but invisible of course). Click [[#anchorname|here]] to scroll the window to the anchor following '''Result''' below.
Expand All @@ -131,6 +136,7 @@ Anchors are created (but invisible of course). Click [[#anchorname|here]] to scr

<<Anchor(anchorname)>>


=== Date ===

'''Markup:'''
Expand All @@ -155,6 +161,7 @@ Do this after <<Date()>> but before <<Date(2022-01-23T12:34:56)>>.

Do this after <<Date()>> but before <<Date(2022-01-23T12:34:56)>>.


=== DateTime ===

'''Markup:'''
Expand All @@ -179,6 +186,7 @@ Do this after <<DateTime()>> but before <<DateTime(2022-01-23T12:34:56)>>.

Do this after <<DateTime()>> but before <<DateTime(2022-01-23T12:34:56)>>.


=== FontAwesome ===

The FontAwesome macro displays FontAwesome fonts.
Expand Down Expand Up @@ -223,6 +231,7 @@ create a character half the current size.

<<FontAwesome(spin spinner,plum,2.5)>> <<FontAwesome(fan spin-reverse,orange,2.5)>>


=== GetText ===

Loads I18N texts. If this browser is set to German/Deutsch the macro output will be: Einstellungen ("Settings" is included in the translation files).
Expand All @@ -237,6 +246,7 @@ Loads I18N texts. If this browser is set to German/Deutsch the macro output will

<<GetText(Settings)>>


=== GetVal ===

For GetVal to work, there must be either a ConfigDict or WikiDict defined (see config docs). This example depends upon an item named [[help-en/WikiDict]] having specific metadata. See configuration docs for details.
Expand All @@ -251,6 +261,7 @@ For GetVal to work, there must be either a ConfigDict or WikiDict defined (see c

<<GetVal(help-en/WikiDict,var1)>>


=== Icon ===

The Icon macro displays an icon. The complete list of available icons are listed within [[/Icons]].
Expand All @@ -265,24 +276,6 @@ Here is the moin icon: <<Icon(moin-logo.png)>>

Here is the moin icon: <<Icon(moin-logo.png)>>

=== MailTo ===

The MailTo macro exports different markup when the user is logged in.

'''Markup:'''

{{{
<<MailTo(user AT example DOT org)>>

<<MailTo(user AT example DOT org, write me)>>
}}}

'''Result:'''

<<MailTo(user AT example DOT org)>>

<<MailTo(user AT example DOT org, write me)>>


=== ItemList ===

Expand All @@ -291,10 +284,8 @@ This section is partitioned into subsections, one for each ItemPageList paramete
Most of the examples below search for descendents under the top-level "OtherTextItems"
item, the only sample-wiki item that contains a significant number of descendents.


===== The "item" parameter =====


'''Markup:'''

{{{
Expand Down Expand Up @@ -443,6 +434,39 @@ Displayed using "UnCameled":

<<ItemList(item="OtherTextItems", regex="PlainText", display="UnCameled")>>


=== MailTo ===

The MailTo macro exports different markup when the user is logged in.

'''Markup:'''

{{{
<<MailTo(user AT example DOT org)>>

<<MailTo(user AT example DOT org, write me)>>
}}}

'''Result:'''

<<MailTo(user AT example DOT org)>>

<<MailTo(user AT example DOT org, write me)>>


=== MonthCalendar ===

The MonthCalendar macro is for those who need a calendar wiki integration or want to use MoinMoin as a Personal Information Manager.

'''Markup:'''

{{{
<<MonthCalendar(item,year,month,month_offset,fixed_height,anniversary)>>
}}}

For more details see [[/MonthCalendar]]


=== RandomItem ===

'''Markup:'''
Expand All @@ -467,33 +491,56 @@ Five random items:

<<RandomItem(5)>>

=== TitleIndex ===

TitleIndex gives a List of all Itemnames in the current namespace grouped by initials.
=== ShowUserGroup ===

This macro displays the contents of the metadata defined in the "usergroup" attribute.
Because this item has no metadata usergroup attribute, the result shown below
represents sample output.

'''Markup:'''

{{{
<<ShowUserGroup()>>
}}}

<<TitleIndex()>>
'''Result:'''

['JillDoe', 'JaneDoeGroup', '+JohnDoe']

=== ShowWikiDict ===

This macro displays the contents of the metadata defined in the "wikidict" attribute.
Because this item has no metadata usergroup attribute, the result shown below
represents sample output.

'''Markup:'''

{{{
<<ShowWikiDict()>>
}}}

'''Result:'''

<<TitleIndex()>>
{'dog': 'Hund', 'cat': 'Katze'}

=== MonthCalendar ===

The MonthCalendar macro is for those who need a calendar wiki integration or want to use MoinMoin as a Personal Information Manager.
=== TitleIndex ===

TitleIndex gives a List of all Itemnames in the current namespace grouped by initials.

'''Markup:'''

{{{
<<MonthCalendar(item,year,month,month_offset,fixed_height,anniversary)>>

<<TitleIndex()>>

}}}

For more details see [[/MonthCalendar]]
'''Result:'''

<<TitleIndex()>>


=== Verbatim ===

Expand Down
10 changes: 5 additions & 5 deletions src/moin/help/help-en/MoinWikiMacros.meta
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"address": "127.0.0.1",
"comment": "",
"contenttype": "text/x.moin.wiki;charset=utf-8",
"dataid": "ab509237fd3d4be9976f961da142d5b5",
"dataid": "9262cede73cd48629f7db4b397ee0835",
"externallinks": [
"https://fontawesome.com/search?o=r&m=free",
"https://moinmo.in/HelpOnMacros/Include"
Expand All @@ -18,16 +18,16 @@
"help-common/logo.png"
],
"itemtype": "default",
"mtime": 1707909302,
"mtime": 1708540585,
"name": [
"MoinWikiMacros"
],
"name_old": [],
"namespace": "help-en",
"rev_number": 1,
"revid": "397c78f382924549bda167b7639d1078",
"sha1": "406b9ead3b66237e9d3452f3bc99b2f9d281a92c",
"size": 12447,
"revid": "e1f1896173f24726bdc16811778b1c04",
"sha1": "cb14ea7833e4c378cf6ced5bbaddb00ed05a1d26",
"size": 13140,
"summary": "",
"tags": [
"macros",
Expand Down

0 comments on commit 1f6d905

Please sign in to comment.