initial commit

This commit is contained in:
Von Random 2016-10-18 20:00:43 +03:00
commit 6be576aa63
4 changed files with 28 additions and 0 deletions

3
.gitignore vendored Normal file
View file

@ -0,0 +1,3 @@
__pycache__
*.iml
.idea

5
conf.ini Normal file
View file

@ -0,0 +1,5 @@
[main]
some_option = some value
[date]
format = %%A %%d %%H:%%M

6
plugins/date.py Normal file
View file

@ -0,0 +1,6 @@
import time
def run(conf):
fmt = conf['date']['format']
return time.strftime(fmt)

14
vdstatus.py Normal file
View file

@ -0,0 +1,14 @@
import sys
import os
import configparser
import importlib
import plugins
DEFAULT_CONFIG = os.path.join(os.environ['HOME'], 'IdeaProjects/vdstatus/conf.ini')
configuration = configparser.ConfigParser()
configuration.read(DEFAULT_CONFIG)
importlib.import_module('.date', 'plugins')
print(plugins.date.run(configuration))