DEVONthink for Note-Taking?

Great to know that I am not alone :).

The second quote demonstrates why long term viability is a real issue …

2 Likes

fwiw
RTF specification is owned and maintained by Microsoft
The final version was 1.9.1 in 2008,
Microsoft has discontinued enhancements to the RTF specification,
an anticipate no further updates

1 Like

While that is true, it could also be seen as a good thing: A fixed target for developers with no surprise losses of functionality - for users as well - from continued tinkering with the format, a known and mature filetype :slight_smile:

2 Likes

See above.

@saltlane may I ask which css stylesheet coding you use to print / convert to pdf your markdown files. As far as I have understood defining page margins is limited due to technical reasons. For me on page 1 it’s okay, but on the following pages it’s too small. In your example it looks quite okay. I am wondering how you achieved this (by printing to pdf directly in chrome) as @chrillek suggested in another thread.

I am quite new to markdown and am fascinated by its simplicity and usefulness. Currently, creating a good print layout without some additional steps (via chrome) is the only thing that is missing for me, therefore I am interested in your workflow
to achieve your pdf layout.

Update:
This older posting of @BLUEFROG describes a perfect solution to handle page margins in markdown printouts:

Thank you, Jim. Indeed, I wasn’t aware that with a customized page setting it is possible to define margins, whereas it is not possible to define them with the CSS stylesheet consistently for all pages. Now, I have a customized page setting for printing/converting markdown documents, and a standard page setting for printing other documents (PDF etc.).

1 Like

The css file I use was developed by Brett Terpstra for Multimarkdown Composer. I have no idea what half of the CSS is doing as I have never had the time to work through it all. :thinking:

I don’t know if it will be of any use to you.
Github CSS.pdf (42.8 KB)

Source file:
Github CSS.css.zip (2.6 KB)

Would be good to post the source *.css file to make it useable by others.

1 Like

That CSS already uses an absolute font-size⁣ for the body element. That’s a no-go in this century – people have their preferred font size, and CSS authors should respect that by using 1em or 100%. Someone forcing 14px on me might have an otherwise brilliant CSS (which I doubt), but I’d discourage people from using this stuff.

Other things jumping into my face:

  • two rules for body
  • wildly inconsistent usage of absolute and relative units for margins and padding
  • useless rules like body>h1:first-child following an identical rule for body>*:first-child. Goodness.
  • This thing is presumably adapted for MMD composer version 4. Which was last updated about four years ago. Things have changed since then, notably with CSS.

I’m not saying that this CSS doesn’t work. But it is badly written and very, very out of date.

I can understand that you didn’t read through this mess. Just forget it and write your own one from scratch. That has the advantage that you won’t end up with a lot of useless crap and that you learn how CSS works. And you can use modern concepts like CSS variables, nested selectors, dark mode handling etc. to produce good CSS.

6 Likes

Wise words. I will take a deep breath and give it a go. Thanks (I have read your excellent CSS postings).

1 Like

no it doesn’t, the second quote demonstrates I could open them if I wanted to. I don’t. I deliberately dropped word because I no longer want those files. if I really wanted them I would convert them or get word. sorry if I wasn’t clear.

Use whatever you want. See how quickly you can do all this:


title: stuff
author: me
date: Feb 6, 2024

Outline

Other stuff

Several sentences, including

  • a
  • list
  • of
  • points
# comments

print("Hello World!")
flowchart LR
   AA[Tx]
   AB[AB Processing]
   BA[BA Processing]
   BB[Rx]

   AA --> AB
   AB <--> BA
   BA --> BB

Of course, using Mermaid.js and code blocks isn’t something everyone needs to do :wink:

1 Like

so which one is the most future proof? MD or RTF

1 Like

Really? Us mere mortals can tell the future? :wink: :blush:

1 Like

No one can tell you. I’d guess that MD is already more widely adopted than RTF ever was (or will be). And (someone else already mentioned that) RTF can easily be worked with using scripts and basic command line tools. See for example this thread Setting created/modified dates from markdown front matter
Or all the others where people extract information from MD or transform the file’s content.

Though RTF is a clear-text format, it’s nearly impossible to script it (without using third party software like Apple’s Richttext framework), much less handle it with command line tools.

In my opinion, RTF is a dead end. Though the end may be far away.

5 Likes

Scripting rich text using DEVONthink (or TextEdit) is definitely possible, see Scripts > Format for example. At least when using AppleScript :wink:

Some smart templates (e.g. Daily Journal - Text) internally script rich text too. And it’s not limited to visible rich text documents, see e.g. Scripts > Edit > * Replace Text in Documents…

2 Likes

And there is a robust library for Python (used by millions if not more) for RTF. That is unlikely to disappear in the foreseeable future.

1 Like

Last updated 6,5 years ago, the link to the source repository is broken. And I don’t see any documentation…

That doesn’t say anything about the quality of the code, of course. But it’s an indication of the stand-still with this format, I think. And I am wondering how one uses an undocumented library.

Are you sure? I’d expect at least some of the “millions” to raise possible issues, fork the code, etc. Where would that happen?

At least, the original PyRTF lib was only written to generate RTF, not parse it (afaics). Is that true of PyRTF3, too?

Future proofing is relative. RTF and docx are decipherable enough by observation. The format we really don’t want to disappear is zip.

Rename a .docx or .xlsx file to .zip, unzip it, and it is little trouble reading or extracting text from the XML revealed in the zip.

Reverse engineering zip is obviously possible but not trivial if all you have are example zip files with unknown content.

If high school kids can knock out a quick script to extract text from a document, that’s future proof enough for my individual purposes.

Just always make sure you can easily understand your data without your apps. Of course, that’s just me and my need to freely interpret information.

“BIQHa’DIbaH qeylIS Degh,” as they say so clearly in the Klingon Empire (“mileage varies”).

1 Like