Source Code in DT / Some evaluation questions


I’m new for DT and evaluating it (Pro and Pro Office) for my current project which contains of a certain amount of source code. Of course I am not developing in DT itself, but I want to use it for collecting some code I found in the internet or which I received from teammates.

Could you please help me to find out whether the following things are possible:

  1. The source files do have several extensions DT does not know like .def or .str. They are not shown as plain text files (even though they are). DT opens the files in the correct IDE after doubleclicking on them, but no preview is shown at all. Is there any way to enable a text-only preview for those extensions?

  2. If I create some annotations for one of those files, how do I find them later? (How do I get from a file to its annotations)? I searched this forum but didn’t find any solution that worked for me (there is not “URL” field?)

  3. Can I create annotations in other formats than RFT (e.g. Markdown or plain text)?

  4. Can I create annotations for a certain part of a document (e.g. a quote, a line or a part of an image)?

  5. Is there a way to trigger a script each time a certain document is saved (modified)?

  6. Is there any possibility to handle several “versions” of a file? Maybe as an “interface” to time machine and archived meta data?

Thank you in advance!

Interesting questions.

  1. DEVONthink uses the Finder’s definition of the parent applications of files. There are a great many variations of text files, defined by the filetype suffix. In some cases, developers have included Quick Look plugins for their variant of a text file, and if so, DEVONthink will use that plugin to provide a Quick Look rendering of the file (and also use the Spotlight plugin for that filetype to index the text content).

But if DEVONthink doesn’t recognize the filetype extension, and if no plugin is provided for Quick Look rendering and for Spotlight indexing, the file when imported cannot be rendered, and any text content hasn’t been indexed. In such a case, the Log (Window > Log) will report that the document is an “Unknown Format”. You can verify whether text content of the document was indexed by adding the Word Count column to the view window; a hyphen will be displayed if no words were detected in the document content.

If the text content of the captured document wasn’t recognized and indexed, searching will be limited to the document Name and other metadata, e.g., tags, Spotlight Comments in the Info panel, etc.

  1. If you use the Annotation template (Data > New with Template > Annotation) to create a rich text annotation document for a selected item, the Annotation note will include the Name of the referenced item, and when the referenced document is selected, a link back to the Annotation note will be displayed in the navigation bar immediately above the panel in which the referenced document is displayed. This link will be inserted in the URL field of the referenced document’s Info panel.

The Annotation note is searchable for content, and could even include a copy of the text content of an unknown file format document if that’s copied/pasted from it while open in the parent application.

  1. Yes, but probably without the automation offered by the Annotation template, such as automatic linking.

  2. If the document to which an Annotation note is linked is a PDF, a Page Link can be copied from the PDF and pasted into the Annotation note, which will open the PDF to the page from which, e.g, a quote was copied. If the document contains searchable text, e.g., an HTML document, a unique “cue string” of text can be selected from the desired document location. Paste the cue string into the Annotation or other text note, enclosed in quotation marks. Use DEVONthink’s Lookup (Command-L) search of the selected cue string (including quotation marks) to perform a phrase search for the cue string.

  3. I’ll defer this one to others.

  4. DEVONthink isn’t “aware” of the versions of files or databases in Time Machine. I handle versions of a file by using Save As in the parent application and capturing the new version into DEVONthink. I would use the original file name plus a date or descriptive suffix to the Name. Illustration of date suffix: Suppose I name my monthly electric bill as Electric Bill 201203 (the electric bill for March, 2012). A Name sort will display all electric bills by date sort. A Name search for “Electric Bill” AND 20* would display all electric bills so far, for the 21st century. A Name search for “Electric Bill” AND 2012* would display all electric bills for the year 2012. A Name search for “Electric Bill” AND 201209 would display my electric bill for September of this year.