1616from ._builder import find_fragments , render_fragments , split_fragments
1717from ._git import remove_files , stage_newsfile
1818from ._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+ )
2024from ._writer import append_to_newsfile
2125
2226
@@ -30,11 +34,31 @@ def _get_date():
3034 "draft" ,
3135 default = False ,
3236 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." ,
3461)
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 )
3862@click .option (
3963 "--version" ,
4064 "project_version" ,
@@ -58,6 +82,9 @@ def _main(
5882 project_date ,
5983 answer_yes ,
6084):
85+ """
86+ Build a combined news file from news fragment.
87+ """
6188 try :
6289 return __main (
6390 draft ,
0 commit comments