Skip to content

Commit

Permalink
feat: option for not opening output folder
Browse files Browse the repository at this point in the history
  • Loading branch information
Tohrusky committed Sep 23, 2024
1 parent 531b864 commit e7b4a16
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ pip install Final2x-core
# Use

```shell
usage: Final2x-core [-h] [-b BASE64] [-j JSON] [-y YAML] [-o]
usage: Final2x-core [-h] [-b BASE64] [-j JSON] [-y YAML] [-l] [-c] [-n]

when para is not specified, the config.yaml file in the directory will be read automatically

Expand All @@ -46,6 +46,7 @@ optional arguments:
-y YAML, --YAML YAML yaml config file path
-l, --LOG save log
-c, --CACHE cache models
-n, --NOTOPENFOLDER don't open output folder
```
# Config
Expand Down
6 changes: 4 additions & 2 deletions src/Final2x_core/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
parser.add_argument("-y", "--YAML", help="yaml config file path", type=str)
parser.add_argument("-l", "--LOG", help="save log", action="store_true")
parser.add_argument("-c", "--CACHE", help="cache models", action="store_true")
parser.add_argument("-n", "--NOTOPENFOLDER", help="don't open output folder", action="store_true")
args = parser.parse_args()

if args.CACHE:
Expand Down Expand Up @@ -79,8 +80,9 @@ def main() -> None:

logger.success("______SR_COMPLETED______")

OP = Path(config.outputpath) / "outputs"
open_folder(str(OP))
if not args.NOTOPENFOLDER:
OP = Path(config.outputpath) / "outputs"
open_folder(str(OP))


if __name__ == "__main__":
Expand Down

0 comments on commit e7b4a16

Please sign in to comment.