Changeset 2427 in project


Ignore:
Timestamp:
11/14/06 16:10:42 (15 years ago)
Author:
azul
Message:

Reverting spam.

Location:
wiki
Files:
2 deleted
2 edited

Legend:

Unmodified
Added
Removed
  • wiki/stream-wiki

    r2404 r2427  
    1 Interest sourse! My sourse -
    2 http://zyrtec.bialy.info <a href="http://zyrtec.bialy.info">zyrtec</a> [url=http://zyrtec.bialy.info]zyrtec[/url]
    3 http://crestor.l1.pl <a href="http://crestor.l1.pl">crestor</a> [url=http://crestor.l1.pl]crestor[/url]
    4 http://plavix.cmn.pl <a href="http://plavix.cmn.pl">plavix</a> [url=http://plavix.cmn.pl]plavix[/url]
    5 http://neurontin.eoj.pl <a href="http://neurontin.eoj.pl">neurontin</a> [url=http://neurontin.eoj.pl]neurontin[/url]
    6 http://protonix.l1.pl <a href="http://protonix.l1.pl">protonix</a> [url=http://protonix.l1.pl]protonix[/url]
    7 http://prilosec.5f.pl <a href="http://prilosec.5f.pl">prilosec</a> [url=http://prilosec.5f.pl]prilosec[/url]
    8 http://zyrtec.mybb.ru/ <a href="http://zyrtec.mybb.ru/">zyrtec</a> [url=http://zyrtec.mybb.ru/]zyrtec[/url]
    9 http://zippedurl.com/9y9s9k <a href="http://zippedurl.com/9y9s9k">viagra</a> [url=http://zippedurl.com/9y9s9k]viagra[/url]
    10 http://blog.sitesfree.com/appartamento-vendita-casa-mutuo.html <a href="http://blog.sitesfree.com/appartamento-vendita-casa-mutuo.html">appartamento vendita casa mutuo</a> [url=http://blog.sitesfree.com/appartamento-vendita-casa-mutuo.html]appartamento vendita casa mutuo[/url]
    11 http://blog.sitesfree.com/casa-mutuo-appartamento-vendita.html <a href="http://blog.sitesfree.com/casa-mutuo-appartamento-vendita.html">casa mutuo appartamento vendita</a> [url=http://blog.sitesfree.com/casa-mutuo-appartamento-vendita.html]casa mutuo appartamento vendita[/url]
    12 http://blog.sitesfree.com/chiedere-prestito-finanziamento-casa.html <a href="http://blog.sitesfree.com/chiedere-prestito-finanziamento-casa.html">chiedere prestito finanziamento casa</a> [url=http://blog.sitesfree.com/chiedere-prestito-finanziamento-casa.html]chiedere prestito finanziamento casa[/url]
    13 http://blog.sitesfree.com/prestito-visa-carta.html <a href="http://blog.sitesfree.com/prestito-visa-carta.html">prestito visa carta</a> [url=http://blog.sitesfree.com/prestito-visa-carta.html]prestito visa carta[/url]
    14  <a href=""></a> [url=][/url]
     1[[tags:eggs streams]]
     2
     3[[toc:]]
     4
     5== Introduction
     6
     7Streams-based code for converting from the relatively
     8standard and easy to type wiki format to many useful formats.
     9
     10It currently supports converting to the following formats:
     11
     12* HTML
     13* LaTeX (useful for generating PDF files)
     14* Text (useful for indexing contents without markup, for example for searching).
     15
     16We are working on implementing support for Texi.
     17OpenDocumentFormat may come after.
     18
     19This egg provides the parsing functionality used by [[http://wiki.freaks-unidos.net/svnwiki|svnwiki]].
     20Using this egg other content management systems could allow its users to upload and modify
     21contents in wiki format and display it in many different formats.
     22 
     23== Examples
     24
     25=== Converting from wiki format to HTML
     26
     27The following code receives input from current-input-port
     28in wiki format and converts it to HTML written to
     29current-output-port:
     30
     31<enscript highlight=scheme>(use stream-ext stream-wiki)
     32
     33(write-stream (wiki->html (port->stream (current-input-port))))</enscript>
     34
     35Note that the resulting page does not include the {{<html>}} and {{<body>}} tags
     36(to make it easy to include it as part of a page with other stuff).
     37
     38=== Converting from wiki format to LaTeX
     39
     40The following code receives input from current-input-port
     41in wiki format and converts it to LaTeX written to
     42current-output-port. 
     43
     44<enscript highlight=scheme>(use stream-ext stream-wiki)
     45
     46(write-stream
     47  (latex-page "english"
     48              "article"
     49              (wiki->latex (port->stream (current-input-port)))))</enscript>
     50
     51=== Returning the links in a file
     52
     53The following code reads information in wiki format from current-input-port
     54and returns a stream with all the local links found.
     55Note that links to absolute URLs are not considered local links and are thus not returned.
     56Each entry in the stream has the form {{(dst name)}}, where
     57{{dst}} is the target of the link and {{name}} the text shown in the link.
     58
     59<enscript highlight=scheme>(use stream-ext stream-wiki)
     60
     61(wiki-links (port->stream (current-input-port)))</enscript>
     62
     63=== Returning a list of tags in a file
     64
     65It is possible to include "tags" (in the sense of ''tagging'' files with ''categories'')
     66in wiki pages as part of their contents.
     67To do this, the page should include a stream of the form {{<nowiki>[[tags:tag0 ... tagn]]</nowiki>}}.
     68This allows users of wiki systems to browse pages by categories (eg. list all pages
     69having tag ''tag0'').
     70
     71The following code loads a file in wiki format from {{test.wiki}} and returns
     72a stream of symbols, one for each tag found.
     73
     74<enscript highlight=scheme>(use stream-ext stream-wiki)
     75
     76(wiki-tags (port->stream (open-input-file "test.wiki")))</enscript>
     77
     78 
     79== Authors
     80
     81This egg is made by [[http://azul.freaks-unidos.net/|Alejandro Forero Cuervo]] <azul@freaks-unidos.net>.
     82
     83== License
     84
     85The {{stream-wiki}} egg is available under the GNU General Public License.
     86
     87== Requirements
     88
     89This egg depends on the following:
     90
     91* [[srfi-40]]
     92* [[stream-ext]]
     93* [[html-stream]]
     94* [[stream-parser]]
     95* [[sandbox]]
     96* [[posix]]
     97* [[format-modular]]
     98* [[stream-sections]]
     99
     100== Converting from wiki to HTML
     101
     102<enscript highlight=scheme>(wiki->html input [tail] [name] [open] [include] [linktypes] [make-header] [data-output-func] [check-exists?] [extensions] [url-adjust])</enscript>
     103
     104Converts from a simple wiki format (which is relatively
     105standard nowadays) into HTML.
     106
     107{{input}} should be a stream of characters
     108(built with the mechanisms provided by SRFI-40 or the stream-ext egg) with
     109the contents in wiki-format; the
     110function returns a stream of characters to
     111be included as part of an HTML page.
     112
     113Note that the returned stream will be built dynamically as it is read
     114(and so will the input stream be read).
     115
     116The following are the optional parameteres.
     117Please be aware that they are bound to change in the future, hopefully as the interface is improved or generalized.
     118
     119; {{tail}}: Defaults to {{stream-null}}.  The stream of characters {{tail}} will be appended at the end of the parsing.
     120; {{name}}: Defaults to {{""}}.  You should pass the name of the file currently being parsed.  The only reason it might be needed is in a {{TOC}} entry, passed to the procedure received as the {{open}} parameter.
     121; {{open}}: Defaults to {{(constantly stream-null)}} (for security reasons; we won't allow the wiki contents to open files and include them unless the caller explicitly allows it).  This should be a procedure receiving a filename as a string and returning a stream of characters with its associated contents.  This is used for {{TOC}} entries.  If you trust your wiki contents, you could use {{(compose port->stream open-input-file)}} here.
     122; {{include}}: Defaults to {{(lambda (name tail) tail)}}.  This function is used for files includes into the current file (with an {{include:file}} link).  It should return the contents that should be shown instead of the include directive, followed by the {{tail}}.  Currently they are not parsed by stream-wiki but included directly in the output, so if they are wiki contents you might want to call {{wiki->html}} on them before returning them.
     123; linktypes : Defaults to {{(make-hash-table)}}.  A list of definitions for types of links, which you can build with {{load-linktypes}}.
     124; make-header: Defaults to {{(make-html-header 1)}}.  Function to turn wiki headers into HTML.  TODO: Document better.
     125; {{data-output-func}}: Defaults to {{(constantly stream-null)}}.  Use that for now.  This is used when an extension needs to generate a file, which currently only happens for the {{math}} tags.  TODO: Document better.
     126; {{check-exists?}}: Defaults to {{(constantly #t)}}.  It is a procedure given a pathname.  It should check to see if the file exists in the wiki.  This is used to know if local links should be rendered in red (meaning the file doesn't exist) or in the regular color.
     127; {{extensions}}: Defaults to {{(make-hash-table)}}.  Contains the list of extensions loaded that stream-wiki will use while rendering files.  They should be loaded with {{(load-extensions-from-file)}}.
     128; {{url-adjust}}: Defaults to {{identity}}.  stream-wiki uses this for relative URLs in the wiki.  For example, if you want to turn all relative links into absolute links with some specific URL, use this function.  The procedure gets passed the link as a stream of characters and is expected to return a stream of characters itself.
     129
     130== Converting from wiki to LaTeX
     131
     132== Converting from wiki to Plain Text
     133
     134<enscript highlight=scheme>(wiki->text input [human-readable])</enscript>
     135
     136Remove all wiki markup from the stream of characters {{input}} and produce a corresponding stream of characters for its associated representation as a plain-text file.
     137This is useful, for example, to register the file in a search database (see, for example, the [[estraier|estraier egg]]).
     138
     139{{human-readable}} specifies whether the resulting file will be optimized to be read by a human (eg. a user reading it over a text-only interface) or a computer (eg. an indexer using the [[estraier]] egg).
     140
     141== Analyzing wiki files
     142
     143=== Obtaining links
     144
     145<enscript highlight=scheme>(wiki-links input)</enscript>
     146
     147Return a stream with all local (not external) links in the stream of characters {{input}}.
     148Each element in the stream is a stream of characters with the destination of the link.
     149
     150=== Obtaining sections
     151
     152=== Obtaining tags
     153
     154=== Obtaining a table of contents
     155
     156== Version history
     157
     158; 1.7 : Support for new types of extensions.  This shouldn't be visible to stream-wiki users that don't use the extensions code advancedly (ie. only svnwiki should view this change).  In the future I will strip the extensions code to a separate egg, I think.
     159; 1.6 : Added {{wiki->text}}, small fix in URL handling, adjust URLs in images (using {{check-exists?}} and {{url-adjust}}, don't strip HTML comments (since some users have reported they need to be able to include HTML comments in their wiki files, eg. for TOL).
     160; 1.5 : Added {{url-adjust}} parameter for local/relative URLs.
     161; 1.4 : Fixed a typo that was causing crashes during Texi/LaTeX output (again, the <=> string); made extensions see macros; more fixes in URL recognition; many fixes to the extension files.
     162; 1.3 : Improvements in the recognition of URLs, the generation of TexVC math image files, add support for external extensions, preliminary menus and navigation for texi-driver (by Graham Fawcett), fixed typos that were causing problems with <blockquote> and LaTeX output and with the string <=>.
     163; 1.2 : Improved the parsing of email addresses and URLs (which in some cases failed to recognized them as such).  Parse the result of evaluating linktypes as wiki format recursively (detecting infinite recursion and failing gracefully).
     164; 1.1 : Lots of improvements, way too many to list here. :-/
     165; 1.0 : First public release
  • wiki/wiki-syntax

    r2408 r2427  
    1 http://pb2.forenshop.net/cgi-bin/forenserver/foren/F_2359/cutecast.pl  <a href="http://pb2.forenshop.net/cgi-bin/forenserver/foren/F_2359/cutecast.pl">Christmas gifts</a> Christmas gifts
     1[[tags:wiki syntax]]
     2[[toc:]]
     3
     4== Introduction
     5
     6This document describes the syntax used by [[http://wiki.freaks-unidos.net/svnwiki|svnwiki]] to represent
     7contents in a wiki.
     8
     9If you have suggestions to improve svnwiki, please [[http://wiki.freaks-unidos.net/svnwiki-suggestions|let us know]].
     10
     11== Text Formatting
     12
     13=== Creating a paragraph
     14
     15To create a paragraph simply enter the text. You can place a single
     16newline anywhere in your paragraph and it will have no effect.
     17
     18To split a paragraph use two consecutive newlines (an empty line).
     19
     20The above two paragraphs could have been written as:
     21
     22 To create a paragraph simply enter the text.
     23 You can place a single newline anywhere in
     24 your paragraph and it will have no effect.
     25
     26 To split a paragraph use two consecutive newlines (an empty line).
     27
     28=== Creating titles
     29
     30To create a title, use a line starting with two, three, four or five equal signs:
     31
     32 == Title Name
     33 === Sub-title Name
     34 ==== Sub-sub-title Name
     35 ===== Sub-sub-sub-title Name
     36
     37If you use two equal signs, you will create a top-level title.  The more
     38equal signs you use, the less important your title will be.
     39
     40An alternative option for creating titles is using ''<nowiki>&lt;h1&gt;</nowiki>''
     41''<nowiki>&lt;h2&gt;</nowiki>'', ''<nowiki>&lt;h3&gt;</nowiki>'',
     42''<nowiki>&lt;h4&gt;</nowiki>'', ''<nowiki>&lt;h5&gt;</nowiki>'' and
     43''<nowiki>&lt;h6&gt;</nowiki>'' tags.
     44There is one important difference with the
     45previous syntax: tags created in this manner will not be included in the
     46articles' Table of Contents.  For this reason, you are encouraged not
     47to use this syntax unless you have specific reasons.
     48
     49=== Font styles (bold, italics, technical)
     50
     51To create '''bold''' text, use three apostrophes ('), as in: ''<nowiki>'''bold'''</nowiki>''.  Use two for ''italics'': ''<nowiki>''italics''</nowiki>''.  For {{type-written
     52text}}, which is useful for technical documentation, use
     53this syntax: ''<nowiki>{{text}}</nowiki>''.
     54
     55Related with type-written text, you can mark entire paragraphs
     56to be shown in type-written text.  This is used for lines that
     57correspond to program's output or commands that a user should
     58enter.  To active this all you need to do is start each line in
     59your paragraph with a space.  Paragraphs written in this manner
     60are shown as follows:
     61
     62 > uptime
     63  23:04:03 up 14:18,  1 user,  load average: 0.02, 0.06, 0.18
     64 > uname -a
     65 Linux azul 2.6.10 #1 Mon Feb 7 00:20:16 COT 2005 i686 GNU/Linux
     66 >
     67
     68=== Font size (big, small)
     69
     70To increase or decrease the size of the text you can wrap it around
     71a pair of ''<nowiki>&lt;big&gt;...&lt;/big&gt;</nowiki>'' and
     72''<nowiki>&lt;small&gt;...&lt;/small&gt;</nowiki>'' tags respectively.
     73
     74Example:
     75
     76 <nowiki>&lt;big&gt;This text is big...&lt;/big&gt;</nowiki>
     77
     78 <nowiki>&lt;small&gt;... and this is small.&lt;/small&gt;</nowiki>
     79
     80This is shown as:
     81
     82<big>This text is big...</big>
     83
     84<small>... and this is small.</small>
     85
     86 
     87=== Centering text
     88
     89To center text you can wrap multiple paragraphs (and lists, titles, etc.) with a pair of ''<nowiki>&lt;center&gt;...&lt;/center&gt;</nowiki>'' tags, as in:
     90
     91 <center>
     92 some text
     93 * item
     94 * another
     95 </center>
     96
     97This will be shown as:
     98
     99<center>
     100some text
     101* item
     102* another
     103</center>
     104
     105=== Special characters
     106
     107svnwiki automatically replaces certain sequences of characters with HTML
     108entities that browsers display better.  The following is the list of sequences:
     109
     110 <nowiki>(R) (C) <- <-> -> <= <=> => -- --- << 1/4 1/2 3/4 >></nowiki>
     111
     112These sequences are replaced with these characters respectively:
     113(R) (C) <- <-> -> <= <=> => -- --- << 1/4 1/2 3/4 >>
     114
     115 
     116=== Quotes
     117
     118If you want to make quotes, you can start your lines with ''>'' (the
     119standard character for email quotation).  Alternatively, you can
     120surround it with <nowiki>&lt;blockquote&gt; ... &lt;/blockquote&gt;</nowiki>
     121
     122This text will be show as:
     123
     124> I am enough of an artist to draw freely upon my imagination.
     125> Imagination is more important than knowledge.
     126> Knowledge is limited.
     127> Imagination encircles the world.
     128test
     129
     130 
     131== Organizing your article (Table of contents, lists, tables, horizontal lines)
     132
     133=== Table of Contents
     134
     135If you want to show the table of contents of an article, use the following
     136code:
     137
     138 <nowiki>[[toc:]]</nowiki>
     139
     140This will be replaced with the table of contents.  You can see an example at
     141the beginning of this page.
     142
     143=== Lists of items
     144
     145You can create lists of bullets or numbers by starting your lines with
     146asterisks or number signs:
     147
     148 * Some item
     149 * Another item
     150 ** A sub item
     151 ** Another sub item
     152 **# A numbered sub sub item
     153 **# Another numberd sub sub item
     154 * The last item
     155
     156The above list will be rendered as:
     157
     158* Some item
     159* Another item
     160** A sub item
     161** Another sub item
     162**# A numbered sub sub item
     163**# Another numberd sub sub item
     164* The last item
     165
     166As you can see, you can mix bullets and numbers lists any way you want.
     167
     168=== Lists of Definitions
     169
     170You can create a list of definitions by using multiple lines with the
     171following syntax:
     172
     173 ; ''TERM'' : ''DEFINITION''
     174
     175This is useful to give a list of terms along with their respective
     176definitions.
     177
     178Example:
     179
     180 ; Lassie : A very intelligent dog.
     181 ; Garfield : A pessimistic cat.
     182 ; Tux : A fearsome pinguin.
     183
     184This list is shown as:
     185
     186; Lassie : A very intelligent dog.
     187; Garfield : A pessimistic cat.
     188; Tux : A fearsome pinguin.
     189
     190=== Using tables
     191
     192You can create a table using the standard HTML syntax, based on the
     193<tt><nowiki>&lt;table&gt;</nowiki></tt>,
     194<tt><nowiki>&lt;tr&gt;</nowiki></tt> and
     195<tt><nowiki>&lt;td&gt;</nowiki></tt> tags.
     196
     197Example:
     198
     199 <table>
     200 <tr><th>Country</th><th>Number of cities</th></tr>
     201 <tr><td>Colombia</td><td>16</td></tr>
     202 <tr><td>Argentina</td><td>16</td></tr>
     203 <tr><td>Brasil</td><td>31</td></tr>
     204 </table>
     205
     206This is shown as:
     207
     208<table>
     209<tr><th>Country</th><th>Number of cities</th></tr>
     210<tr><td>Colombia</td><td>17</td></tr>
     211<tr><td>Argentina</td><td>12</td></tr>
     212<tr><td>Brasil</td><td>31</td></tr>
     213</table>
     214
     215Currently it is not possible to include parameters in any of the above tags;
     216this will probably be fixed in a future release.
     217
     218=== Horizontal dividing line
     219
     220You can include an horizontal dividing line with the followking markup:
     221
     222 ----
     223
     224This is shown as:
     225
     226----
     227
     228== Creating Links
     229
     230To create links use ''<nowiki>[[dst]]</nowiki>'', where ''dst'' is the
     231link target.  You can use relative or absolute URLs.
     232
     233If you want your link to display a text other than its target, use
     234''<nowiki>[[dst|Some text]]</nowiki>''.  This will be shown as:
     235[[dst|Some text]].
     236
     237Here are some examples:
     238
     239* <tt><nowiki>[[http://wiki.freaks-unidos.net/]]</nowiki></tt>
     240* <tt><nowiki>[[default|Home Page]]</nowiki></tt>
     241
     242== Including Images
     243
     244To include images in your articles use the following text:
     245
     246 ''<nowiki>[[image:URL|ALT]]</nowiki>''
     247
     248Here you'll need to replace ''URL'' with the URL of your image (which can
     249be absolute or relative) and ''ALT'' with a simple description of the image.
     250
     251Example:
     252 ''<nowiki>[[image:http://azul.freaks-unidos.net/files/svnwiki-small.png|Image]]</nowiki>''
     253
     254Renders this:
     255
     256[[image:http://azul.freaks-unidos.net/files/svnwiki-small.png|Image]]
     257
     258== Svnwiki and programming languages
     259
     260=== Syntax coloring
     261
     262You can embbed code or information in many file formats or programming languages;
     263Svnwiki will use [[http://people.ssh.com/mtr/genscript/|GNU Enscript]] to highlight it.
     264Use the <nowiki>&lt;enscript&gt;</nowiki> tag and pass the programming language or file format as the highlight parameter.
     265
     266For example,
     267
     268 <nowiki>&lt;enscript highlight=c&gt;</nowiki>
     269 static void
     270 pinst_check ()
     271 {
     272   pid_t pinst = pinst_find();
     273   if (pinst != -1 && kill(pinst, 0) != -1)
     274     printf("%s: server alive (%d)\n", program_name, pinst);
     275   else
     276     printf("%s: server is not running\n", program_name);
     277   exit(EXIT_SUCCESS);
     278 }
     279 <nowiki>&lt;/enscript&gt;</nowiki>
     280
     281is shown as:
     282
     283<enscript highlight=c>
     284static void
     285pinst_check ()
     286{
     287  pid_t pinst = pinst_find();
     288  if (pinst != -1 && kill(pinst, 0) != -1)
     289    printf("%s: server alive (%d)\n", program_name, pinst);
     290  else
     291    printf("%s: server is not running\n", program_name);
     292  exit(EXIT_SUCCESS);
     293}
     294</enscript>
     295
     296Note that in order for this to work you'll need to have GNU Enscript installed.
     297If you don't, the information will be shown with no coloring.
     298
     299The following languages are supported: ada asm awk bash c changelog cpp csh delphi diff diffs diffu dylan eiffel elisp erlang forth fortran fortran_pp haskell html icon idl inf java javascript ksh lua m4 mail makefile matlab nroff oberon2 objc outline oz pascal perl postscript pyrex python rfc scheme sh skill smalltalk sml sql states synopsys tcl tcsh tex vba verilog vhdl vrml wmlscript zsh.
     300
     301=== Embedding Scheme code
     302
     303It is possible to embbed entire programs in
     304the Scheme programming language inside the wiki pages.
     305svnwiki will execute it securely (in a safe environment)
     306and replace it with whatever output it produces.
     307
     308For example, you could include code that prints some numbers:
     309
     310 <nowiki>&lt;scheme&gt;</nowiki>
     311<enscript highlight=scheme>
     312(let loop ((a 0) (b 1) (i 0))
     313  (cond
     314    ((< i 10) (format #t "<p>~A: ~A~%" i a) (loop b (+ a b) (+ i 1)))))
     315</enscript>
     316 <nowiki>&lt;/scheme&gt;</nowiki>
     317
     318This code would get replaced with the following:
     319
     320<scheme>
     321(let loop ((a 0) (b 1) (i 0))
     322  (cond
     323    ((< i 10)
     324     (format #t "<p>~A: ~A~%" i a)
     325     (loop b (+ a b) (+ i 1)))))
     326</scheme>
     327
     328Note that the output of the Scheme code will be included literally
     329in the page (so you can output HTML tags directly).
     330
     331=== Literal code
     332
     333To include something in a page literally (preventing svnwiki to convert it
     334from wiki to HTML), place it inside a <nowiki>&lt;nowiki&gt; ... &lt;/nowiki&gt;</nowiki> pair.
     335
     336----
     337
     338If you have suggestions to improve Svnwiki, please [[http://wiki.freaks-unidos.net/svnwiki-suggestions|let us know]].
Note: See TracChangeset for help on using the changeset viewer.