From 18062dd4162d4889608ab67416e2b434b56a609e Mon Sep 17 00:00:00 2001 From: schroeji Date: Fri, 25 Sep 2015 20:22:26 +0200 Subject: [PATCH] Moved the docstring and added usage examples. --- i3pystatus/updates/yaourt.py | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/i3pystatus/updates/yaourt.py b/i3pystatus/updates/yaourt.py index 4164731..699c466 100644 --- a/i3pystatus/updates/yaourt.py +++ b/i3pystatus/updates/yaourt.py @@ -1,15 +1,25 @@ -""" -This module counts the available updates using yaourt. -By default it will only count aur packages. -If you want to count both pacman and aur packages set the variable -count_only_aur = False -""" import re from i3pystatus.core.command import run_through_shell from i3pystatus.updates import Backend class Yaourt(Backend): + """ + This module counts the available updates using yaourt. + By default it will only count aur packages. Thus it can be used with the pacman backend like this: + + from i3pystatus.updates import pacman, yaourt + status.register("updates", + backends = [pacman.Pacman(), yaourt.Yaourt()]) + + If you want to count both pacman and aur packages with this module you can set the variable + count_only_aur = False like this: + + from i3pystatus.updates import yaourt + status.register("updates", + backends = [yaourt.Yaourt(False)]) + """ + def __init__(self, aur_only=True): self.aur_only = aur_only