Created
May 25, 2020 00:15
-
-
Save commander-trashdin/40978ed2e44060a3b646e20e7dee17ac to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (defun parse-annotation-lines (list) | |
| "Pull out header and item information from LIST." | |
| (let (acc (header-is-next nil) (item-is-next nil) (current-page)) | |
| (nreverse | |
| (dolist (element list acc) | |
| (cond (header-is-next | |
| (push (make-parse-entry *header+ element current-page) acc) | |
| (setq header-is-next nil)) | |
| (item-is-next | |
| (push (make-parse-entry *item+ element current-page) acc) | |
| (setq item-is-next nil)) | |
| ((is-page-line element) | |
| (setq current-page | |
| (string-to-number | |
| (substring element (match-beginning 1)))))) | |
| (setq header-is-next (is-header-line element)) | |
| (setq item-is-next (is-item-line element)))))) | |
| (defun map-entries-to-org-mode (list) | |
| (mapcar 'map-entry-to-orgmode list)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment