File: lists.t

package info (click to toggle)
python-rst2ansi 0.1.5-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 252 kB
  • sloc: python: 779; makefile: 16; sh: 16
file content (151 lines) | stat: -rw-r--r-- 3,664 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
Docutils bullet list:
  $ echo "
  > Docutils Bullet List
  > 
  > - This is item 1 
  > - This is item 2
  > 
  > - Bullets are '-', '*' or '+'. 
  >   Continuing text must be aligned 
  >   after the bullet and whitespace.
  > 
  > Note that a blank line is required 
  > before the first item and after the 
  > last, but is optional between items.
  > " > paragraph.rst
  $ rst2ansi paragraph.rst
  Docutils Bullet List
  
    \u2022 This is item 1
    \u2022 This is item 2
    \u2022 Bullets are '-', '*' or '+'. Continuing text must be aligned after the
    bullet and whitespace.
  
  Note that a blank line is required before the first item and after the last, but
  is optional between items.

Docutils enumerated lists:
  $ echo "
  > Docutils Enumerated List
  > 
  > 3. This is the first item 
  > 4. This is the second item 
  > 5. Enumerators are arabic numbers, 
  >    single letters, or roman numerals 
  > 6. List items should be sequentially 
  >    numbered, but need not start at 1 
  >    (although not all formatters will 
  >    honour the first index). 
  > #. This item is auto-enumerated
  > " > paragraph.rst
  $ rst2ansi paragraph.rst
  Docutils Enumerated List
  
    3. This is the first item
    4. This is the second item
    5. Enumerators are arabic numbers, single letters, or roman numerals
    6. List items should be sequentially numbered, but need not start at 1
    (although not all formatters will honour the first index).
    7. This item is auto-enumerated

Test bullet list:
  $ echo "
  > Simple bullet list
  > 
  > * list 1
  > * list 2 with multiple
  >   lines
  > * list 3
  > " > paragraph.rst
  $ rst2ansi paragraph.rst
  Simple bullet list
  
    \u2022 list 1
    \u2022 list 2 with multiple lines
    \u2022 list 3

Test definition list:
  $ echo "
  > Definition list
  > 
  > Dinner
  >   An evening meal.
  > 
  > Lunch
  >   A meal
  >   typically
  >   taken
  >   mid day
  > 
  > Breakfast
  >   Morning meal that 'breaks' the overnight 'fast'.
  > " > paragraph.rst
  $ rst2ansi paragraph.rst
  Definition list
  
  Dinner
    An evening meal.
  
  Lunch
    A meal typically taken mid day
  
  Breakfast
    Morning meal that 'breaks' the overnight 'fast'.

Option list:
  $ echo "
  > Option List
  > 
  > -a            command-line option 'a' 
  > -b file       options can have arguments 
  >               and long descriptions 
  > --long        options can be long also 
  > --input file  long options can also have 
  >               arguments
  >               TODO: This should work with --input=file also
  > /V            DOS/VMS-style options too
  > --text        This is a long text that should span the line so that I can
  >               see if there is the correct word wrap.  If there
  >               isn't it could be problem, but maybe not.
  > " > paragraph.rst
  $ rst2ansi paragraph.rst
  Option List
  
  -a
      command-line option 'a'
  -b file
      options can have arguments and long descriptions
  --long
      options can be long also
  --input file
      long options can also have arguments TODO: This should work with
      --input=file also
  /V
      DOS/VMS-style options too
  --text
      This is a long text that should span the line so that I can see if there is
      the correct word wrap. If there isn't it could be problem, but maybe
      not.

Check Sub List:
  $ echo "
  > #. numbered
  > #. list
  > 
  >    #. and a
  >    #. sublist
  > 
  > #. end
  > 
  > * unordered
  > * list
  > " > paragraph.rst
  $ rst2ansi paragraph.rst
    1. numbered
    2. list
      1. and a
      2. sublist
    3. end
  
    \u2022 unordered
    \u2022 list