Code Monkey home page Code Monkey logo

orgcal's Introduction

org mode android calendar provider

What is it

This is an android calendar & contacts provider designed to sync android’s contentproviders with some flat files.

The calendar provider syncs with org-mode files, and the contacts provider with some arbitrary json format.

Misfeatures

Org-mode timestamps can’t represent the full range of icalendar dates.

I don’t care about this in general, icalendar is weirdly overspecified.

However I do like to be able to write events that are like “every N days / weeks etc, until some date” without replicating headings which is the suggested solution.

To do this I abuse the unsupported syntax:

<2022-07-12 Tue +5d>--<2022-09-06 Tue>

To mean “every 5 days until the end date”.

To make this work you need the following advice:

(defun filter-org-agenda-get-blocks (blocks)
    (with-no-warnings (defvar date))
    (let* ((current (calendar-absolute-from-gregorian date))
           (dotime))
      (cl-loop
       for block in blocks
       do (setq dotime (and block (get-text-property 0 'dotime block)))
       when (and dotime
                 (string-match-p org-repeat-re dotime)
                 (string-match org-ts-regexp dotime))
       when (= current (org-time-string-to-absolute (match-string 1 dotime)
                                                    current
                                                    'future))
       collect block)))

(advice-add 'org-agenda-get-blocks
            :filter-return
            #'filter-org-agenda-get-blocks)

orgcal's People

Contributors

larkery avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.