Optional disable fill time column

This commit is contained in:
Кокос Артем Николаевич
2026-01-22 12:38:06 +07:00
parent e7efda232c
commit ead6c72d16
2 changed files with 20 additions and 4 deletions

View File

@@ -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: