Skip to content

Commit e1f7a78

Browse files
committed
release-1.6.0
1 parent ad32ec8 commit e1f7a78

File tree

6 files changed

+18
-9
lines changed

6 files changed

+18
-9
lines changed

README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ Marcel's broccoli module for simplifying his coding.
1010
```
1111
-marcelbroccoli
1212
|-functions.py Custom functions
13-
|-load_env Load a `.env` file and log an error if any
1413
|-load_config_file Load a JSON configuration file and return config object
1514
|-starts_with Check if string starts with pattern (case sensitive or case insensitive)
1615
|-str2datetime Convert from all date and date time sources to date object

marcelbroccoli/README.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,6 @@ Marcel's broccoli module for simplifying his coding.
44

55
## Functions
66

7-
### `load_env()`
8-
9-
Load `.env` secret file.
10-
117
### `load_config_file(cfg_file:str)`
128

139
Load a JSON configuration and return a configuration object.

marcelbroccoli/functions.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,20 @@
1111
from . import logger
1212

1313

14+
'''
15+
Load configuration file.
16+
'''
17+
def load_config_file(cfg_file:str):
18+
cfg = None
19+
try:
20+
with open(cfg_file) as f:
21+
cfg = json.load(f)
22+
except Exception as e:
23+
logger.log("Error: could not load configuration file '{}'. {}".format(cfg_file, e))
24+
25+
return cfg
26+
27+
1428
'''
1529
Set working dir to folder and return working_dir
1630
'''

marcelbroccoli/logger.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ def debug(self, msg:str):
156156
# start log
157157
logger.info("Welcome to the Logger Test Script.")
158158
logger.info("Log file is '{}'".format(log_file))
159-
print("Log level: {}".format(marcellg.logger.level))
159+
print("Log level: {}".format(logger.level))
160160

161161
logger.info("Script execution completed with exit code {}.".format(errorcode))
162162
sys.exit(errorcode)

marcelbroccoli/version.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
# meta data
22
__author__ = "Marcel Gerber"
3-
__date__ = "2024-04-05"
4-
__version__ = "1.5.1"
3+
__date__ = "2024-04-10"
4+
__version__ = "1.6.0"

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
setup(
44
name="marcelbroccoli",
5-
version="1.5.1",
5+
version="1.6.0",
66
description="Marcel's custom functions",
77
url="https://github.com/chemage/marcelbroccoli",
88
author="Marcel Gerber",

0 commit comments

Comments
 (0)