Skip to content

Commit

Permalink
code: outfile name to envvars
Browse files Browse the repository at this point in the history
  • Loading branch information
matiusz committed May 20, 2024
1 parent a751368 commit ef2ab7c
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
2 changes: 2 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ jobs:
command: python3 -m songbook.apps.create_pdf
environment:
SONGBOOK_DATA_DIR: hk-songbook
SONGBOOK_TITLE: hk-songbook
- store_artifacts:
path: songbook.pdf
destination: hk-songbook.pdf
Expand All @@ -23,6 +24,7 @@ jobs:
command: python3 -m songbook.apps.create_pdf
environment:
SONGBOOK_DATA_DIR: spiewnik111adh
SONGBOOK_TITLE: spiewnik111adh
- store_artifacts:
path: songbook.pdf
destination: spiewnik111adh.pdf
Expand Down
1 change: 0 additions & 1 deletion config.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
{
"categoriesFile": "categories.json",
"imageFolder": ".images",
"outputFile": "songbook",
"appLogo": "songbook/data/global/images/guitar.ico"
},
"pdfSettings":
Expand Down
6 changes: 5 additions & 1 deletion songbook/src/obj/Config.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,13 @@ def loadFromDict(self, config):
self.dataFolder = "songbook/data/" + os.environ['SONGBOOK_DATA_DIR']
except KeyError:
self.dataFolder = 'songbook/data/hk-songbook'
try:
self.outputFile = os.environ['SONGBOOK_TITLE']
except KeyError:
self.outputFile = 'songbook'

self.categoriesFile = filePathConfig['categoriesFile']
self.imageFolder = filePathConfig['imageFolder']
self.outputFile = filePathConfig['outputFile']
self.appLogo = filePathConfig['appLogo']

pdfSettings = config['pdfSettings']
Expand Down

0 comments on commit ef2ab7c

Please sign in to comment.