This commit is contained in:
enkore 2013-02-24 22:40:29 +01:00
parent a89b421ebb
commit 582a35e412
5 changed files with 17 additions and 11 deletions

View File

@ -36,6 +36,9 @@ as you like.
## Modules
Many modules let you modify the output via a
[format string](http://docs.python.org/3/library/string.html#formatstrings).
### backlight
@ -57,7 +60,7 @@ Available formatters:
### battery
This class uses the /proc/acpi/battery interface to check for the
This class uses the /sys/class/power_supply/…/uevent interface to check for the
battery status
@ -95,9 +98,9 @@ transforms is a optional dict of callables taking a single argument (a dictionar
of all components). The return value is bound to the key.
* `format`format string
* `components`List of tripels
* `transforms` — List of pairs
* `format` (required)
* `components` (required)
* `transforms`
* `base_path` — (default: `/`)
* `color` — (default: `#FFFFFF`)
* `interval` — (default: `5`)

View File

@ -36,6 +36,9 @@ as you like.
## Modules
Many modules let you modify the output via a
[format string](http://docs.python.org/3/library/string.html#formatstrings).
!!module_doc!!
## Contribute

View File

@ -1,7 +1,7 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from i3pystatus import IntervalModule
from . import IntervalModule
from .core.util import PrefixedKeyDict
class Battery:
@ -54,7 +54,7 @@ class RemainingCalculator:
class BatteryChecker(IntervalModule):
"""
This class uses the /proc/acpi/battery interface to check for the
This class uses the /sys/class/power_supply//uevent interface to check for the
battery status
"""

View File

@ -21,10 +21,10 @@ class File(IntervalModule):
"""
settings = (
("format", "format string"),
("components", "List of tripels"),
("transforms", "List of pairs"),
("base_path", ""),
"format",
"components",
"transforms",
"base_path",
"color", "interval",
)
required = ("format", "components")

View File

@ -130,7 +130,7 @@ def get_all(module_path, heading, finder=None):
def generate_doc_for_module(module_path, heading="###", finder=None):
return "".join(map(str, get_all(module_path, heading, finder)))
with open("template.md", "r") as template:
with open("README.tpl.md", "r") as template:
tpl = template.read()
tpl = tpl.replace("!!module_doc!!", generate_doc_for_module(i3pystatus.__path__))