Changes between Version 1 and Version 2 of WikiProcessors
- Timestamp:
- Jun 21, 2005, 1:13:36 AM (19 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
WikiProcessors
v1 v2 1 = Wiki Processors=2 Processors are WikiMacros designed to provide alternative markup formats for the Trac Wiki engine. Processors can be thought of as ''macro functions to process user-edited text''. 1 = Wiki プロセッサ = 2 プロセッサは Trac の Wiki エンジンが、 Wiki 以外のフォーマットを提供するために設計された WikiMacros です。プロセッサは、 ''ユーザが編集したテキストを処理するマクロ機能'' と考えることができます。 3 3 4 T he wiki engine uses processors to allow using [wiki:WikiRestructuredText Restructured Text] and [wiki:WikiHtml raw HTML] in any wiki text throughout Trac.4 Trac 内の全ての Wiki テキストにおいて、 [wiki:WikiRestructuredText Restructured Text] および [wiki:WikiHtml raw HTML] をプロセッサとして使用することができます。 5 5 6 == Using Processors==7 To use a processor on a block of text, use a wiki blockquote, selecting a processor by name using 'hashbang notation' (#!), familiar to most UNIX users from scripts. 6 == プロセッサの利用法 == 7 テキストブロックでプロセッサを使うには、 Wiki の引用ブロックを使用し、プロセッサの名前を (Unix 系 OS のスクリプトのように) 'sharbang行' (#!) に続いて指定します。 8 8 9 ''' Example 1''' (''inserting raw HTML in a wiki text''):9 '''例1''' (''Wiki テキストに 生 HTML を挿入する''): 10 10 11 11 {{{ … … 13 13 <pre class="wiki">{{{ 14 14 #!html 15 <h1 style="color: orange"> This is raw HTML</h1>15 <h1 style="color: orange">これは生 HTML です</h1> 16 16 }}}</pre> 17 17 }}} 18 18 19 ''' Results in:'''19 '''結果、このように表示されます:''' 20 20 {{{ 21 21 #!html 22 <h1 style="color: orange"> This is raw HTML</h1>22 <h1 style="color: orange">これは生 HTML です</h1> 23 23 }}} 24 24 25 25 ---- 26 26 27 ''' Example 2''' (''inserting Restructured Text in wiki text''):27 '''例2''' (''Wiki テキストに !ReStructured テキストを挿入する''): 28 28 29 29 {{{ … … 31 31 <pre class="wiki">{{{ 32 32 #!rst 33 A header 34 ------ --35 This is some **text** with a footnote [*]_. 33 見出し 34 ------ 35 脚注 [*]_ 付きの **text** です。 36 36 37 .. [*] This is the footnote.37 .. [*] ここは脚注。 38 38 }}}</pre> 39 39 }}} 40 40 41 ''' Results in:'''41 '''結果、このように表示されます:''' 42 42 {{{ 43 43 #!rst 44 A header 45 ------ --46 This is some **text** with a footnote [*]_. 44 見出し 45 ------ 46 脚注 [*]_ 付きの **text** です。 47 47 48 .. [*] This is the footnote.48 .. [*] ここは脚注。 49 49 }}} 50 (訳注: !ReStructuredText は国際化が甘いので、使えないかもしれません) 50 51 ---- 51 ''' Example 3''' (''inserting a block of C source code in wiki text''):52 '''例3''' (''Wiki テキストに C 言語ソースコードブロックを挿入する''): 52 53 53 54 {{{ … … 63 64 }}} 64 65 65 ''' Results in:'''66 '''結果、このように表示されます:''' 66 67 {{{ 67 68 #!c … … 77 78 78 79 79 == Available Processors==80 The following processors are included in the Trac distribution:81 * '''html''' -- Insert custom HTML in a wiki page. See WikiHtml.82 * '''rst''' -- Trac support for Restructured Text. See WikiRestructuredText.83 * '''textile''' -- Initial support as of aug 2, 2004. See [http://projects.edgewall.com/trac/ticket/593 ticket 593] and [http://dealmeida.net/projects/textile/ Textile].80 == 利用可能なプロセッサ == 81 以下のプロセッサが Trac の配布に含まれています: 82 * '''html''' -- Wiki ページにカスタム HTML を挿入する。 WikiHtml を参照してください。 83 * '''rst''' -- Restructured テキスト を Trac でサポートする。 WikiRestructuredText を参照してください。 84 * '''textile''' -- 2004年8月2日にサポートを開始したばかり。 [http://projects.edgewall.com/trac/ticket/593 ticket 593] および [http://dealmeida.net/projects/textile/ Textile] を参照してください。 84 85 85 === Source Code Support===86 Trac includes processors to provide inline [wiki:TracSyntaxColoring syntax highlighting] for these languages:86 === ソースコードのサポート === 87 Trac では、以下のプログラミング言語でのインライン [wiki:TracSyntaxColoring syntax ハイライト] を行うプロセッサを内蔵しています。 87 88 * '''c''' -- C 88 89 * '''cpp''' -- C++ … … 94 95 * '''sql''' -- SQL 95 96 * '''xml''' -- XML 96 '''Note:''' ''Trac relies on external software packages for syntax coloring. See TracSyntaxColoring for more info.''97 '''Note:''' ''Trac はシンタックスの色付けを、外部のソフトウェアパッケージに依存しています。詳しくは TracSyntaxColoring をご覧下さい。'' 97 98 98 By using the mime-type as processor, it is posible to syntax-highlight the same languages that are supported when browsing source code. (The list of mime-types can be found in [source:trunk/trac/Mimeview.py Mimeview.py]). 99 プロセッサ使用時に mime-type が指定されると、ソースコードをブラウズする際に可能な限り同じ言語で、シンタックスハイライトを行います。(mime-type のリストは [http://projects.edgewall.com/trac/browser/trunk/trac/Mimeview.py Mimeview.py] にあります) 99 100 100 For example, you can write:101 例えば、以下のように書くと: 101 102 102 103 {{{ … … 107 108 }}} 108 109 109 The result will be syntax highlighted html code. The same is valid for all other mime types supported. 110 この結果はシンタックスハイライトされた HTML コードになります。サポートされている全ての mime-type でも、これは同じく有効です。 110 111 111 112 112 113 113 For more processor macros developed and/or contributed by users, visit the macro bazaar: 114 プロセッサマクロの開発やユーザによるコントリビュートのため、マクロバザールが開かれています: 114 115 http://projects.edgewall.com/trac/wiki/MacroBazaar 115 116 116 117 ---- 117 == Advanced Topics: Developing Processor Macros==118 Developing processors is no different than WikiMacros. In fact they work the same way, only the usage syntax differs. See WikiMacros for more information. 118 == 上級トピック: プロセッサマクロを開発する == 119 プロセッサの開発は WikiMacros と違いはありません。事実、これらは同じような機能を持ち、シンタックスだけが異なります。詳しくは WikiMacros に記述します。 119 120 120 ''' Example:''' (''Restructured Text Processor''):121 '''例:''' (''Restructured テキストプロセッサ''): 121 122 {{{ 122 123 from docutils.core import publish_string … … 128 129 129 130 ---- 130 See also: WikiMacros, WikiHtml, WikiRestructuredText, TracSyntaxColoring, WikiFormatting, TracGuide131 参考 : WikiMacros, WikiHtml, WikiRestructuredText, TracSyntaxColoring, WikiFormatting, TracGuide