* HTML export and Zotero-friendly headers @ 2011-11-21 18:19 Erik L. Arneson 2011-11-21 20:25 ` Christian Moe 0 siblings, 1 reply; 11+ messages in thread From: Erik L. Arneson @ 2011-11-21 18:19 UTC (permalink / raw) To: emacs-orgmode Howdy, I've just stumbled across Zotero and have been reading about how folks are working to integrate it with org-mode, but from what I've read so far, all of the work has been on the citation end. Has anybody pursued creating Zotero-friendly headers/metadata in HTML exports? I use org-mode to manage a few websites and it would be handy to have the HTML snippets generated automatically. It looks like both COinS[1] and Dublin Core are fairly straightforward. I'm looking forward to hearing if anybody has done anything with this yet. Thanks, Erik Footnotes: [1] http://ocoins.info/ -- Erik L. Arneson <dybbuk@LNouv.com> GPG Key ID : 1024D/62DA1D25 BitCoin : 1LqvuGUqJ4ZUSoE7YE9ngETjwp4yZ2uSdP Office : +1.541.291.9776 Skype : callto://pymander http://www.leisurenouveau.com/ http://www.transformason.org/ ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: HTML export and Zotero-friendly headers 2011-11-21 18:19 HTML export and Zotero-friendly headers Erik L. Arneson @ 2011-11-21 20:25 ` Christian Moe 2011-11-21 21:14 ` Erik L. Arneson 0 siblings, 1 reply; 11+ messages in thread From: Christian Moe @ 2011-11-21 20:25 UTC (permalink / raw) To: Erik L. Arneson; +Cc: emacs-orgmode Hi, Does Erik Hetzner's zotero-plain work for you? If so, I'd try this experiment: set zotero-default-bibliography-style to "COinS". Then insert a citation in Org using zotero-plain. In the link description, instead of a nicely formatted bibliographic reference, I imagine you should get the COinS data. If that works, zotero-plain could be very easily extended with a function to insert COinS data for all items in zotero links, and it could be run as a hook on HTML export. It hasn't worked for me lately, so I can't try the experiment myself. Yours, Christian On 11/21/11 7:19 PM, Erik L. Arneson wrote: > Howdy, > > I've just stumbled across Zotero and have been reading about how folks > are working to integrate it with org-mode, but from what I've read so > far, all of the work has been on the citation end. > > Has anybody pursued creating Zotero-friendly headers/metadata in HTML > exports? I use org-mode to manage a few websites and it would be handy > to have the HTML snippets generated automatically. It looks like both > COinS[1] and Dublin Core are fairly straightforward. > I'm looking forward to hearing if anybody has done anything with this > yet. > > Thanks, > > Erik > > Footnotes: > [1] http://ocoins.info/ > ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: HTML export and Zotero-friendly headers 2011-11-21 20:25 ` Christian Moe @ 2011-11-21 21:14 ` Erik L. Arneson 2011-11-22 4:54 ` Erik Hetzner 2011-11-22 9:27 ` Christian Moe 0 siblings, 2 replies; 11+ messages in thread From: Erik L. Arneson @ 2011-11-21 21:14 UTC (permalink / raw) To: emacs-orgmode On Mon, 21 Nov 2011, Christian Moe wrote: > Hi, > > Does Erik Hetzner's zotero-plain work for you? I thought zotero-plain was used to add citations. What I'm trying to do is use org-mode to export HTML files with Zotero-friendly headers that the Zotero plugin will pick-up on in the browser. I can make the COinS <span> snippets myself using the tool available on the COinS website, but it would be handy if org-mode could do that automatically using the org header data that already exists. -- Erik L. Arneson <dybbuk@LNouv.com> GPG Key ID : 1024D/62DA1D25 BitCoin : 1LqvuGUqJ4ZUSoE7YE9ngETjwp4yZ2uSdP Office : +1.541.291.9776 Skype : callto://pymander http://www.leisurenouveau.com/ http://www.transformason.org/ ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: HTML export and Zotero-friendly headers 2011-11-21 21:14 ` Erik L. Arneson @ 2011-11-22 4:54 ` Erik Hetzner 2011-11-22 9:27 ` Christian Moe 1 sibling, 0 replies; 11+ messages in thread From: Erik Hetzner @ 2011-11-22 4:54 UTC (permalink / raw) To: Erik L. Arneson; +Cc: emacs-orgmode [-- Attachment #1: Type: text/plain, Size: 817 bytes --] At Mon, 21 Nov 2011 13:14:02 -0800, Erik L. Arneson wrote: > > On Mon, 21 Nov 2011, Christian Moe wrote: > > Hi, > > > > Does Erik Hetzner's zotero-plain work for you? > > I thought zotero-plain was used to add citations. What I'm trying to do > is use org-mode to export HTML files with Zotero-friendly headers that > the Zotero plugin will pick-up on in the browser. > > I can make the COinS <span> snippets myself using the tool available on > the COinS website, but it would be handy if org-mode could do that > automatically using the org header data that already exists. Hi Erik, There has been some discussion recently of export to ODT with citations. Jambunathan K has outlined a way of doing this using a binary added to zotero-plain, zotcite. This might be repurposed for an HTML export. best, Erik [-- Attachment #2: Type: text/plain, Size: 53 bytes --] Sent from my free software system <http://fsf.org/>. ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: HTML export and Zotero-friendly headers 2011-11-21 21:14 ` Erik L. Arneson 2011-11-22 4:54 ` Erik Hetzner @ 2011-11-22 9:27 ` Christian Moe 2011-11-22 14:44 ` Erik L. Arneson 1 sibling, 1 reply; 11+ messages in thread From: Christian Moe @ 2011-11-22 9:27 UTC (permalink / raw) To: Erik L. Arneson; +Cc: emacs-orgmode Hi, Then I misunderstood you, sorry about the noise (to both Eriks, A. and H.). I thought you meant including Zotero-readable metadata for each citation in the Org document. Do I then understand correctly that what you want to do is simply to generate one COinS snippet with metadata about the document itself (author, title, etc.)? Yours, Christian On 11/21/11 10:14 PM, Erik L. Arneson wrote: > I thought zotero-plain was used to add citations. What I'm trying to do > is use org-mode to export HTML files with Zotero-friendly headers that > the Zotero plugin will pick-up on in the browser. > > I can make the COinS<span> snippets myself using the tool available on > the COinS website, but it would be handy if org-mode could do that > automatically using the org header data that already exists. > ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: HTML export and Zotero-friendly headers 2011-11-22 9:27 ` Christian Moe @ 2011-11-22 14:44 ` Erik L. Arneson 2011-11-22 18:35 ` adam.smith 2011-11-23 10:37 ` Christian Moe 0 siblings, 2 replies; 11+ messages in thread From: Erik L. Arneson @ 2011-11-22 14:44 UTC (permalink / raw) To: emacs-orgmode On Tue, 22 Nov 2011, Christian Moe wrote: > Hi, > > Then I misunderstood you, sorry about the noise (to both Eriks, A. and > H.). I thought you meant including Zotero-readable metadata for each > citation in the Org document. No problem. I tried to be clear, but obviously I wasn't. :) > Do I then understand correctly that what you want to do is simply to > generate one COinS snippet with metadata about the document itself > (author, title, etc.)? Yes, though it doesn't need to be only COinS. Zotero supports a number of different formats, but COinS looks like it may be the easiest and the most concise. -- Erik L. Arneson <dybbuk@LNouv.com> GPG Key ID : 1024D/62DA1D25 BitCoin : 1LqvuGUqJ4ZUSoE7YE9ngETjwp4yZ2uSdP Office : +1.541.291.9776 Skype : callto://pymander http://www.leisurenouveau.com/ http://www.transformason.org/ ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: HTML export and Zotero-friendly headers 2011-11-22 14:44 ` Erik L. Arneson @ 2011-11-22 18:35 ` adam.smith 2011-11-22 20:49 ` Christian Moe 2011-11-23 10:37 ` Christian Moe 1 sibling, 1 reply; 11+ messages in thread From: adam.smith @ 2011-11-22 18:35 UTC (permalink / raw) To: emacs-orgmode > Yes, though it doesn't need to be only COinS. Zotero supports a number > of different formats, but COinS looks like it may be the easiest and the > most concise. > You're aware that bibliographies exported as HTML from Zotero already contain COinS? ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: HTML export and Zotero-friendly headers 2011-11-22 18:35 ` adam.smith @ 2011-11-22 20:49 ` Christian Moe 0 siblings, 0 replies; 11+ messages in thread From: Christian Moe @ 2011-11-22 20:49 UTC (permalink / raw) To: adam.smith; +Cc: emacs-orgmode Hi, Adam Smith, You're repeating my misunderstanding -- that's not what he's looking for, see the thread above. Christian On 11/22/11 7:35 PM, adam.smith wrote: > >> Yes, though it doesn't need to be only COinS. Zotero supports a number >> of different formats, but COinS looks like it may be the easiest and the >> most concise. >> > You're aware that bibliographies exported as HTML from Zotero already > contain COinS? > > > > > > ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: HTML export and Zotero-friendly headers 2011-11-22 14:44 ` Erik L. Arneson 2011-11-22 18:35 ` adam.smith @ 2011-11-23 10:37 ` Christian Moe 2011-11-23 16:45 ` Erik L. Arneson 1 sibling, 1 reply; 11+ messages in thread From: Christian Moe @ 2011-11-23 10:37 UTC (permalink / raw) To: Erik L. Arneson; +Cc: emacs-orgmode On 11/22/11 3:44 PM, Erik L. Arneson wrote: >> Do I then understand correctly that what you want to do is simply to >> generate one COinS snippet with metadata about the document itself >> (author, title, etc.)? > > Yes, though it doesn't need to be only COinS. Zotero supports a number > of different formats, but COinS looks like it may be the easiest and the > most concise. > Hi, Does Org document header data include more than author, title, date, description and keywords. So I'd be inclined to go with Dublin Core for this, and just twin the ordinary META tags (which Zotero doesn't bother with, probably wisely) with DC equivalents. Doing it as below, with a hook at the end of html export, is more than a little clumsy, but it will do for testing purposes. If people think it's a good idea to do this in HTML exports on a permanent basis, a non-clumsy version could be patched into org-export-as-html. #+begin_src elisp (defun org-export-with-dc () "Add Dublin Core metadata from Org document headers to exported HTML. Comma-separated keywords and multiple authors separated with ` and ' will be correctly imported into Zotero. Note: For testing purposes only. It is only called as a hook from org-export-as-html, where it gets TITLE, DATE, AUTHOR, DESCRIPTION, and KEYWORDS values." (let ((creators (split-string author " and ")) (subjects (split-string keywords ", ?")) fdate) (when (string-match "[0-9]+-[0-9]+-[0-9]+" date) (setq fdate (match-string 0 date))) (goto-char (point-min)) (when (re-search-forward "</head>") (goto-char (match-beginning 0)) (while creators (insert (format "<meta name=\"DC.Creator\" content=\"%s\"/>\n" (car creators))) (setq creators (cdr creators))) (insert (format "<meta name=\"DC.Title\" content=\"%s\"/> <meta name=\"DC.Date\" content=\"%s\"/> <meta name=\"DC.Description\" content=\"%s\"/>\n" title fdate description)) (while subjects (insert (format "<meta name=\"DC.Subject\" content=\"%s\"/>\n" (car subjects))) (setq subjects (cdr subjects)))))) (add-hook 'org-export-html-final-hook 'org-export-with-dc) #+end_src Yours, Christian ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: HTML export and Zotero-friendly headers 2011-11-23 10:37 ` Christian Moe @ 2011-11-23 16:45 ` Erik L. Arneson 2011-11-23 17:56 ` Christian Moe 0 siblings, 1 reply; 11+ messages in thread From: Erik L. Arneson @ 2011-11-23 16:45 UTC (permalink / raw) To: emacs-orgmode On Wed, 23 Nov 2011, Christian Moe wrote: > Does Org document header data include more than author, title, date, > description and keywords. So I'd be inclined to go with Dublin Core > for this, and just twin the ordinary META tags (which Zotero doesn't > bother with, probably wisely) with DC equivalents. I haven't played around with the Dublin Core tags yet, but I'll give this a try and see how it works. > Doing it as below, with a hook at the end of html export, is more than > a little clumsy, but it will do for testing purposes. If people think > it's a good idea to do this in HTML exports on a permanent basis, a > non-clumsy version could be patched into org-export-as-html. Thanks, that looks like a good start! -- Erik L. Arneson <dybbuk@LNouv.com> GPG Key ID : 1024D/62DA1D25 BitCoin : 1LqvuGUqJ4ZUSoE7YE9ngETjwp4yZ2uSdP Office : +1.541.291.9776 Skype : callto://pymander http://www.leisurenouveau.com/ http://www.transformason.org/ ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: HTML export and Zotero-friendly headers 2011-11-23 16:45 ` Erik L. Arneson @ 2011-11-23 17:56 ` Christian Moe 0 siblings, 0 replies; 11+ messages in thread From: Christian Moe @ 2011-11-23 17:56 UTC (permalink / raw) To: Erik L. Arneson; +Cc: emacs-orgmode On 11/23/11 5:45 PM, Erik L. Arneson wrote: > Thanks, that looks like a good start! Let me know how it went. Christian ^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2011-11-23 17:52 UTC | newest] Thread overview: 11+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2011-11-21 18:19 HTML export and Zotero-friendly headers Erik L. Arneson 2011-11-21 20:25 ` Christian Moe 2011-11-21 21:14 ` Erik L. Arneson 2011-11-22 4:54 ` Erik Hetzner 2011-11-22 9:27 ` Christian Moe 2011-11-22 14:44 ` Erik L. Arneson 2011-11-22 18:35 ` adam.smith 2011-11-22 20:49 ` Christian Moe 2011-11-23 10:37 ` Christian Moe 2011-11-23 16:45 ` Erik L. Arneson 2011-11-23 17:56 ` Christian Moe
Code repositories for project(s) associated with this public inbox https://git.savannah.gnu.org/cgit/emacs/org-mode.git This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).