Browse Source

ENH: read author from org file metadata

Andreas Hilboll 8 years ago
parent
commit
631420fde2
2 changed files with 2 additions and 0 deletions
  1. 1 0
      org_reader/org_reader.el
  2. 1 0
      org_reader/org_reader.py

+ 1 - 0
org_reader/org_reader.el

@@ -8,6 +8,7 @@
         (princ (json-encode 
                 (list 
                  :date (org-timestamp-format (car (plist-get properties :date)) "%Y-%m-%d")
+                 :author (substring-no-properties (car (plist-get properties :author)))
                  :category (cdr (assoc "CATEGORY" org-file-properties))
                  :post (org-export-as backend nil nil t)
                  :title (substring-no-properties (car (plist-get properties :title))))))))))

+ 1 - 0
org_reader/org_reader.py

@@ -76,6 +76,7 @@ class OrgReader(readers.BaseReader):
         metadata = {'title': json_output['title'],
                     'tags': json_output['category'] or '',
                     'slug': slug,
+                    'author': json_output['author'],
                     'date': json_output['date']}
 
         parsed = {}