From 7032f10c935bf3931d4ce21c347780d3d9978ae5 Mon Sep 17 00:00:00 2001 From: Mikhail Skorzhinskii Date: Thu, 12 Dec 2019 23:49:59 +0100 Subject: [PATCH 1/2] examples: add timetable to icalendar exporter --- examples.org | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/examples.org b/examples.org index 830e77e..c3df94d 100644 --- a/examples.org +++ b/examples.org @@ -173,6 +173,44 @@ With this =org-ql-block= agenda view, like: ((org-ql-block-header "Stuck Projects"))))))) #+END_SRC +* Exporting timetable to icalendar format + +Exporting all available appointments to icalendar format for further upload. More insight [[https://www.reddit.com/r/orgmode/comments/e8q0iw/question_display_duration_as_block_in_the_agenda/][here]]. + +Saving org-ql search: + #+begin_src emacs-lisp + (let ((file "~/org/export/timetable.org") + (buffer-name "*org-ql-view-exporting*")) + (org-ql-search + (org-agenda-files) + '(and (not (done)) + ;; Only active time stamps + (ts-active) + ;; Only appointments (i.e. with hour\time specification) + (regexp org-scheduled-time-hour-regexp)) + :super-groups '((:auto-ts t)) + :buffer buffer-name) + (org-agenda-write file nil t buffer-name)) + #+end_src + + Converting org-mode file to icalendar file: +#+begin_src emacs-lisp + (let (;; With alarm on event start + (org-icalendar-alarm-time 1) + ;; Export tags + (org-icalendar-categories (quote (local-tags category))) + ;; Don't include body to ICS event + (org-icalendar-include-body nil) + ;; Use all headins avaialable + (org-icalendar-use-deadline (quote (event-if-not-todo event-if-todo todo-start))) + (org-icalendar-use-scheduled (quote (event-if-not-todo event-if-todo todo-start))) + (org-icalendar-with-timestamps nil) + ;; Item duration for headlines without duration + (org-agenda-default-appointment-duration 0)) + (find-file "~/org/export/timetable.org") + (org-icalendar-export-to-ics)) +#+end_src + * COMMENT Code :noexport: :PROPERTIES: :TOC: ignore From 7eb520f67871d64ced03a21a67f0e3412b4d6211 Mon Sep 17 00:00:00 2001 From: Mikhail Skorzhinskii Date: Thu, 12 Dec 2019 23:50:19 +0100 Subject: [PATCH 2/2] examples: add org-jira integration example --- examples.org | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/examples.org b/examples.org index c3df94d..21acad1 100644 --- a/examples.org +++ b/examples.org @@ -211,6 +211,20 @@ Saving org-ql search: (org-icalendar-export-to-ics)) #+end_src +* Get all in progress tasks for [[https://github.com/ahungry/org-jira][org-jira]] users + +For best results, inject it to bigger agenda view for your work items. + +#+begin_src emacs-lisp + (org-ql-search + (org-agenda-files) + '(and (tags "work") + (and (property "assignee" "your-jira-username") + (todo "PROG"))) + :super-groups + '((:name "In progress" :order 1 :todo "PROG"))) +#+end_src + * COMMENT Code :noexport: :PROPERTIES: :TOC: ignore