added john in the author list of setup.py
This commit is contained in:
parent
db14fb94f3
commit
7ff15be075
@ -2,6 +2,7 @@
|
|||||||
Small code to handle colored text
|
Small code to handle colored text
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
|
||||||
bold = '\033[1m'
|
bold = '\033[1m'
|
||||||
end = '\033[0m'
|
end = '\033[0m'
|
||||||
|
|
||||||
@ -30,9 +31,9 @@ _dye = dye
|
|||||||
def _nodye(s, **kwargs):
|
def _nodye(s, **kwargs):
|
||||||
return s
|
return s
|
||||||
|
|
||||||
def color_setup(config):
|
def setup(enable = True):
|
||||||
global dye
|
global dye
|
||||||
if config.getboolean(configs.MAIN_SECTION, 'color'):
|
if enable:
|
||||||
dye = _dye
|
dye = _dye
|
||||||
else:
|
else:
|
||||||
dye = _nodye
|
dye = _nodye
|
@ -4,7 +4,7 @@ import os
|
|||||||
|
|
||||||
from ..repo import Repository
|
from ..repo import Repository
|
||||||
from .. import configs
|
from .. import configs
|
||||||
|
from .. import color
|
||||||
|
|
||||||
def parser(subparsers, config):
|
def parser(subparsers, config):
|
||||||
parser = subparsers.add_parser('init',
|
parser = subparsers.add_parser('init',
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
from .. import repo
|
from .. import repo
|
||||||
import color
|
from .. import color
|
||||||
|
|
||||||
def parser(subparsers, config):
|
def parser(subparsers, config):
|
||||||
parser = subparsers.add_parser('remove', help='removes a paper')
|
parser = subparsers.add_parser('remove', help='removes a paper')
|
||||||
|
@ -49,11 +49,11 @@ def get_plugins(cfg):
|
|||||||
return cfg.get(MAIN_SECTION, 'plugins').split()
|
return cfg.get(MAIN_SECTION, 'plugins').split()
|
||||||
|
|
||||||
|
|
||||||
def get_boolean(value, default):
|
def get_boolean(value, default = False):
|
||||||
value = str(value).lower()
|
value = str(value).lower()
|
||||||
if value in ('yes', 'true', 't', 'y', '1'):
|
if value in ('yes', 'true', 't', 'y', '1'):
|
||||||
return True
|
return True
|
||||||
elif value in ('no', 'false', 'f', 'n', '0'):
|
elif value in ('no', 'false', 'f', 'n', '0'):
|
||||||
return False
|
return False
|
||||||
else:
|
else:
|
||||||
return 0
|
return default
|
||||||
|
@ -12,7 +12,8 @@ class UI:
|
|||||||
|
|
||||||
def __init__(self, config):
|
def __init__(self, config):
|
||||||
self.encoding = _encoding(config)
|
self.encoding = _encoding(config)
|
||||||
color.setup(config)
|
color_enable = configs.get_boolean(config.get('papers', 'color'))
|
||||||
|
color.setup(color_enable)
|
||||||
|
|
||||||
def print_(self, *strings):
|
def print_(self, *strings):
|
||||||
"""Like print, but rather than raising an error when a character
|
"""Like print, but rather than raising an error when a character
|
||||||
|
2
setup.py
2
setup.py
@ -4,7 +4,7 @@ from setuptools import setup, find_packages
|
|||||||
|
|
||||||
setup(name='papers',
|
setup(name='papers',
|
||||||
version='1',
|
version='1',
|
||||||
author='Fabien Benureau, Olivier Mangin',
|
author='Fabien Benureau, Olivier Mangin, Jonathan Grizou',
|
||||||
author_email='fabien.benureau+inria@gmail.com',
|
author_email='fabien.benureau+inria@gmail.com',
|
||||||
url='',
|
url='',
|
||||||
description='research papers manager',
|
description='research papers manager',
|
||||||
|
Loading…
x
Reference in New Issue
Block a user