News for hackers. Stuff that matters.
Re:TextBundle by simonw on Friday August 23, 2024 @11:35AM (#41329866)
Something that isn’t clear to me from this spec http://textbundle.org/spec/ is the exact format of Markdown that should be used here.

I was under the impression that the Gruber original at https://daringfireball.net/projects/markdown/ wasn’t well enough specified (unless you want to treat a 20 year old Perl script as a specification) to be interoperable - hence efforts like https://commonmark.org/

Re:TextBundle by kemayo on Friday August 23, 2024 @12:09PM (#41330207)
There's a "type" field in the spec, defined as: "The UTI of the text.* file. E.g. set to net.daringfireball.markdown for Markdown. This field should default to net.daringfireball.markdown to be backwards-compatible with version 1."

So it's whatever you care to specify. Doesn't have to be Markdown at all. It looks like it'd be completely valid to use this as a way to bundle up a webpage with all associated images and scripts, for instance.

Re:TextBundle by simonw on Friday August 23, 2024 @02:20PM (#41331550)
But what does "net.daringfireball.markdown" mean? Does it mean "parse it using the 1.0.1 Perl script from 2004 on https://daringfireball.net/projects/markdown/ "?
Re:TextBundle by jagged-chisel on Friday August 23, 2024 @02:54PM (#41331912)
It just means "the description written by Gruber at his domain." The Perl script is just a convenience (if one can call Perl convenient...) for the curious.

Anyone else's flavor of Markdown can be used by specifying its identifier, e.g. "com.github.markdown.v3" (I made that up, it's not a real thing AFAIK)

Re:TextBundle by simonw on Friday August 23, 2024 @03:31PM (#41332275)
I don’t think the Gruber definition is specific enough for a spec like TextBundle that’s meant to be interoperable between different applications.
Re:TextBundle by jagged-chisel on Friday August 23, 2024 @07:30PM (#41334033)
Perhaps. But since TextBundle lets one specify the content type, you can always choose one that better suits your purposes.
Re:TextBundle by kemayo on Saturday August 24, 2024 @02:12PM (#41340142)
It seems fine to me. If your app is using weird edge cases of markdown syntax, or extensions, it should probably specify a different UTI. If you’re pretty much just doing the level of markdown in the average rich-notes app, that’s pretty interoperable.
Re:TextBundle by ibash on Friday August 23, 2024 @12:01PM (#41330124)
It’s any text based format, you specify the type in info.json
Re:TextBundle by pfix on Friday August 23, 2024 @11:38AM (#41329898)
Coming from Linux where your Filesystem is your database and I use obsidian because I can pop it over a file tree and have my vault integrated into the rest of my system, something like textbundle seems like alien and missing the point.

I like the general concept of sandboxing applications, but if it leads to this, it's more hindering than helping.

Re:TextBundle by ibash on Friday August 23, 2024 @12:00PM (#41330114)
How do you handle attachments?

In particular, if you attach a file to a note in obsidian then no other program can link to the right attachment, right?

Re:TextBundle by paxys on Friday August 23, 2024 @12:24PM (#41330345)
There are no "attachments", just files and links.

Your directory has note.md and image.jpg. The note has a link to the image. The client can then render the markdown and image as it wants.

Any other application can also find and link to the attachment because...it's a file.

Re:TextBundle by ibash on Friday August 23, 2024 @01:09PM (#41330796)
That's what I meant. My experience is that if I link notes in obsidian I can't read it in any other text editor. And the opposite.

Most recently I tested this with obsidian, ia writer, obsidian.nvim, fsnotes, and a few others I forget the name of.

Especially if you want to access your notes on mobile and have a good syncing experience... you're out of luck if you want a non-proprietary format. Only notion and apple notes had reliable syncing.

Re:TextBundle by pfix on Friday August 23, 2024 @07:17PM (#41333942)
I use obsidian on android with syncthing and have no issues. Tailscale VPN for connecting "home" (my vps)
Re:TextBundle by vundercind on Friday August 23, 2024 @12:43PM (#41330521)
Obsidian may avoid the problem well enough, but it’s been my experience that connected pieces of information that aren’t coupled very tightly indeed have a way of eventually becoming separated and never re-united. Goes for information in computer systems and for physical records/photos/objects.
Re:TextBundle by xenodium on Friday August 23, 2024 @02:15PM (#41331510)
Relying on markdown links to local images works well on my machine, but breaks as soon as I'd like to share that markdown file with someone else.

Sure, I can zip everything and send them over, but it's not as friendly for recepient as receiving a document handled by popular viewers, specially if they have to modify it and send it back.

With wide adoption of something like TextBundle, we get to have our cake (keep using plain text) and eat it too (send, view, and edit richer files).

Re:TextBundle by cspeterson on Friday August 23, 2024 @02:22PM (#41331574)
I have in the past run markdown through an exporter that base64-encoded the images into the document before sharing with someone

solves this one issue at least

Re:TextBundle by pfix on Friday August 23, 2024 @07:21PM (#41333973)
I've never had the usecase of sending markdown with images attached.

I use markdown for personal notes and in the rare case I shared them in the past, either there were no (relevant) links or I shared with e.g. confluence and I could just add the image.

My other usecase for markdown is Readmes and those are shared in git including the files.

I understood this spec mostly for sharing with local apps. Is that a missed usecase by me? Markdown documents instead of word/pdf/powerpoint/whatnot?

Re:TextBundle by bityard on Friday August 23, 2024 @02:32PM (#41331674)
Reading the site and spec, it sounds like TextBundle is specifically for exporting and importing your Markdown (or other documents) to and from various apps or other users. In particular, it's needed for software in the Apple ecosystem because there are (apparently) strict rules on how applications can communicate with each other.

Personally, I was hoping TextBundle would be something like a standard format for inserting binary content into Markdown files. (Something better than just base64, anywho.) I could use such a thing for my home-grown wiki.

Re:TextBundle by qskousen on Friday August 23, 2024 @03:01PM (#41332005)
If you don't mind, I'm curious what your use case is for inserting binary content into a Markdown file?
Re:TextBundle by Tomte on Friday August 23, 2024 @03:16PM (#41332144)
Images are the usual use case.
Re:TextBundle by nicbou on Friday August 23, 2024 @05:31PM (#41333292)
Not sure about the parent commenter, but I am still looking for a human-readable format to archive social media posts and online conversations.
Re:TextBundle by jen729w on Friday August 23, 2024 @06:19PM (#41333572)
Notably created by Shiny Frog, authors of the very popular Bear editor for Apple platforms.
Re:TextBundle by zokier on Friday August 23, 2024 @03:23PM (#41332217)
seems like poor mans odf
Re:TextBundle by eternityforest on Friday August 23, 2024 @03:58PM (#41332556)
So is it just a folder layout that can optionally be zipped? What's the actual on disk format? Is it something SyncThing would be happy about?
Re:TextBundle by marcellus23 on Friday August 23, 2024 @05:17PM (#41333196)
You can download a sample file. It's a standard macOS package (https://developer.apple.com/library/archive/documentation/Co...).
Re:TextBundle by eternityforest on Friday August 23, 2024 @06:04PM (#41333483)
I don't have a MacBook or know anything about how their packaging works, but it seems like it's pretty well documented, maybe even better than a lot of package formats
Re:TextBundle by WorldMaker on Monday August 26, 2024 @11:46AM (#41358330)
It doesn't seem like it would be that preferable to other package formats given how platform specific it is. The ZIP-based version of the TextBundle spec (aka TextPack) seems far more generally useful to me given the ubiquity of ZIP as a cross-platform package format.
Re:TextBundle by amai on Friday August 23, 2024 @04:20PM (#41332754)
Spread the word. Unfortunately Obsidian and Devonthink (and many other apps) don’t yet support this format. But it solves a really important problem: How to exchange markdown documents that include attachments like images, video etc. in a standard way?
Re:TextBundle by rauhl on Friday August 23, 2024 @05:14PM (#41333163)
> But it solves a really important problem: How to exchange markdown documents that include attachments like images, video etc. in a standard way?

Oddly enough, I was recently thinking of using RFC 822 messages with CommonMark bodies and MIME attachments as a way to store blog entries on disk, so I was considering this exact problem earlier this week (small world!). RFC 2046 specifies multipart messages, RFC 2392 specifies URI schemes for linking from the body of the message to other parts; and RFC 7763 specifies the text/markdown MIME type. There’s already a ton of tooling out there which deals with MIME, so one needn’t reinvent the wheel.

Re:TextBundle by amai on Friday August 23, 2024 @05:26PM (#41333262)
Interesting idea. Actually I wonder why we don’t have Markdown in emails, yet. It seems to be an obvious idea.
Re:TextBundle by vunderba on Friday August 23, 2024 @05:33PM (#41333310)
TextBundle brings convenience back - by bundling the Markdown text and all referenced images into a single file

... So basically a markdown version of the ePub format?

Slightly related, but Typora offers an option that handles inlined media for a markdown note in a pretty sleek way. It creates a folder in the same location as the markdown note with following syntax (markdown-file-name.assets). Any time you drag/copy/etc a image/video/etc into the markdown editor it copies the file into the asset folder.

Re:TextBundle by w10-1 on Friday August 23, 2024 @06:36PM (#41333679)
Unchanged since 2014?

Surely with Pandoc and macOS/iOS progressing relentlessly, there would be some technical advances even in a basic file bundle.

Re:TextBundle by maliker on Friday August 23, 2024 @06:47PM (#41333737)
I spent a lot of time investigating all the editors on this list because I want a rich text editor that works with single files and is as clean powerful as VS Code (or sublime, emacs, whatever you prefer). Didn't end up using any of them since nobody else uses this format. Went back to .docx. Sad.
Re:TextBundle by dr_kiszonka on Saturday August 24, 2024 @12:46AM (#41335730)
I am hungry for something new, but Word is probably the most popular text editor in the world. If I am writing just for myself, I will most likely use markdown or maybe Typst. If I am to collaborate on it with others, it will probably be .docx or Google Docs.