Org agenda supports a powerful exporting function (org-agenda-write)
, which exports your agenda view to pdf
, ps
, html
.. format beautifully. In this post, I hope to make that process automatically.
More specifically, I'd like to have a cron job that handles everything. A function (org-store-agenda-views)
that comes close is described in the same link above. However, after tinkering for two hours, I still can't find what I want.
Currently, I have to do it manually:
- Enter org agenda.
- Launch log view, so I can see exactly how the entries are clocked.
- Launch clock report mode, so I get a nice time summary table.
- Fire
(org-agenda-write)
.
As my attempt to do it automatically, I've tried
(setq org-agenda-custom-commands
'(("X" "EXPORT" ((agenda "" ((org-agenda-span 7)
(org-agenda-log-mode-items '(closed clock state))
(org-agenda-clockreport-mode t)
(org-agenda-start-on-weekday 0))
)) nil (("~/agenda.html" "~/agenda.pdf"))))
as in the link. Notice that org-agenda-log-mode-items
and org-agenda-clockreport-mode
are the two closest variables I've found. But it did not affect the generated file..
Question
How to generate a full clocked agenda view automatically?