Jump to content

DEVONthink Portal


Recommended Posts

devonthink_icon.png
DEVONthink 3 Portal
GitHub Release

Advanced DEVONthink 3 interface for your databases. Search files or groups and interact with them through Alfred.

 

 

Use A dvn [ ] [ . ] [ {query} ]

  • dvn  Displays the available databases
  • dvn . Displays global actions
  • dvn {query} Initiates a global search
  • dvn :c Shows internal configuration

Use B ddvn [ {query} ]

  • ddvn {query} Initiates a file filter brute-force search (fast)

dvn-entry.png

Feature Overview (Selection)

  • Global and Database Search
  • Tag Search with Auto Suggest
  • Document Actions
    • move, replicate, duplicate, create annotation file, find similar items, etc.
    • Extra Get the BibTeX reference or CSL formatted citation from a DOI, ISBN or jstore URL.
      CSL formatted citations can also be generated from an existing BibTeX reference.1
  • Multiple Document Actions
    • move, replicate, open all, reciprocal linking, etc.
  • Navigate the Folder Structure
  • Import New Documents
  • Customizable Annotation Templates
  • Colored Labels
    • Colored Flags on Labeled Records

 

dvn-dbs1.png

dvn-db-search.png

dvn-record-action1.pngdvn-record-action2.png

 

Documentation


You can find the full documentation of the workflow on Github.

 

Edited by zeitlings
v1.0.0
Link to comment
  • 2 weeks later...

Hi 

I was able to download it but it won't run in Venture b/c of security issues.   


And I can''t find the source for the executable in your GitHub repo.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Link to comment

Ah, I shouldn't have linked to the explicit release. There has been another update in the meantime that fixes the problem that was caused by leaving some deprecated paths in place. The security issue is supposed to be dealt with by the permission handler, which should work in the latest release. The executable is always located in the workflow folder (double-click on any object in the Alfred workflow and at the bottom left of the window that opens there is a folder icon that opens that folder when you click on it).

Link to comment
  • 3 months later...

Hi zeitlings, this looks exactly like what I was hoping for from an Alfred - Devon workflow, but I can't seem to get it work.

 

Anything other than "dvn ." gives me the error: "ERROR: DEVONthink 3[Script Filter] Code 133: Exited with error code but no message”. Have tried it with default workflow config as well as all options off, in case it was a custom setting I adjusted that was causing it.

 

I’m assuming it’s probably a permissions issue, or I'm missing something really obvious, but I've exhausted my google-fu and I can't even figure out at which point in the chain it's dying. I also have no idea how to get Alfred to produce a more detailed error log.

 

Am using version v0.2.1-alpha, with Alfred 5.1.1, and DEVONthink 3.9.2, on macOS 13.5, and Hat size 59-60cm, if any of that is of use in helping me.

 

Any insight or direction to the next step in trying to figure out what’s happening would be incredible.

Full debug log if any of it helps:
 

[09:58:57.386] Logging Started...
[09:58:59.209] DEVONthink 3[Script Filter] Queuing argument '(null)'
[09:58:59.465] DEVONthink 3[Script Filter] Script with argv '(null)' finished
[09:58:59.471] ERROR: DEVONthink 3[Script Filter] Code 133: Exited with error code but no message
[09:58:59.561] DEVONthink 3[Script Filter] Queuing argument 't'
[09:58:59.573] DEVONthink 3[Script Filter] Script with argv 't' finished
[09:58:59.576] DEVONthink 3[Script Filter] {
  "rerun" : 0.10000000000000001,
  "skipknowledge" : true,
  "items" : [
    {
      "title" : "Fetching documents from all databases...",
      "icon" : {
        "path" : "icons\/search.png"
      },
      "subtitle" : "",
      "valid" : false
    }
  ],
  "variables" : {
    "rerun" : "did_run",
    "token" : "valid",
    "prev" : "t"
  }
}
[09:58:59.678] DEVONthink 3[Script Filter] Queuing argument 't'
[09:58:59.877] DEVONthink 3[Script Filter] Script with argv 't' finished
[09:58:59.885] ERROR: DEVONthink 3[Script Filter] Code 133: Exited with error code but no message

 

Link to comment

Hey @Epitome, the issue was introduced with a dt3 update a while ago. Other than that, I've been using the workflow quite constantly myself without issues. 

I've just uploaded an updated version that should work for you, hopefully. Let me know how it works out for you!

 

Among numerous internal changes, some things are new, e.g.

  • Import Memory - Groups previously selected for importing are remembered (configurable)
  • Document Filters (Globally and per Database. Accessible via dvn .)
    • Today (files worked on today)
    • Recently Modified
    • Recently Added
    • Due Soon
    • Overdue
  • If a document is locked, it is indicated using Apple's SF Symbols. These may need to be installed.
  • Internal configuration via dvn :c

 

V1.0.0 Release 🎉

Link to comment
  • zeitlings changed the title to DEVONthink Portal
  • 2 weeks later...

This is just fantastic!  It could complete convert me to using DEVONthink entirely.  I'm still trying to get the hang of applying actions to buffered items, but I think that's going to be so handy!

 

One question: I saw that you included this script in the workflow package: dt3ReferenceURL.scpt. How do I get it to run. I use PDF Expert, and I'd love to be able to open the corresponding item in DEVONthink, for further processing, or especially, for creating a Markdown link to the DEVONthink item, which I can then paste into Obsidian or an OmniFocus task – or wherever!  

 

Actually, what would REALLY be useful, is a version of that script that could streamline the process of being in Finder, selecting a particularly file, and being able to jump to the corresponding item in an indexed DEVONthink database.  Any chance this script could be adapted for that?

Link to comment

Hey @Joel a, glad to hear you like it!

 

Regarding your first question, try activating the workflow with the short-cut (by default: ⇧+⌥+Space) while reading a document in PDF Expert. Below your open databases, you will find an option to copy the devonthink-item-link for the current pdf page, provided the pdf does live in one of your databases.

 

image.thumb.png.324d9500ec0425480a867bc8c01c3f03.png

 

FYI, the included script is a dehydrated version of what comes with my DEVONthink ↔ PDF Expert workflow. If you care about deep linking (selection and annotation links), you might want to check it out.

 

42 minutes ago, Joel a said:

Actually, what would REALLY be useful, is a version of that script that could streamline the process of being in Finder, selecting a particularly file, and being able to jump to the corresponding item in an indexed DEVONthink database.  Any chance this script could be adapted for that?

 

Try to send the file(s) selected in Finder to the workflow's Universal Action: Press ⌘+/ (or whatever you have configured) to launch the Alfred "Action panel" where you can find it.

image.thumb.png.583f6e0ddb7d3f350201854b467012f2.png

If the file is indexed by DEVONthink, you will see the "Record Action" for it right away. From there it's just hitting enter or +Enter to jump to the file in Dt3.

If you send multiple files that are indexed, you will see the same actions that are available for buffered documents sent to the Universal Action (Move, Replicate, Link together...).

 

 

Edited by zeitlings
Link to comment
  • 3 months later...

@zeitlings Hello author! The workflow is great and I would like to thank you for the workflow you have made. I am a new user in Alfred and I am very confused in some of the showcases in the readme page. May I get some help? 

Some questions: 

Is it possible to search tags easily across databases? I have to go to a database, press command and then delete the tags|2 and delete the 2 to search all tags, is it possible for the brute search to include certain groups or tags like how the devonthink search works? Or giving it an option to toggle this?

I am quite confused about the record action part, there is a record action A and B, how might I 'activate it'? I can press enter in a file and show the a part, but how could I show the B part. 

These are the most confusing questions I had found, there are still a zillion of them, regarding the universal action part, I cannot 'activate' the dvn|sel and the dvn|uni, and I don't quite understand these functionality. I had found Alfred have a very steep learning curve for my use case. Hope I could get a bit help, as I would really like to use this tool well.

CleanShot 2023-12-08 at 00.13.12@2x.png

CleanShot 2023-12-08 at 00.14.31@2x.png

Link to comment

Hey @wilsonlyt

  

23 hours ago, wilsonlyt said:

Is it possible to search tags easily across databases?

 

Looks like it isn’t. I will add it as an option under dvn . when I get to it. While searching a specific database, e.g. via dvn |dbs|3| you can search for tags by just typing # and the first letter(s) of the tag you are looking for. Here is some more info on this. I'll try to make it available globally for the next update, too. 

image.png.e0b9097a2fc472086e187a7815193127.png

 

23 hours ago, wilsonlyt said:

is it possible for the brute search to include certain groups or tags like how the devonthink search works?

 

Unfortunately no. The "brute force search" just uses Alfred's file filter which looks into the metadata of files and there is no information on groups or tags available for those afaik.

 

23 hours ago, wilsonlyt said:

I am quite confused about the record action part, there is a record action A and B, how might I 'activate it'? I can press enter in a file and show the a part, but how could I show the B part. 

 

Part A is just what you see first when you enter the record actions, i.e. the first 9 items. For "part B" stride down with your arrow keys, they are the items that are just not in view yet. 

 

23 hours ago, wilsonlyt said:

regarding the universal action part, I cannot 'activate' the dvn|sel and the dvn|uni, and I don't quite understand these functionality.

 

Universal Actions are one of the features of Alfred (and something you really should familiarize yourself with to get the most out of Alfred!).

It let's you act on your selection in macOS after pressing a shortcut. From the support page: Alfred uses / by default.

 

To act on one or more files from your DEVONthink database, try selecting these files and pressing command+shift+D. This will bring up the view for |sel|. Choosing to act on all records here is equivalent to selecting the same files, launching Alfred’s Universal-Action-Panel and activating the Action specific to the workflow; this will bring up the view for |uni|. This works from within the DEVONthink database and outside of it. If you send files to the dvn specific Action that are not already in a database, you will not see options to act on the records. Instead, you will see options that allow you to import the new files.

dvn-hotkey-dt3-selection.png

dvn-buffer3-universal-action2.png

dvn-buffer2-universal-action1.png

dvn-import.png

 

 

Also, thanks for the feedback!

Edited by zeitlings
Link to comment
  • 3 weeks later...

Hey!

I just updated the workflow. The most important additions are an optional integration with OpenAI for creating literature review summaries from your documents, and a window and tab switcher for active document windows. Consider setting a hotkey for the switcher, and, of course, be aware that using GPT-4 Turbo can become expensive quickly.

 

dvn-gpt.thumb.png.73443ea278445bb5f902d9ebfd1141af.pngdvn-awd.thumb.png.652a675fce6845baad69f0bee15c155b.png

 

Download: 

GitHub Release

 

Here is the full change log:

 

v1.1.0

  • Added window and tab switcher: accessible through global option (dvn .w) or via shortcut
    • Merge (filtered) windows and tabs into window with tabs
    • Detach tab and open in new window (modifier: ⌘)
  • Added optional OpenAI integration, i.e. an interface for creating literature review summaries from documents at the record action level.
    • Save as markdown annotation file or custom metadata entry. The custom metadata entry allows for copying the summary from the record action interface.
  • Added global option to list all tags dvn .
  • Added global inline tag retrieval dvn #tagname
  • Added global option to delete workspaces (dvn .)
  • Added global option to synchronize all databases (dvn .)
  • Added modifier to synchronize database (modifier: ⌃)
  • Added option to back out of move, replicate, duplicate record
  • Added placeholders for various fetch operations
  • Added hints that an existing workspace will be updated when trying to save a workspace with an already used name
  • Fixed unhandled case with no open database
  • Fixed excluded databases being included in tag search
  • Fixed attempts to save new workspaces with an empty name not being suppressed
  • Refined overall inline tag handling

 

 

 

Edited by zeitlings
Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...