esmljaos / flexirest (http://aspektratio.net/flexirest)
The medium-featured, flexible reStructuredText utility
Clone this repository (size: 427.3 KB): HTTPS / SSH
$ hg clone http://bitbucket.org/esmljaos/flexirest/
| commit 190: | 036d1124f510 |
| parent 189: | f5247ff6ed88 |
| branch: | default |
check_writers() now works correctly, fixed typo in HtmlStrategy
Changed (Δ214 bytes):
raw changeset »
flexirest/strategies.py (6 lines added, 12 lines removed)
Up to file-list flexirest/strategies.py:
| … | … | @@ -55,7 +55,7 @@ class GeneralWriterStrategy(object): |
55 |
55 |
class HtmlStrategy(GeneralWriterStrategy): |
56 |
56 |
|
57 |
57 |
description = 'HTML (docutils builtin)' |
58 |
writer_name = 'html4css |
|
58 |
writer_name = 'html4css1' |
|
59 |
59 |
|
60 |
60 |
class PseudoXmlStrategy(GeneralWriterStrategy): |
61 |
61 |
|
| … | … | @@ -167,7 +167,7 @@ def functional_strategies(): |
167 |
167 |
|
168 |
168 |
possible_writers = { |
169 |
169 |
'latex': LatexStrategy, |
170 |
' |
|
170 |
'xml': DocutilsXmlStrategy, |
|
171 |
171 |
'pdflatex': Latex2PDFStrategy, |
172 |
172 |
'xelatex': XeLaTeXStrategy, |
173 |
173 |
'odt': OdtStrategy, |
| … | … | @@ -177,19 +177,13 @@ possible_writers = { |
177 |
177 |
'rtf': RtfStrategy, |
178 |
178 |
} |
179 |
179 |
|
180 |
def check_writers(): |
|
181 |
functional = nonfunctional = {} |
|
182 |
for name, Strategy in possible_writers.iteritems(): |
|
183 |
print('NAME: %s' % name) |
|
180 |
def check_writers(writers=possible_writers): |
|
181 |
functional = {} |
|
182 |
nonfunctional = {} |
|
183 |
for name, Strategy in writers.iteritems(): |
|
184 |
184 |
if Strategy.isfunctional(): |
185 |
185 |
functional[name] = Strategy |
186 |
186 |
else: |
187 |
187 |
nonfunctional[name] = Strategy |
188 |
188 |
|
189 |
189 |
return functional, nonfunctional |
190 |
||
191 |
# def functional_strategies(): |
|
192 |
# for name, Strategy in possible_writers.iteritems(): |
|
193 |
# strategy = Strategy() |
|
194 |
# if strategy.isfunctional(): |
|
195 |
# yield name, strategy |
