Optional disable fill time column
This commit is contained in:
@@ -43,6 +43,11 @@ def main(argv: Optional[List[str]] = None) -> int:
|
||||
default="",
|
||||
help="Override author name from .env (REDMINE_AUTHOR)"
|
||||
)
|
||||
parser.add_argument(
|
||||
"--no-time",
|
||||
action="store_true",
|
||||
help="Do not include 'Затрачено за отчетный период' column in ODT report"
|
||||
)
|
||||
args = parser.parse_args(argv)
|
||||
|
||||
try:
|
||||
@@ -74,8 +79,14 @@ def main(argv: Optional[List[str]] = None) -> int:
|
||||
print("❌ Output file must end with .odt", file=sys.stderr)
|
||||
return 1
|
||||
try:
|
||||
author = Config.get_author(args.author)
|
||||
doc = format_odt(issue_hours, author=author, from_date=from_date, to_date=to_date)
|
||||
doc = format_odt(
|
||||
issue_hours,
|
||||
author=Config.get_author(args.author),
|
||||
from_date=from_date,
|
||||
to_date=to_date,
|
||||
fill_time=not args.no_time
|
||||
)
|
||||
|
||||
doc.save(args.output)
|
||||
print(f"✅ Report saved to {args.output}")
|
||||
except ImportError:
|
||||
|
||||
Reference in New Issue
Block a user