org-ai
org-ai copied to clipboard
export of ai special blocks
I'd love to have ai special blocks export with some formatting, either for inclusion in blogs or just for sharing with friends in casual conversations. Do you already have thoughts about how to do that?
I'll give it some thought. There are a number of ways to go about it. Defining something for every backend is out of my personal scope but I can provide some steps explaining how customizations can be made.
Out of the box markdown and html give special-blocks a separate div element and class such as:
<div class="ai" id="orgdb494e1">
...
</div>
LaTeX does
\begin{ai}
...
\end{ai}
So that's better than nothing but this can be improved no doubt.
And any kind of contribution is of course very welcome!
I did something yesterday with ox-confluence-en, like:
(defun org-confluence-en-special-block (special-block contents info)
(let ((block-type (downcase (org-element-property :type special-block))))
(if (member block-type '("ai" "note"))
(org-confluence-en--block "text" "Confluence" (concat (upcase block-type) " " "Example") "true" contents))))
This outputs:
{toc}
{code:theme=Confluence|language=text|title=AI Example|collapse=true}
[SYS]: You are a helpful assistant.
[AI]: Thank you! How may I assist you today?
{code}
@titaniumbones hope this helps.
Thank you, will look into it soon!