1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
|
import argparse
from pathlib import Path
from dots_manager.config import Config
def parse_arguments() -> argparse.Namespace:
parser = argparse.ArgumentParser(description="cute dotfiles manager ✧˖°")
parser.add_argument(
"--compile", action="store_true", help="action: compile dotfiles"
)
parser.add_argument(
"--source",
type=Path,
default=Config.default_source_dir,
help=f"default: '{Config.default_source_dir}'",
)
parser.add_argument(
"--comp",
type=Path,
default=Config.default_compiled_dir,
help=f"default: '{Config.default_compiled_dir}'",
)
parser.add_argument(
"--stow", action="store_true", help="action: stow compiled dotfiles"
)
parser.add_argument(
"--clean", action="store_true", help="action: clean stowed dotfiles"
)
parser.add_argument(
"--target",
type=Path,
default=Config.default_target_dir,
help=f"default: '{Config.default_target_dir}'",
)
parser.add_argument(
"--verbose",
"-v",
action="store_true",
default=False,
help="enable verbose logging",
)
return parser.parse_args()
|