16
16
from ._builder import find_fragments , render_fragments , split_fragments
17
17
from ._git import remove_files , stage_newsfile
18
18
from ._project import get_project_name , get_version
19
- from ._settings import ConfigError , load_config_from_options
19
+ from ._settings import (
20
+ ConfigError ,
21
+ config_option_help ,
22
+ load_config_from_options ,
23
+ )
20
24
from ._writer import append_to_newsfile
21
25
22
26
@@ -30,11 +34,31 @@ def _get_date():
30
34
"draft" ,
31
35
default = False ,
32
36
flag_value = True ,
33
- help = "Render the news fragments, don't write to files, don't check versions." ,
37
+ help = (
38
+ "Render the news fragments to standard output. "
39
+ "Don't write to files, don't check versions."
40
+ ),
41
+ )
42
+ @click .option (
43
+ "--config" ,
44
+ "config_file" ,
45
+ default = None ,
46
+ metavar = "FILE_PATH" ,
47
+ help = config_option_help ,
48
+ )
49
+ @click .option (
50
+ "--dir" ,
51
+ "directory" ,
52
+ default = None ,
53
+ metavar = "PATH" ,
54
+ help = "Build fragment in directory. Default to current directory." ,
55
+ )
56
+ @click .option (
57
+ "--name" ,
58
+ "project_name" ,
59
+ default = None ,
60
+ help = "Pass a custom project name." ,
34
61
)
35
- @click .option ("--config" , "config_file" , default = None , help = "Configuration file name." )
36
- @click .option ("--dir" , "directory" , default = None )
37
- @click .option ("--name" , "project_name" , default = None )
38
62
@click .option (
39
63
"--version" ,
40
64
"project_version" ,
@@ -58,6 +82,9 @@ def _main(
58
82
project_date ,
59
83
answer_yes ,
60
84
):
85
+ """
86
+ Build a combined news file from news fragment.
87
+ """
61
88
try :
62
89
return __main (
63
90
draft ,
0 commit comments