librarystandards.py@fde18c4d6784
librarystandards.py
Fri, 18 Sep 2020 23:51:45 +0300
- author
- Teemu Piippo <teemu@hecknology.net>
- date
- Fri, 18 Sep 2020 23:51:45 +0300
- changeset 145
- fde18c4d6784
- parent 96
-
70f8049623ec
- permissions
- -rw-r--r--
refactoring: moved context-dependant data to new class LDrawContext. ldcheck no longer writes the config file, and looks for it in sensible locations like ~/.config and /etc. LDraw libraries can now be specified on the command line.
from configparser import ConfigParser
from pathlib import Path
from os.path import dirname
ini_path = Path(dirname(__file__)) / 'library-standards.ini'
library_standards = ConfigParser()
with ini_path.open() as file:
library_standards.read_file(file)