scripting / Scripting-News

I'm starting to use GitHub for work on my blog. Why not? It's got good communication and collaboration tools. Why not hook it up to a blog?
121 stars 10 forks source link

Understanding the extended Markdown some outliners use #223

Open scripting opened 3 years ago

scripting commented 3 years ago

I understand that some outliners use an extended form of Markdown to save their outlines.

I'm interested in knowing exactly what this format is, because -- if it's easy to support as an export and import format in Drummer, then I want to do it. But first we have to understand what it is.

A good first step would be to do this:

  1. Find an outliner that supports OPML import, whose native file format is Markdown.

  2. Import our states.opml example into this app.

  3. Save/export it as Markdown.

  4. Post it here as a comment.

Why use states.opml? Because we know what's "content" and what's structure in the example. When I get an example where the text is about the format it's an example of, it gets confusing quickly. I know "Montana" and "Chicago" aren't part of the file structure. See how that works?

Everyone but silo-builders wins if our products interop.

sabre23t commented 3 years ago

Imported states.opml into Logseq.com v0.3.7 It's converted into states.opml.md attached. states.opml.md

Edit: I just tried re-downloading the above states.opml.md. It did download ok. It's a 815 byte file. Cut&paste as source here.

scripting commented 3 years ago

OK -- I've reviewed @sabre23t upload.

  1. First, thanks! 👍

  2. Noted that the only head-level attribute that is preserved is <title>. There are quite a few others.

  3. I will come up with a better test, where the individual headlines have attributes. Coming in a minute. I will update the post at the top of the thread.

scripting commented 3 years ago

Here's the next test, the OPML source behind the opml.org home page.

http://opml.org/?format=opml

This is a better test because every headline has a created attribute. Let's see what they do with those.

sabre23t commented 3 years ago
  1. Noted that the only head-level attribute that is preserved is . There are quite a few others.</li> </ol> </blockquote> <p>All the other head level attributes can be supported as custom attributes in Logseq as below. However, currently Logseq doesn't store dateCreated, dateModified, lastCursor in the MD file. The expansionState is stored in the MD file as per block (headline) attribute collapsed:: true.</p> <pre><code> title:: states.opml dateCreated:: Sun, 03 Dec 2000 01:39:30 GMT ownerEmail:: dave@userland.com</ownerEmail description:: The original test outline for OPML apps. ownerTwitterScreenName:: davewiner ownerName:: Dave Winer ownerId:: http://twitter.com/davewiner urlUpdateSocket:: ws://drummer.scripting.com:1232/ dateModified:: Wed, 18 Aug 2021 18:52:15 GMT expansionState:: 1,4 lastCursor:: 0</code></pre> </div> </div> <div class="comment"> <div class="user"> <a rel="noreferrer nofollow" target="_blank" href="https://github.com/scripting"><img src="https://avatars.githubusercontent.com/u/1686843?v=4" />scripting</a> commented <strong> 3 years ago</strong> </div> <div class="markdown-body"> <p>@sabre23t -- when you say the "can be" supported as custom attributes, what does that mean? </p> <p>Maybe another question I should ask is this -- could you upload an actual file you're working on, without any special prep. I'd like to see what it contains. I may not know what the content is in advance, but hopefully it shouldn't be too hard to discern. </p> </div> </div> <div class="comment"> <div class="user"> <a rel="noreferrer nofollow" target="_blank" href="https://github.com/sabre23t"><img src="https://avatars.githubusercontent.com/u/205024?v=4" />sabre23t</a> commented <strong> 3 years ago</strong> </div> <div class="markdown-body"> <blockquote> <p>Here's the next test, the OPML source behind the <a href="opml.org">opml.org</a> home page. <a href="http://opml.org/?format=opml">http://opml.org/?format=opml</a></p> </blockquote> <p>Imported into Logseq.com v0.3.7 and converted to markdown as <a href="https://github.com/scripting/Scripting-News/files/7149774/opml.org.home.md">opml.org home.md</a></p> </div> </div> <div class="comment"> <div class="user"> <a rel="noreferrer nofollow" target="_blank" href="https://github.com/scripting"><img src="https://avatars.githubusercontent.com/u/1686843?v=4" />scripting</a> commented <strong> 3 years ago</strong> </div> <div class="markdown-body"> <p>oy. the created atts are gone! ouch. </p> </div> </div> <div class="comment"> <div class="user"> <a rel="noreferrer nofollow" target="_blank" href="https://github.com/sabre23t"><img src="https://avatars.githubusercontent.com/u/205024?v=4" />sabre23t</a> commented <strong> 3 years ago</strong> </div> <div class="markdown-body"> <blockquote> <p>@sabre23t -- when you say the "can be" supported as custom attributes, what does that mean?</p> </blockquote> <p>Logseq supports custom attributes with almost any name (other than it's own reserved attribute names like <code>title</code>). The example from your head-level attributes I gave earlier doesn't clash with any Logseq current attributes, other than title.</p> <blockquote> <p>Maybe another question I should ask is this -- could you upload an actual file you're working on, without any special prep. I'd like to see what it contains. I may not know what the content is in advance, but hopefully it shouldn't be too hard to discern.</p> </blockquote> <p>Attached is my lightly redacted today's journal page <code>Sep 12th, 2021</code>. <a href="https://github.com/scripting/Scripting-News/files/7149792/2021_09_12.md">2021_09_12.md</a></p> </div> </div> <div class="comment"> <div class="user"> <a rel="noreferrer nofollow" target="_blank" href="https://github.com/sabre23t"><img src="https://avatars.githubusercontent.com/u/205024?v=4" />sabre23t</a> commented <strong> 3 years ago</strong> </div> <div class="markdown-body"> <blockquote> <p>oy. the created atts are gone! ouch.</p> </blockquote> <p>Yes. Currently Logseq doesn't support block (headline) level created and modified timestamps. It will later, when Logseq use database not just plain text files (MD or ORG). So I understand. Ref <a href="https://discord.com/channels/725182569297215569/735747000649252894/870512984491982869">Tienson Discord message on 30 Jul 2021</a>.</p> </div> </div> <div class="comment"> <div class="user"> <a rel="noreferrer nofollow" target="_blank" href="https://github.com/scripting"><img src="https://avatars.githubusercontent.com/u/1686843?v=4" />scripting</a> commented <strong> 3 years ago</strong> </div> <div class="markdown-body"> <p>@sabre23t -- thanks you've given me lots to think about. </p> <p>The big question is what text is generated by software, and what did you type?</p> <p>I am sure that "collapsed:: true" was software-generated.</p> <p>We call that "collapse" in our world, but it's not generated automatically, it's something that applies to rendered text. </p> <p>Are the timestamps at the beginning of messages machine-generated? I imagine they are. </p> <p>How of this interops with Obsidian, or is this Logseq's language only, or somewhat or ??</p> </div> </div> <div class="comment"> <div class="user"> <a rel="noreferrer nofollow" target="_blank" href="https://github.com/sabre23t"><img src="https://avatars.githubusercontent.com/u/205024?v=4" />sabre23t</a> commented <strong> 3 years ago</strong> </div> <div class="markdown-body"> <blockquote> <p>The big question is what text is generated by software, and what did you type?</p> </blockquote> <p>Almost all the text in that <code>2021_09_12.md</code> I typed. The markdown unordered list marker <code>-</code> with indentations are automatic based on outline block (headline) level. The timestamp <code>07:00</code> etc I actually typed in. But I could also use Logseq <code>/cu</code> command to insert current time.</p> <blockquote> <p>I am sure that "collapsed:: true" was software-generated.</p> </blockquote> <p>Yes this is software-generated when you collapse an outline block (headline). But I could also type that block attributes directly.</p> <blockquote> <p>How of this interops with Obsidian, or is this Logseq's language only, or somewhat or ??</p> </blockquote> <p>Generic markdown markups interops with Obsidian. Logseq main extension to Markdown is those attributes <code>title:: xx</code>, <code>collapsed:: true</code> etc. Obsidian doesn't use those attributes.</p> </div> </div> <div class="page-bar-simple"> </div> <div class="footer"> <ul class="body"> <li>© <script> document.write(new Date().getFullYear()) </script> Githubissues.</li> <li>Githubissues is a development platform for aggregating issues.</li> </ul> </div> <script src="https://cdn.jsdelivr.net/npm/jquery@3.5.1/dist/jquery.min.js"></script> <script src="/githubissues/assets/js.js"></script> <script src="/githubissues/assets/markdown.js"></script> <script src="https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@11.4.0/build/highlight.min.js"></script> <script src="https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@11.4.0/build/languages/go.min.js"></script> <script> hljs.highlightAll(); </script> </body> </html>