Ideas on how to have DT index a folder including subfolders for only certain file types

I use gitlab to version control jupyter notebooks. I was indexing the parent folder gitlab, but I really did not want to cache all the content of the csv files used for the data analysis or the .git folder that could be very large in size.

Is there a way to just index .ipynb files?

I would like to be able to search DT for a topic keyword and then see all my Jupyter notebooks (.ipynb) files that have a match.

You could set up a smart rule to duplicate or replicate those with the filename extensions of interest into a different folder.

Is there a way to just index .ipynb files?

No this is not possible. DEVONthink indexes whatever is presented in the folder.

1 Like

Thanks. I was trying to do that and then got stuck/ran out of time. I think it needs to be at the file system level, so your idea got me thinking about scripting symbolic links to the ipynb files in a directory that DT indexes. If that works I will probably use Keyboard Maestro or Hazel to take care on creating the links to new notebook files as they are created.

I had tried the Saved Search in Finder, but that does not seem to produce a folder that DT can index.

Aliases and symlinks aren’t indexable in DEVONthink.

Thanks for saving me the effort on that.

No problem.

Just a follow up in case others have a similar use case.

I’m currently using Hazel to monitor my Projects folder and subfolders. If it finds a file that has .py or .ipynb then it will copy to another folder preserving the folder structure.

So ~/Documents/Projects/git_cloned_project/My_notebook.ipynb
gets copied to

~/Project_notebooks/git_cloned_project/My_notebook.ipynb

I then configured DT to index ~/Project_notebooks

If I find a match to a notebook, I know by the folder structure where to find the actual git project if I need to work on it.

I put an additional check in Hazel to see if the file has changed since last matched and I may need to tune it if it impacts my system too much scanning that project folder. If this does not work well, then I will look into git to see if I can have it copy the file upon commits.