DT html export inconsistent

Dear All,
I confess I’m baffled. I’m moving away from the Macintosh, but I’ve got a lot of legacy data bound up in DT. So, after years of ignoring DT’s Export functions, I’m now having to try to understand how they are intended to work.

My version is a little behind, but I’m not planning to update it (MacOS 10.12.6, DT 2.7.2) I’m trying to understand how the html export works/doesn’t work: A lot of my data is in rtfd files. If I select a folder of such notes in devonthink and select File>Export>As Website the result is a folder full of html pages and resources, for example:

Kid on the mountain-0.MP3
Kid on the mountain-1.png
Kid on the mountain-2.png
Kid on the mountain.html

and the html looks as it should: <embed> tags for the audio file, and <img> tags for the images, and in both cases the src attribute points to the appropriate resource in the same folder, eg <img src="./Kid on the mountain-1.png"/>

But in some cases, for no reason that I can see, the html is generated without any accompanying resources. For example, another rtfd file, exactly analogous to the one above, is “Winnie Hayes”. The html is generated without any reference to resources: no <img> files at all, just the text.

Here is the result of “export as website” for “Winnie Hayes”. It references no resources at all, just a blank line where there should have been img tags.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<link rel="stylesheet" type="text/css" href="../website.css"/>
<title>Winnie Hayes</title>
</head>
<body>
<div class="info_top">Music &gt; Edor &gt; Winnie Hayes - Feb 14, 2016, Feb 14, 3:01:13 PM</div>
<div align="left"><font class="font0">nice here: </font><a href="https://youtu.be/ysDYvv2op74"><font class="font0">https://youtu.be/ysDYvv2op74</font></a><font class="font0"> with </font><font class="font0">Legacy Jig</font> </div>
<div align="left"><font class="font0">setting 2 is closest, Cunliff plays f in the terminal bar of each part instead of the g</font><font class="font1">&#9839;
</font></div>
<div align="left"> &nbsp;<br/></div>
<div align="left"><font class="font2">Fits nice with the: </font><u><font class="font3">Swallowtail</font></u> </div>
<div align="left"><font class="font2">or </font><font class="font2">Legacy Jig</font><font class="font0">?</font></div>

<div class="info_bottom"><a href=""></a><br/></div>
</body>
</html>

but if I do “Export Files and Folders” I get an rtfd file whose ‘package’ contents are:

Pasted Graphic 1.tiff
Pasted Graphic.tiff
The Swallowtail (jig) on The Session.pdf
TXT.rtf

Can anyone help me understand why the html export is inconsistent?

Jon

No idea but you’re making me miss my fiddle

1 Like

but if I do “Export Files and Folders” I get an rtfd file whose ‘package’ contents are:

Pasted Graphic 1.tiff
Pasted Graphic.tiff
The Swallowtail (jig) on The Session.pdf
TXT.rtf

That’s the internals of the RTFD file. An RTFD is a special type of folder that looks like a single file. The items (attachments) you add to the file, and the TXT.rtf file are the normal structure in the RTF specification.

Yes @BLUEFROG, that’s exactly what it is; however, my puzzlement arises not from the nature of an rtfd file, but from the inconsistent way that DT handles them in export. The simplest case is as follows:

In DevonThink I create a new “rich text” note, “testNote”. I add some text. I drag in a picture from my file system (in this case, a .gif, a format eminently well supported by html and all browsers). Then I choose File > Export > as Website. In the resulting dialog I select Template: Header+URL+Comment, and Encoding: Unicode(UTF-8), and check the Use HTML Entities box, and click save.

What happens: a file “testNote.html” is created, along with an associated css file. The HTML looks like this:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<link rel="stylesheet" type="text/css" href="website.css"/>
<title>testNote</title>
</head>
<body>
<div class="info_top"> &gt; testNote - Sep 12, 2019, Sep 12, 8:24:16 AM</div>
<div align="left"><font class="font0">Some text and a picture:</font></div>

<div class="info_bottom"><a href=""></a><br/></div>
</body>
</html>

What I expect to happen:
What I would expect is that the html that results would have an img tag with a src attribute thus:
<img src="./001LittleScribe.gif"/>, and that that image would be exported into the same directory along with the html and css files.

Perhaps there is a log generated somewhere that might give a clue as to what’s happening? It’s certainly the case that there is a great deal about DevonThink that I don’t know, and perhaps this is not how export “as Website” is supposed to work; but even if that were true, DevonThink failing silently in this case would seem to me to qualify as a bug.

Anybody?

@jongilizwe: Take up thy fiddle and bow! :smiley:

2 Likes

This should actually be created. Could you send the rich text to cgrunenberg - at - devon-technologies.com? Thanks!