quill: daily draft generator artifact
This commit is contained in:
1 parent
c382a33458
commit
accdbf895d
1 file changed
+47
@@ -0,0 +1,47 @@
|
||||
#!/usr/bin/env python3
|
||||
"""
|
||||
daily_draft.py — Quick markdown daily draft generator.
|
||||
|
||||
Usage:
|
||||
python3 daily_draft.py [YYYY-MM-DD] [focus] [blockers...]
|
||||
Defaults to today's date if omitted.
|
||||
"""
|
||||
|
||||
import sys
|
||||
from datetime import date
|
||||
|
||||
|
||||
def main() -> int:
|
||||
draft_date = date.today().isoformat()
|
||||
focus = "ship draft"
|
||||
blockers = []
|
||||
|
||||
if len(sys.argv) > 1:
|
||||
draft_date = sys.argv[1]
|
||||
if len(sys.argv) > 2:
|
||||
focus = sys.argv[2]
|
||||
if len(sys.argv) > 3:
|
||||
blockers = sys.argv[3:]
|
||||
|
||||
lines = [
|
||||
f"# Daily Draft — {draft_date}",
|
||||
"",
|
||||
f"## Focus\n{focus}",
|
||||
"",
|
||||
"## Blockers",
|
||||
]
|
||||
|
||||
if blockers:
|
||||
for b in blockers:
|
||||
lines.append(f"- {b}")
|
||||
else:
|
||||
lines.append("- None")
|
||||
|
||||
lines += ["", "## Notes", "- "]
|
||||
|
||||
print("\n".join(lines))
|
||||
return 0
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
raise SystemExit(main())
|
||||
Reference in new issue
Block a user