1 | Filter Tests |
---|
2 | ============ |
---|
3 | |
---|
4 | |
---|
5 | == Toy filter example from User Guide |
---|
6 | |
---|
7 | [code,python] |
---|
8 | ---------------------------------------------- |
---|
9 | ''' A multi-line |
---|
10 | comment.''' |
---|
11 | def sub_word(mo): |
---|
12 | ''' Single line comment.''' |
---|
13 | word = mo.group('word') # Inline comment |
---|
14 | if word in keywords[language]: |
---|
15 | return quote + word + quote |
---|
16 | else: |
---|
17 | return word |
---|
18 | ---------------------------------------------- |
---|
19 | |
---|
20 | |
---|
21 | == Pychart Chart generations from FAQ |
---|
22 | |
---|
23 | // Generate chart image file. |
---|
24 | sys2::[python "{indir}/barchart.py" --format=png --output="{outdir={indir}}/{imagesdir=}{imagesdir?/}barchart.png" --scale=2] |
---|
25 | |
---|
26 | // Display chart image file. |
---|
27 | image::barchart.png[] |
---|
28 | |
---|
29 | |
---|
30 | == Graphviz Graphs |
---|
31 | |
---|
32 | .Simple graph |
---|
33 | ["graphviz", "graphviz1.png", alt="Graphviz->AsciiDoc->HTML"] |
---|
34 | --------------------------------------------------------------------- |
---|
35 | digraph G { rankdir=LR; Graphviz->AsciiDoc->HTML} |
---|
36 | --------------------------------------------------------------------- |
---|
37 | |
---|
38 | .Not so simple graph |
---|
39 | ["graphviz", "graphviz2.png"] |
---|
40 | --------------------------------------------------------------------- |
---|
41 | digraph automata_0 { |
---|
42 | size ="8.5, 11"; |
---|
43 | node [shape = circle]; |
---|
44 | 0 [ style = filled, color=lightgrey ]; |
---|
45 | 2 [ shape = doublecircle ]; |
---|
46 | 0 -> 2 [ label = "a " ]; |
---|
47 | 0 -> 1 [ label = "other " ]; |
---|
48 | 1 -> 2 [ label = "a " ]; |
---|
49 | 1 -> 1 [ label = "other " ]; |
---|
50 | 2 -> 2 [ label = "a " ]; |
---|
51 | 2 -> 1 [ label = "other " ]; |
---|
52 | "Machine: a" [ shape = plaintext ]; |
---|
53 | } |
---|
54 | --------------------------------------------------------------------- |
---|
55 | |
---|
56 | |
---|
57 | == Music filter |
---|
58 | |
---|
59 | .A tune generated from ABC notation |
---|
60 | [music,music1.png] |
---|
61 | --------------------------------------------------------------------- |
---|
62 | T:The Butterfly |
---|
63 | R:slip jig |
---|
64 | C:Tommy Potts |
---|
65 | H:Fiddle player Tommy Potts made this tune from two older slip jigs, |
---|
66 | H:one of which is called "Skin the Peelers" in Roche's collection. |
---|
67 | D:Bothy Band: 1975. |
---|
68 | M:9/8 |
---|
69 | K:Em |
---|
70 | vB2(E G2)(E F3)|B2(E G2)(E F)ED|vB2(E G2)(E F3)|(B2d) d2(uB A)FD:| |
---|
71 | |:(vB2c) (e2f) g3|(uB2d) (g2e) (dBA)|(B2c) (e2f) g2(ua|b2a) (g2e) (dBA):| |
---|
72 | |:~B3 (B2A) G2A|~B3 BA(uB d)BA|~B3 (B2A) G2(A|B2d) (g2e) (dBA):| |
---|
73 | --------------------------------------------------------------------- |
---|
74 | |
---|
75 | <<X1,Link to following fragment>>. |
---|
76 | |
---|
77 | [[X1]] |
---|
78 | .A fragment generated from LilyPond source |
---|
79 | ["music", "music2.png", "ly", link="music2.ly"] |
---|
80 | --------------------------------------------------------------------- |
---|
81 | \version "2.10.0" |
---|
82 | \paper { |
---|
83 | ragged-right = ##t |
---|
84 | } |
---|
85 | { |
---|
86 | \time 3/4 |
---|
87 | \clef bass |
---|
88 | c2 e4 g2. f4 e d c2 r4 |
---|
89 | } |
---|
90 | --------------------------------------------------------------------- |
---|