File tree 3 files changed +12
-4
lines changed
3 files changed +12
-4
lines changed Original file line number Diff line number Diff line change @@ -95,7 +95,7 @@ pre-commit install
95
95
96
96
## Font management
97
97
98
- Fonts are managed via [ dymoprint .ini] ( dymoprint .ini) . This should be placed in your
98
+ Fonts are managed via [ labelle .ini] ( labelle .ini) . This should be placed in your
99
99
config folder (normally ` ~/.config ` ). An example file is provided here.
100
100
101
101
You may choose any TTF Font you like
File renamed without changes.
Original file line number Diff line number Diff line change 1
1
import os
2
2
import re
3
+ import warnings
3
4
from configparser import ConfigParser
4
5
5
6
from appdirs import user_config_dir
@@ -18,11 +19,18 @@ def font_filename(flag):
18
19
}
19
20
20
21
conf = ConfigParser (style_to_file )
21
- CONFIG_FILE = os .path .join (user_config_dir (), "dymoprint.ini" )
22
- if conf .read (CONFIG_FILE ):
22
+ old_config_file = os .path .join (user_config_dir (), "dymoprint.ini" )
23
+ config_file = os .path .join (user_config_dir (), "labelle.ini" )
24
+ if os .path .exists (old_config_file ) and not os .path .exists (config_file ):
25
+ warnings .warn (
26
+ f"Old config file found at { old_config_file } . "
27
+ f"Please rename it to { config_file } "
28
+ )
29
+ config_file = old_config_file
30
+ if conf .read (config_file ):
23
31
# reading FONTS section
24
32
if "FONTS" not in conf .sections ():
25
- die ('! config file "%s" not valid. Please change or remove.' % CONFIG_FILE )
33
+ die ('! config file "%s" not valid. Please change or remove.' % config_file )
26
34
for style in style_to_file .keys ():
27
35
style_to_file [style ] = conf .get ("FONTS" , style )
28
36
You can’t perform that action at this time.
0 commit comments