added output flag
This commit is contained in:
+5
-1
@@ -39,6 +39,7 @@ def __args__():
|
|||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
"-d", "--destination", help="Destination folder", type=str, default="."
|
"-d", "--destination", help="Destination folder", type=str, default="."
|
||||||
)
|
)
|
||||||
|
parser.add_argument("-o", "--output", help="Output name", type=str, default="")
|
||||||
return parser.parse_args()
|
return parser.parse_args()
|
||||||
|
|
||||||
|
|
||||||
@@ -73,7 +74,10 @@ def main():
|
|||||||
if not config:
|
if not config:
|
||||||
logging.error(f"Impossible to load configuration `{args.filename}`")
|
logging.error(f"Impossible to load configuration `{args.filename}`")
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
filename = os.path.splitext(os.path.basename(args.filename))[0]
|
if args.output:
|
||||||
|
filename = args.output
|
||||||
|
else:
|
||||||
|
filename = os.path.splitext(os.path.basename(args.filename))[0]
|
||||||
autodoc.document(filename, args, config)
|
autodoc.document(filename, args, config)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user