Skip to content

Commit

Permalink
define outdir (file output)
Browse files Browse the repository at this point in the history
If they specify output to a file that would end up in script root.
output is sent to out dir (git ignored)
May make more sense to put all the Path defs in constants.py
For now I added it to config.py with the outher paths
  • Loading branch information
Pack3tL0ss committed Dec 11, 2020
1 parent 21dbf17 commit 2af5f8a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions lib/centralCLI/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ class Config:
def __init__(self, base_dir: Path = None):
self.base_dir = base_dir or Path(__file__).parent.parent.parent
self.dir = self.base_dir.joinpath("config")
self.outdir = self.base_dir / "out"
self.file = self.dir.joinpath("config.yaml")
for ext in ["yml", "json"]:
if self.dir.joinpath(f"config.{ext}").exists():
Expand Down
5 changes: 5 additions & 0 deletions out/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# ignore everything in this dir
*

# except self
!.gitignore

0 comments on commit 2af5f8a

Please sign in to comment.