Okay, that didn't work

This commit is contained in:
enkore 2014-01-16 23:11:09 +01:00
parent 774715a8c8
commit 9273700ec1
2 changed files with 66 additions and 66 deletions

View File

@ -332,7 +332,7 @@ Settings:
:alert_format_title: The title of the notification, all formatters can be used (default: ``Low battery``) :alert_format_title: The title of the notification, all formatters can be used (default: ``Low battery``)
:alert_format_body: The body text of the notification, all formatters can be used (default: ``Battery {battery_ident} has only {percentage:.2f}% ({remaining:%E%hh:%Mm}) remaining!``) :alert_format_body: The body text of the notification, all formatters can be used (default: ``Battery {battery_ident} has only {percentage:.2f}% ({remaining:%E%hh:%Mm}) remaining!``)
:path: Override the default-generated path (default: ``None``) :path: Override the default-generated path (default: ``None``)
:status: A dictionary mapping ('DIS', 'CHR', 'FULL') to alternative names (default: ``{'DIS': 'DIS', 'FULL': 'FULL', 'CHR': 'CHR'}``) :status: A dictionary mapping ('DIS', 'CHR', 'FULL') to alternative names (default: ``{'CHR': 'CHR', 'FULL': 'FULL', 'DIS': 'DIS'}``)
@ -565,7 +565,7 @@ Settings:
:host: (default: ``localhost``) :host: (default: ``localhost``)
:port: MPD port (default: ``6600``) :port: MPD port (default: ``6600``)
:format: formatp string (default: ``{title} {status}``) :format: formatp string (default: ``{title} {status}``)
:status: Dictionary mapping pause, play and stop to output (default: ``{'stop': '◾', 'pause': '▷', 'play': '▶'}``) :status: Dictionary mapping pause, play and stop to output (default: ``{'play': '▶', 'stop': '◾', 'pause': '▷'}``)

View File

@ -84,7 +84,7 @@ class Setting:
if self.required: if self.required:
attrs.append("required") attrs.append("required")
if self.default is not self.sentinel: if self.default is not self.sentinel:
attrs.append("default: '{default}'".format(default=self.default)) attrs.append("default: ``{default}``".format(default=self.default))
formatted = ":{name}: {doc}".format(name=self.name, doc=self.doc) formatted = ":{name}: {doc}".format(name=self.name, doc=self.doc)
if attrs: if attrs:
@ -132,6 +132,6 @@ with open("README.tpl.rst", "r") as template:
"!!module_doc!!", generate_doc_for_module(i3pystatus.__path__)) "!!module_doc!!", generate_doc_for_module(i3pystatus.__path__))
finder = ClassFinder(baseclass=i3pystatus.mail.Backend) finder = ClassFinder(baseclass=i3pystatus.mail.Backend)
tpl = tpl.replace("!!i3pystatus.mail!!", generate_doc_for_module( tpl = tpl.replace("!!i3pystatus.mail!!", generate_doc_for_module(
i3pystatus.mail.__path__, "~", finder, ["Backend"]).replace("\n", "\n")) i3pystatus.mail.__path__, "~", finder, ["Backend"]))
with open("README.rst", "w") as output: with open("README.rst", "w") as output:
output.write(tpl + "\n") output.write(tpl + "\n")