title: Is there a way to convert markdown to interpreted RTF?
body: <p>I am trying to convert a text from markdown to rendered RTF in a shell script and wrap the command in an Apple Automator Service.</p>
  
  <p>I realized that the only way to achieve the task is by doing:</p>
  
  <pre><code>python -m markdown | textutil -convert rtf -format html -stdin -stdout -font Helvetica -inputencoding UTF-8 | pbcopy | pbpaste -Prefer rtf
  </code></pre>
  
  <p><strong>Question</strong>: </p>
  
  <ul>
  <li>How to avoid using the clipboard to interpret RTF?</li>
  <li>Is there another application to use instead of <code>pbcopy</code> <code>pbpaste</code>?</li>
  </ul>
  
  <p>Cmd explain:</p>
  
  <ul>
  <li><code>python -m markdown</code> does the main work</li>
  <li><code>textutil [… opts]</code> converts from HTML to RTF</li>
  <li><code>pbcopy | pbpaste -Prefer rtf</code> does the magic interpreting plain-text RTF directives out from <code>textutil</code> and returning as interpreted RTF.</li>
  </ul>
  
  <p>The issue would be far easier if RTF were not requested to be interpreted. I already tried to call the first two steps of the pipe and able to save rtf-formatted files (and other formats as well) correctly.</p>