Hide keyboard shortcuts

Hot-keys on this page

r m x p   toggle line displays

j k   next/prev highlighted chunk

0   (zero) top of page

1   (one) first highlighted chunk

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

import configparser 

import os 

from pathlib import Path 

 

from .helpers import project_dir 

 

__author__ = 'Artur Barseghyan' 

__copyright__ = '2019 Artur Barseghyan' 

__license__ = 'GPL-2.0-only OR LGPL-2.0-or-later' 

__all__ = ( 

'CONFIG', 

'CONFIG_INI_PATH', 

) 

CONFIG = configparser.ConfigParser() 

HOME_PATH = Path.home() 

CONFIG_INI_PATH = HOME_PATH.joinpath('.matyan.ini') 

if CONFIG_INI_PATH.exists() and CONFIG_INI_PATH.is_file(): 

CONFIG.read(str(CONFIG_INI_PATH)) 

 

LOCAL_CONFIG = configparser.ConfigParser() 

 

LOCAL_CONFIG_INI_PATH = os.path.join(os.getcwd(), '.matyan.ini') 

 

if not os.path.exists(LOCAL_CONFIG_INI_PATH): 

LOCAL_CONFIG_INI_PATH = project_dir('.matyan.ini') 

 

LOCAL_CONFIG.read(LOCAL_CONFIG_INI_PATH) 

 

CONFIG.update(LOCAL_CONFIG)