> AiutoSuMacro

  1. Macro
    1. Macro di ricerca
    2. Navigazione
    3. Informazioni di sistema
    4. Altre
  2. Esempio

1. Macro

Le macro consentono di inserire nuove funzionalitą nelle normali pagine wiki; l'unica cosa che rende speciali quelle pagine č che contengono delle macro. Se modifichi pagine tipo ModificheRecenti o SystemInfo, potrai vedere che cosa questo significhi.

Per ulteriori informazioni sulle possibili formattazioni, vedi AiutoSuFormattazione.

1.1. Macro di ricerca

Macro Descrizione Esempio
[[TitleSearch]] cerca tra i titoli delle pagine Vedi CercaPagina
[[FullSearch]] cerca nel contenuto delle pagine Vedi CercaPagina
[[FullSearch()]] cerca il titolo corrente in tutte le pagine (come cliccando sul titolo della pagina) Vedi la pagina CategoryCategory
[[FullSearch('testo')]] cerca "testo" in tutte le pagine Cerca FullSearch:
  1. AiutoSuMacro . . . . 6 matches
  2. HelpOnMacros . . . . 6 matches
  3. AiutoSuAzioni . . . . 3 matches
  4. HelpOnActions . . . . 3 matches
  5. CategoryCategory . . . . 1 match
  6. CercaPagina . . . . 1 match
  7. FindPage . . . . 1 match
  8. FindSide . . . . 1 match
  9. SiteNavigation . . . . 1 match
[[GoTo]] vai direttamente alla pagina che indichi Vedi CercaPagina
[[PageList(regex)]] elenca le pagine il cui titolo corrisponde alla regex Vedi AiutoIndice

1.2. Navigazione

--> -->
Macro Descrizione Esempio
[[RecentChanges]] elenca le pagine modificate di recente Vedi ModificheRecenti
[[TitleIndex]] genera un indice di tutti i titoli delle pagine Vedi IndiceDeiTitoli
[[WordIndex]] genera un indice di tutte le parole nei titoli delle pagine Vedi IndicePerParola
[[WantedPages]] elenca i riferimenti a pagine non esistenti Vedi PagineAssenti
[[OrphanedPages]] elenca le pagine che non sono referenziate da altre pagine Vedi PagineOrfane
[[AbandonedPages]] elenca le pagine che non sono state modificate da lungo tempo Vedi PagineAbbandonate
 
 
Cannot load macro RandomPage
Please include this information in your bug reports!:
Python Python 2.7.18: /usr/bin/python2
Linux erode.bofh.it 5.10.0-23-amd64 #1 SMP Debian 5.10.179-1 (2023-05-12) x86_64
MoinMoin Release 1.2.4 [Revision 1.187]
Thu Mar 28 12:24:31 2024

A problem occurred in a Python script. Here is the sequence of function calls leading up to the error, in the order they occurred.

 /usr/local/share/moin/MoinMoin/request.py in run(self=<MoinMoin.request.RequestCGI instance>)
  389                 if handler:
  390                     handler(pagename or
  391                     wikiutil.getSysPage(self, config.page_front_page).page_name, self)
  392                 else:
  393                     self.http_headers()
global wikiutil = <module 'MoinMoin.wikiutil' from '/usr/local/share/moin/MoinMoin/wikiutil.pyc'>, wikiutil.getSysPage = <function getSysPage>, self = <MoinMoin.request.RequestCGI instance>, global config = <module 'MoinMoin.config' from '/usr/local/share/moin/MoinMoin/config.pyc'>, config.page_front_page = 'FrontPage', ).page_name undefined

 /usr/local/share/moin/MoinMoin/wikiaction.py in do_highlight(pagename='AiutoSuMacro', request=<MoinMoin.request.RequestCGI instance>)
  173         needle_re = re.compile(needle, re.IGNORECASE)
  174 
  175     Page(pagename).send_page(request, hilite_re=needle_re)
  176 
  177 
global Page = <class MoinMoin.Page.Page>, pagename = 'AiutoSuMacro', ).send_page undefined, request = <MoinMoin.request.RequestCGI instance>, hilite_re undefined, needle_re = <_sre.SRE_Pattern object>

 /usr/local/share/moin/MoinMoin/Page.py in send_page(self=<MoinMoin.Page.Page instance>, request=<MoinMoin.request.RequestCGI instance>, msg='', **keywords={'hilite_re': <_sre.SRE_Pattern object>})
  622         else:
  623             # parse the text and send the page content
  624             self.send_page_content(request, Parser, body)
  625 
  626             # check for pending footnotes
self = <MoinMoin.Page.Page instance>, self.send_page_content = <bound method Page.send_page_content of <MoinMoin.Page.Page instance>>, request = <MoinMoin.request.RequestCGI instance>, Parser = <class MoinMoin.parser.wiki.Parser>, body = '\n[[TableOfContents]]\n\n== Macro ==\n\nLe macro cons...la macro\n{{{[[SystemInfo]]}}}:\n\n [[SystemInfo]]\n'

 /usr/local/share/moin/MoinMoin/Page.py in send_page_content(self=<MoinMoin.Page.Page instance>, request=<MoinMoin.request.RequestCGI instance>, Parser=<class MoinMoin.parser.wiki.Parser>, body='\n[[TableOfContents]]\n\n== Macro ==\n\nLe macro cons...la macro\n{{{[[SystemInfo]]}}}:\n\n [[SystemInfo]]\n', needsupdate=0)
  673             (not formatter_name in config.caching_formats)):
  674             # parse the text and send the page content
  675             Parser(body, request).format(self.formatter)
  676             return
  677 
Parser = <class MoinMoin.parser.wiki.Parser>, body = '\n[[TableOfContents]]\n\n== Macro ==\n\nLe macro cons...la macro\n{{{[[SystemInfo]]}}}:\n\n [[SystemInfo]]\n', request = <MoinMoin.request.RequestCGI instance>, ).format undefined, self = <MoinMoin.Page.Page instance>, self.formatter = <MoinMoin.formatter.text_html.Formatter instance>

 /usr/local/share/moin/MoinMoin/parser/wiki.py in format(self=<MoinMoin.parser.wiki.Parser instance>, formatter=<MoinMoin.formatter.text_html.Formatter instance>)
 1031                 line = line + " " # we don't have \n as whitespace any more
 1032 
 1033             formatted_line = self.scan(scan_re, line) # this also sets self.inhibit_p as side effect!
 1034             
 1035             #self.request.write("<!-- inhibit_p==%d -->\n" % self.inhibit_p)
formatted_line = '<tr>\n<td>\n<tt>[[AbandonedPages]]</tt> </td>\n<td...neAbbandonate">PagineAbbandonate</a> </td>\n</tr>\n', self = <MoinMoin.parser.wiki.Parser instance>, self.scan = <bound method Parser.scan of <MoinMoin.parser.wiki.Parser instance>>, scan_re = <_sre.SRE_Pattern object>, line = '||{{{[[RandomPage]]}}} || genera un link a una pagina a caso || [[RandomPage]] || '

 /usr/local/share/moin/MoinMoin/parser/wiki.py in scan(self=<MoinMoin.parser.wiki.Parser instance>, scan_re=<_sre.SRE_Pattern object>, line='||{{{[[RandomPage]]}}} || genera un link a una pagina a caso || [[RandomPage]] || ')
  864             else:
  865                 result.append(self.formatter.text(line[lastpos:match.start()]))
  866             result.append(self.replace(match))
  867 
  868             # search for the next one
result = ['', '<tr>\n<td>\n', '', '<tt>[[RandomPage]]</tt>', ' ', '</td>\n<td>\n', ' genera un link a una pagina a caso ', '</td>\n<td>\n', ' '], result.append = <built-in method append of list object>, self = <MoinMoin.parser.wiki.Parser instance>, self.replace = <bound method Parser.replace of <MoinMoin.parser.wiki.Parser instance>>, match = <_sre.SRE_Match object>

 /usr/local/share/moin/MoinMoin/parser/wiki.py in replace(self=<MoinMoin.parser.wiki.Parser instance>, match=<_sre.SRE_Match object>)
  884                     return self.highlight_text(hit)
  885                 else:
  886                     return getattr(self, '_' + type + '_repl')(hit)
  887         else:
  888             import pprint
getattr undefined, self = <MoinMoin.parser.wiki.Parser instance>, type = 'macro', hit = '[[RandomPage]]'

 /usr/local/share/moin/MoinMoin/parser/wiki.py in _macro_repl(self=<MoinMoin.parser.wiki.Parser instance>, word='[[RandomPage]]')
  823 
  824         # call the macro
  825         return self.formatter.macro(self.macro, macro_name, args)
  826 
  827 
self = <MoinMoin.parser.wiki.Parser instance>, self.formatter = <MoinMoin.formatter.text_html.Formatter instance>, self.formatter.macro = <bound method Formatter.macro of <MoinMoin.formatter.text_html.Formatter instance>>, self.macro = <MoinMoin.wikimacro.Macro instance>, macro_name = 'RandomPage', args = None

 /usr/local/share/moin/MoinMoin/formatter/base.py in macro(self=<MoinMoin.formatter.text_html.Formatter instance>, macro_obj=<MoinMoin.wikimacro.Macro instance>, name='RandomPage', args=None)
  160     def macro(self, macro_obj, name, args):
  161         # call the macro
  162         return macro_obj.execute(name, args)    
  163 
  164     def processor(self, processor_name, lines):
macro_obj = <MoinMoin.wikimacro.Macro instance>, macro_obj.execute = <bound method Macro.execute of <MoinMoin.wikimacro.Macro instance>>, name = 'RandomPage', args = None

 /usr/local/share/moin/MoinMoin/wikimacro.py in execute(self=<MoinMoin.wikimacro.Macro instance>, macro_name='RandomPage', args=None)
  110             return self._m_lang(macro_name, args)
  111 
  112         raise ImportError("Cannot load macro %s" % macro_name)
  113 
  114     def _m_lang(self, lang_name, text):
ImportError undefined, macro_name = 'RandomPage'

: Cannot load macro RandomPage