Replies: 6 comments 3 replies
-
I've been pointed to a similar question in a Discorse forum, but also without a proper solution. |
Beta Was this translation helpful? Give feedback.
-
Alfred uses the same index as the Spotlight, therefore we need a proper mdimporter plugin to make the search work. You can make the Spotlight index Jupyter notebook files as plain text JSON files, but it is not a proper solution. |
Beta Was this translation helpful? Give feedback.
-
You can modify a copy of the built-in rich text mdimporter plugin to handle Jupyter notebook files as plain text. Create a copy of the <key>CFBundleDocumentTypes</key>
<array>
<dict>
<key>CFBundleTypeRole</key>
<string>MDImporter</string>
<key>LSItemContentTypes</key>
<array>
<string>org.jupyter.ipynb</string>
</array>
</dict>
</array> Then put the new plugin into the mdimport -r ~/Library/Spotlight/Jupyter.mdimporter The problem with this workaround is, that it will include not only the actual text content of notebook files but also the JSON markup. However, it's still better than no indexing at all. |
Beta Was this translation helpful? Give feedback.
-
I think, you only need to disable SIP if you want to modify the built-in rich text mdimporter plugin "in place", by adding the new format definition. But if you copy the existing rich text plugin to the Spotlight user's directory and modify a copy of it from there, like I described above, there's no need to mess with SIP.
Not only that, think about embedded base-64-encoded binary content like images. Anyway, a proper mdimporter plugin for Jupyter notebook files would be awesome. |
Beta Was this translation helpful? Give feedback.
-
You don't need to copy to |
Beta Was this translation helpful? Give feedback.
-
Annoying. This used to work fine, and then Ventura stopped indexing those files. Apple, have you lost your way? |
Beta Was this translation helpful? Give feedback.
-
I noticed that at some point my macOS installations stopped indexing Jupyter notebooks using the Spotlight tool. On my macOS Ventura these files are definitely not being indexed. But I do have (false?) memories that this used to work. So I did some research, but could not find any such Spotlight plugins, not to say any plugins at all. Again, I remember there were such plugins available in the past. I can also not add single file extensions in macOS Ventura. And I see almost no similar questions, in fact only this one. I find it very annoying to not be able to search for notebooks using Spotlight, so how do other people solve this? By using other tools like Alfred?
Beta Was this translation helpful? Give feedback.
All reactions