Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Understanding the extended Markdown some outliners use #223

Open
scripting opened this issue Sep 12, 2021 · 11 comments
Open

Understanding the extended Markdown some outliners use #223

scripting opened this issue Sep 12, 2021 · 11 comments

Comments

@scripting
Copy link
Owner

scripting commented Sep 12, 2021

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
Copy link

sabre23t commented Sep 12, 2021

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
Copy link
Owner Author

scripting commented Sep 12, 2021

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
Copy link
Owner Author

scripting commented Sep 12, 2021

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
Copy link

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

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.

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

@scripting
Copy link
Owner Author

@sabre23t -- when you say the "can be" supported as custom attributes, what does that mean?

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.

@sabre23t
Copy link

Here's the next test, the OPML source behind the opml.org home page.
http://opml.org/?format=opml

Imported into Logseq.com v0.3.7 and converted to markdown as
opml.org home.md

@scripting
Copy link
Owner Author

oy. the created atts are gone! ouch.

@sabre23t
Copy link

sabre23t commented Sep 12, 2021

@sabre23t -- when you say the "can be" supported as custom attributes, what does that mean?

Logseq supports custom attributes with almost any name (other than it's own reserved attribute names like title). The example from your head-level attributes I gave earlier doesn't clash with any Logseq current attributes, other than title.

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.

Attached is my lightly redacted today's journal page Sep 12th, 2021.
2021_09_12.md

@sabre23t
Copy link

oy. the created atts are gone! ouch.

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 Tienson Discord message on 30 Jul 2021.

@scripting
Copy link
Owner Author

@sabre23t -- thanks you've given me lots to think about.

The big question is what text is generated by software, and what did you type?

I am sure that "collapsed:: true" was software-generated.

We call that "collapse" in our world, but it's not generated automatically, it's something that applies to rendered text.

Are the timestamps at the beginning of messages machine-generated? I imagine they are.

How of this interops with Obsidian, or is this Logseq's language only, or somewhat or ??

@sabre23t
Copy link

sabre23t commented Sep 12, 2021

The big question is what text is generated by software, and what did you type?

Almost all the text in that 2021_09_12.md I typed. The markdown unordered list marker - with indentations are automatic based on outline block (headline) level. The timestamp 07:00 etc I actually typed in. But I could also use Logseq /cu command to insert current time.

I am sure that "collapsed:: true" was software-generated.

Yes this is software-generated when you collapse an outline block (headline). But I could also type that block attributes directly.

How of this interops with Obsidian, or is this Logseq's language only, or somewhat or ??

Generic markdown markups interops with Obsidian. Logseq main extension to Markdown is those attributes title:: xx, collapsed:: true etc. Obsidian doesn't use those attributes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants