I “think” the .bikemd format has all the needed features to give it parity for standard .bike files, bugs and suggestions still welcome.
The markdown format has the same capabilities as the standard format, but it does have different defaults (ie default format always saves “id”, “created”, and “modified”, while bikemd does not. Instead it only saves ids for rows that are internally linked too. I expect to eventually make which attributes are saved configurable in all formats through the JSON metadata/frontmatter that’s now part of each format.
Also in the name of making the Markdown format better I have removed the data- naming scheme from the runtime row attributes. That means when attributes are saved to the markdown format they won’t be quite so verbose. This change also effects API’s and outline paths. For example in outline paths “done” rows are now matches with .@done instead of the old .@data-done.
Another breaking change is the AppleScript command to evaluate javascript in Bike’s app context. Previously you would pass in javascript text and 1)That script was evaluated and 2) That script was expected to define a function named “run” which was then called with any passed inputs. I’ve updated the documentation here with new evaluate command examples.
I had mentioned release note:
Allowed opening Plain Text as bikemd by including { "bikemd": true } front-matter
And it was working, but just found bug. So that’s waiting for next release now.
In a .bike this involves typing the JSON a literal in-line ?
On attributes – these are still to serialised (in .bike files) with a data- prefix, as in data-created and data-modified ?
I notice that a .bike XML file which comes in with an unprefixed attribute like
testing="alphabeta"
Preserves that attribute on saving (though it doesn’t seem to be included, at least at present, on Edit > Copy in the com.hogbaysoftware.bike.xml pasteboard item
Aquires a data- prefix during serialisation, but that event is, at the moment, accompanied by the creation of data-data- prefixed duplicates of creation and modification date attributes.
So, for example, with (presumably unexpected) data-data-created and data-data-modified
Ah, shoot, and thanks. I need to look into this. The intention is that data-created is read into the runtime as created and then serialized back out as data-created. The other intention is id is special cased as not prefixed with data-. I hadn’t thought about round tripping other non data prefixed attributes. Will think.
I “think” build 252 fixes the .bike format attribute problems. Please let me know if you notice anymore oddities.
The general rule for row level attributes should be:
Any attribute that is not defined in XHTML 1.0 will be encoded with a leading data- prefixed to the attribute name.
When reading all found data- prefixes are stripped.
I’m not as careful with text attributes, they are just encoded as found, should probably fix that, or relax all the data- encoding in row level elements, but for now leaving as is.
The reason is that you are using .md extension, not .bikemd extension. When using .md Bike will just treat as a plain text file. This is because Bike only understands a specific set of Markdown syntax, if it tried to open any old Markdown file into Bike’s rich text editor it would loose information on save.
Workaround!
Add this front matter to the file:
---
{"bikemd":true}
---
When Bike sees that then it ignores file extension and will treat the file as .bikemd. I hope that works and makes sense. Let me know if not.
I’m going to change things also so that when Bike saves a new Bike Markdown document while using a non .bikemd file extension, it will add that frontmatter automatically.
I’ve been trying to find a way to have Vim keybindings into your app, especially for the outline mode. Do you think that this is doable with the extensions feature you mention that is available starting on version 2 of the app?
If that’s the case, I might try to create the extension for this!
I think it should be possible, though I’m not all that familiar with details of what VIM keybindings require. The extension API does have what I think is a pretty good system for adding keybindings.
You can set different keybindings for text or outline mode. Return true to consume the key event, false to allow other processing.