Exporting to web site

I have a database with a bunch of groups. If I go to one of the groups and select all the subgroups, I can export it to a website (local folder) as expected.

If I select all the subgroups in another top level group, it doesn’t create a top-level index.html but does create index.html in subfolders corresponding to subgroups.

If I have a group of smart groups, then there are dead links in the output. The files are all there in the database.

I’ve rebuilt the database, verified it, and run the verify and optimize script on it.

The database has about 7500 items in it, many of which are PDF files, and 2400 tags.

I would share the database, but I can’t. It’s got proprietary information in it that would take forever to get permission to share.

Any thoughts on what I should look for to solve the mystery? DT itself shows no symptoms of misbehavior. I believe there is something about replicants or duplicates that is confusing the html export.

Or not - that’s just a wild guess.

Any suggestions appreciated.

I’m still having trouble exporting a large database (~5300 files, mostly pdf) to website format.

It doesn’t create, for example, the top-level index.html file.

If I export a smaller database to website format, it works, using the same options and method.

I’ve rebuilt the large database. Is there anything else I should look at?

Thanks!

Does it create any index file, e.g. in subfolders?

I think I fixed it, but here’s some details to close the loop.

Here’s what I noted prior to fixing the issue:

Yes, it creates index.html in the subdirectories it successfully creates but not in the export root.

The export terminates, mid-process, without error or log entry. It does not export all the top-level groups from my selection in DT.

I have been trying to binary walk my way to the file(s) causing trouble, but haven’t quite pinned it down.

I’ve discovered a group named Archive will fail to completely export if I don’t I remove the 2019 tree. I have a suspicion the export is failing on new-style annotations, where the annotation is outside the group the host file is in, or maybe where there is a mix of new and old style annotations.

If I create a new, small, database with new-style annotations, it exports to web site without trouble.

Curiously, if I select the 5200 items I want the export to website will fail. If I select the same items and duplicate them to a new, empty, database, the new database will export to website without error, as far as I know.

My source database was created long ago, before the new style annotations.

It is very unscientific of me to mention annotations at this point, but I would not be surprised if that turns out to be the answer.

It’s encouraging that even though verify and repair won’t solve the problem, an export to a freshly created database appears to be a workaround.

And, the fix:

I had done “verify and repair” but not “optimize” on the database.

I wrote a database archive, hopefully complete, and then optimized the database. Now it exports without error and appears to be a complete export.

Whew.

Thanks for the time you took to reply, and apologies for not self-rescuing a little quicker.

DT, by the way, is truly cool. It doesn’t have a Flash Gordon look, but that’s probably one of its strengths. It’s a Swiss Army Knife for information.

This shouldn’t cause any issues actually. Please choose Help > Report Bug while pressing the Alt modifier key and send the result to cgrunenberg - at - devon-technologies.com - maybe the logs will contain any useful hints. Thanks!

Email sent, and the problem is back. I’ve also tried to export other databases that I’ve had for a while. I can export a new database, and I think I can always export a database created by selecting everything in one database and duplicating them to a new database.

Most odd.

Hello! Years ago I recall being able to select a bunch of records and then export the thing as an bundle of HTML files (and directories) along with a simple index.html file that showed the whole thing in a clean nested outline format.

  • I have Preferences > WikiLinks > Automatic > Names and Aliases checked.
  • The links from years ago to AppleScript scripts that used to be available to make the index.html file are dead links.
  • Can’t find any onboard solution without a script. (Though I think the old way was just this.)

Any ideas?

Sounds like File > Export > As Website…

It’s exporting html files but no index.html.

Oh geez. I see that in my sloppy rush I didn’t even ask a clear question.

Sorry about that.

It’s the lack of any index.html file. This question has been asked multiple times before, but all the links to the script that adds the missing file are dead links.

Are you going to post the files to a webserver? In that case, the index.html is not necessary if the server is configured correctly.

Otherwise, it should be trivial to write a script that creates the file.

See options of File > Export > As Website… panel.

1 Like

Unglaublich.

Welp, that’s sleep deprivation for you!

Vielen Dank.

By the way, if I were to make my own master index.html page via AppleScript, as @chrillek recommends, what are the rules for how to we should rename records in our repeat loops so that they match the names that DT fabricates during Export > As Website?

Or if there’s a repository of custom index.html scripts that I could look at, that would be great. Records indicate that there was once such a repository, a user community script library. Has that been renamed?

Or maybe there’s a how-to page somewhere outside of the DT Forums?

You don’t have to use AppleScript, if you have skills in other languages. In Python, it’s probably just a few lines of code which is run after the folder files are created. In the folder create file “index.htm”, then Loop to: Read File names in the folder → write to output (index.htm) a line HTML with <a …> property with relative link, end loop. Something like that. Or use AppleScript after the files/folders are created avoiding the DEVONthink questions you ask. Me, I’d live with what DEVONthink creates for index.htm and only roll my own if I wanted to add CSS or other fancy web page stuff. Python has the features to do all that stuff.

1 Like

And, as I said before: index file is not needed in a properly set up webserver

Getting a bit escoteric but I’ll bite anyway. :wink:

That’s true too … but I think you are referring to the setting in a web server that says “list folder contents if no index.htm” setting (I don’t remember the exact nomenclature for Apache and/or Microsoft’s server and it probably is different on different brands of web servers anyway). If that’s the case, you call that setting “proper” whereas some web people would consider it a security issue and not allow it. To each their own, I guess.

And if the files are not intended to go to a web server, but simply a folder holding files and access with file protocols not web protocols with not web server involved, then probably an index.htm file is required for the browser (or other) to work–but frankly, I don’t know how all browsers or other access tools might behave in that situation.

Yes, you summarized all I intended to say with my brief sentence.

I think it’s „directory“ listing in Apache, and it can be set per folder. Might still be a security risk though. I’m not a security person.

1 Like