Changes between Version 1 and Version 2 of WikiProcessors

차이점 주위로
다음 차이점은 무시하기:
작성자:
anonymous (IP: 176.52.42.140)
날짜/시간:
2025-08-30 PM 4:31:47 (2 달 전)
설명:

1

Legend:

변경되지 않음
추가됨
제거됨
변경됨
  • WikiProcessors

    v1 v2  
    1 = Wiki 프로세서 = 
    2  
    3 Processors are WikiMacros designed to provide alternative markup formats for the [TracWiki Wiki engine]. Processors can be thought of as ''macro functions to process user-edited text''.  
    4  
    5 The Wiki engine uses processors to allow using [wiki:WikiRestructuredText Restructured Text], [wiki:WikiHtml raw HTML] and [http://www.textism.com/tools/textile/ textile] in any Wiki text throughout Trac. 
    6  
    7  
    8 == 프로세서 사용하기 == 
    9  
    10 To use a processor on a block of text, use a Wiki code block, selecting a processor by name using ''shebang notation'' (#!), familiar to most UNIX users from scripts. 
    11  
    12 '''예제 1''' (''위키 텍스트에 raw HTML 삽입하기''): 
    13  
    14 {{{ 
    15 #!html 
    16 <pre class="wiki">{{{ 
    17 #!html 
    18 &lt;h1 style="color: orange"&gt;This is raw HTML&lt;/h1&gt; 
    19 }}}</pre> 
    20 }}} 
    21  
    22 '''결과 화면:''' 
    23 {{{ 
    24 #!html 
    25 <h1 style="color: orange">This is raw HTML</h1> 
    26 }}} 
    27  
    28 ---- 
    29  
    30 '''예제 2''' (''위키 텍스트에 Restructured Text 삽입하기''): 
    31  
    32 {{{ 
    33 #!html 
    34 <pre class="wiki">{{{ 
    35 #!rst 
    36 A header 
    37 -------- 
    38 This is some **text** with a footnote [*]_. 
    39  
    40 .. [*] This is the footnote. 
    41 }}}</pre> 
    42 }}} 
    43  
    44 '''결과 화면:''' 
    45 {{{ 
    46 #!rst 
    47 A header 
    48 -------- 
    49 This is some **text** with a footnote [*]_. 
    50  
    51 .. [*] This is the footnote. 
    52 }}} 
    53 ---- 
    54 '''예제 3''' (''위키 텍스트에 C 소스 코드 삽입하기''): 
    55  
    56 {{{ 
    57 #!html 
    58 <pre class="wiki">{{{ 
    59 #!c 
    60 int main(int argc, char *argv[]) 
    61 
    62   printf("Hello World\n"); 
    63   return 0; 
    64 
    65 }}}</pre> 
    66 }}} 
    67  
    68 '''결과 화면:''' 
    69 {{{ 
    70 #!c 
    71 int main(int argc, char *argv[]) 
    72 
    73   printf("Hello World\n"); 
    74   return 0; 
    75 
    76 }}} 
    77  
    78 ---- 
    79  
    80 == 이용 가능한 프로세서들 == 
    81 다음의 프로세서들이 Trac 배포판에 포함되어 있습니다. 
    82  * '''html''' -- 위키 페이지에 raw HTML 을 삽입합니다.. 참고 : [wiki:WikiHtml]. 
    83  * '''rst''' -- Trac은 Restructured Text를 지원합니다. 참고 : [wiki:WikiRestructuredText]. 
    84  * '''textile''' -- Supported if  [http://dealmeida.net/projects/textile/ Textile] is installed. See [http://hobix.com/textile/ a Textile reference]. 
    85  
    86 Textile link above is rotten. [http://www.textism.com/tools/textile/ this one] works, allows to test example. 
    87  
    88 === 코드 하이라이팅 지원 === 
    89 Trac includes processors to provide inline [wiki:TracSyntaxColoring syntax highlighting] for the following languages: 
    90  * '''c''' -- C 
    91  * '''cpp''' -- C++ 
    92  * '''python''' -- Python 
    93  * '''perl''' -- Perl 
    94  * '''ruby''' -- Ruby 
    95  * '''php''' -- PHP 
    96  * '''asp''' --- ASP 
    97  * '''sql''' -- SQL 
    98  * '''xml''' -- XML 
    99 '''주의:''' ''Trac은 syntax coloring을 위해서 외부의 소프트웨어 패키지에 의존합니다. 더 많은 정보가 필요하다면 [wiki:TracSyntaxColoring] 페이지를 참고하십시오.'' 
    100  
    101 By using the MIME type as processor, it is possible to syntax-highlight the same languages that are supported when browsing source code. For example, you can write: 
    102 {{{ 
    103 {{{ 
    104 #!text/html 
    105 <h1>text</h1> 
    106 }}} 
    107 }}} 
    108  
    109 The result will be syntax highlighted HTML code. The same is valid for all other mime types supported. 
    110  
    111  
    112 For more processor macros developed and/or contributed by users, visit:  
    113  * [http://projects.edgewall.com/trac/wiki/ProcessorBazaar ProcessorBazaar] 
    114  * [http://projects.edgewall.com/trac/wiki/MacroBazaar MacroBazaar] 
    115  
    116  
    117 == 진보된 주제들: 프로세서 매크로 개발하기 == 
    118 프로세서를 개발하는 것은 [wiki:WikiMacros]와 다르지 않습니다. 사실 같은 방식으로 동작합니다. 단지 usage syntax가 틀립니다. 더 많은 정보가 필요하다면 [wiki:WikiMacros] 페이지를 참고하십시오. 
    119  
    120 '''예제:''' (''Restructured Text 프로세서''): 
    121 {{{ 
    122 #!python 
    123 from docutils.core import publish_string 
    124  
    125 def execute(hdf, text, env): 
    126     html = publish_string(text, writer_name = 'html') 
    127     return html[html.find('<body>')+6:html.find('</body>')].strip() 
    128 }}} 
    129  
    130 ---- 
    131 참고 : WikiMacros, WikiHtml, WikiRestructuredText, TracSyntaxColoring, WikiFormatting, TracGuide 
     12R2KhS4E