I use ag to search through my notes. My notes are written down in Markdown files and Markdown cells contained within Jupyter notebooks.
I can search the Markdown files conveniently with ag --markdown .... It would be very handy if something similar could be done with the Jupyter notebook files. But this would require that ag understands the format of these notebooks.
My question: is there a way to search only the Markdown cells for a given string in a Jupyter notebook file? Any pattern matcher used in the solution is acceptable for me (ag, grep, ack, ...).
p.s. The notebooks are composed in JSON. Here's a sample:
$ head notebook.ipynb
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"THIS IS A MARKDOWN STRING"
]
},
{