Searching for suttas with verses

Is there a way to search for all suttas with verses even if it is imperfect? Somehow the presentation layer knows it needs to indent and format a certain way. Can the metadata be used in the search?

1 Like

Hmm. Others may have better ideas. But here are some things to know.

All of the Bilara translations (e.g. those by Bhante Sujato) are built by combining minimum of three files: the Pali file, the English file, and the HTML file. Here is the HTML file for AN3.30:

If you look towards the bottom you can see:

"an3.30:4.1": "<blockquote class='gatha'><p><span class='verse-line'>{}</span>",
  "an3.30:4.2": "<span class='verse-line'>{}</span>",
  "an3.30:4.3": "<span class='verse-line'>{}</span>",
  "an3.30:4.4": "<span class='verse-line'>{}</span></p>",
  "an3.30:5.1": "<p><span class='verse-line'>{}</span>",
  "an3.30:5.2": "<span class='verse-line'>{}</span>",
  "an3.30:5.3": "<span class='verse-line'>{}</span>",
  "an3.30:5.4": "<span class='verse-line'>{}</span></p>",

That’s how the software knows to make them into verses.

I’m not sure how you were hoping to work with the data. Here is an experimental app I’ve made that will build an entire nikaya/book from KN:
https://build.readingfaithfully.org/

WARNING: Building the SN and AN involve over 1,000 calls to the database to make them. So it may take a minute.

After you build the book, clicking the copy button actually copies the HTML, not just the text. So if you are more comfortable working with that than with the json files through bilara, that might be a solution.

If you tell me a bit more of what you are looking to do, I might be able to modify that script to get you what you want. Or of course you could fork it on github and do it yourself.

4 Likes