File location by item record identifier?

Yes, the relative should work once exported, but if I want to use an external tool like marked 2 before exporting, then it does not work.

I wonder if it would be of value (to me) to write a simple web server that simply maps DEVONthink item ids to the content? I think it should be possible to programmatically query DEVONthink for the location and stream it back. :thinking:

Correct, for the aforementioned reasons :slight_smile:

1 Like

If I did this, would it be of value to anybody else?

No idea, but if it scratches your itch, go for it. Iā€™d suspect thereā€™s someone that may find use for it.

If you are sending MD files to other people, you really have to think about images and other external content. In that case, you might be better off indexing the files in DT instead of importing them (Iā€™'m not going over the differences here, they have been discussed numerous times here and are also described in detail in the documentation).
Iā€™d suggest to use one folder per ā€œprojectā€, storing the MD file and all images pertaining to it. In that case, using relative references should work in all editors, and you can easily send the files away as a zipā€™d folder. You could also put a link to the CSS file (file system link, not HTML link) in this folder, so that the CSS gets included in the archive.
As to

Why not? There are also some other wheels to be reinvented :wink: Seriously: Thereā€™s apache, thereā€™s nginx, thereā€™s node.js ā€¦ What is the point (except that you may want to learn something). Another webserver (or any webserver, for that matter) will not help you passing on MD files with the images belonging to them, though.

1 Like

ā€œBack to the Futureā€ā€¦

That is a good point. In this case I just meant sharing the content around in my own workflow, across projects. Sharing with other people with critic markup is useful also but even more challenging.

I am doing this with groups for now. My goal is to keep content imported rather than indexed. I am experimenting with Obsidian. Maybe I need to re-think the import vs index.

Hehheh. Well I think I used the wrong words there. What I meant was building a single purpose web service that hosts DEVONthink content by item id. It would be very light, doing only that. I looked at a few Rust libraries that could simplify this project. I have a number of other projects right now so it would make sense to start this one only if it is truly the best way to keep content imported.

The problem I am trying to solve is being able to work with the imported content, in place, using an external tool like Marked 2, not passing the content to another machine or user. When I need to send something to another user I first export the material. This changes the content from something that works for DEVONthink to something that works without DEVONthink. My goal is simply to improve my workflow where content still lives in DEVONthink.

That will be hard to do with images in Markdown files. Thatā€™s why I suggested indexing.

2 Likes

Right, thank you. My goal is to solve this with imported content rather than indexed content. The problem does not exist for indexed content. If I can not solve this for imported content then I will need to re-think my use of DEVONthink.