Jump to content

Paste in markdown


christopherchelpka

Recommended Posts

I’d like the option to highlight text and share it pre-formatted in Markdown.

 

So instead of this: There is no one name that is adequate to give a complete description of God

(Ancient Christian Doctrine) https://accordance.bible/link/read/Ancient_Doctrine#785

 

This: “There is no one name that is adequate to give a complete description of God.”

[Ancient Christian Doctrine](https://accordance.bible/link/read/Ancient_Doctrine#785)

  • Like 3
Link to comment
Share on other sites

I use Markdown a lot, and have thought about rolling my own functionality for this using Pythonista*. Accordance already provides the selected text and a URL to the share sheet, so a fairly short Python script could put the pieces together to produce something like the example above. What's missing is the full name of the module: there's only "Ancient_Doctrine", so the script would have to have a list of module names to expand.

 

Also remember that there are different kinds of modules:

  • For a Bible you'd probably want the verse reference and an abbreviation like "ESV."
  • For something like the Pseudepigrapha or the Perseus Texts, the module name might not be interesting.

 

* Pythonista is an iOS app containing an interpreter for the Python language. Among other things, it can be used from the Share sheet. I think the work is too complicated for Shortcuts, because I don't know if that can get the shared data in two different forms: as text and as a URL.

  • Like 2
Link to comment
Share on other sites

Looking at what Accordance actually provides to the Share sheet, I see that the problem is a bit simpler: they already treat Texts differently, by including the verse reference between parentheses. Also the full (or reasonably abbreviated) module name is included in parentheses for Tools. So a Pythonista implementation should be fairly straightforward.

  • Like 2
Link to comment
Share on other sites

Here's a Pythonista script for the Share sheet that will copy a quotation and use the URL to make a hyperlink in Markdown:

 

Sample output:

 

* “God so loved the world,9 that he gave his only Son” ([John 3:16 ESVS](accord://read/ESVS#John_3.16))

* “The text, “God so loved the world,” shows such an intensity of love. For great indeed and infinite is the distance between the two” ([Ancient Christian Comm. on Scripture](accord://read/ACCS_Complete#118509))

* “Located ten miles inland from Neapolis, Philippi was named after Philip of Macedon, the father of Alexander the Great” ([Holman Atlas](accord://read/Holman_Atlas#2231))

 

It's obviously limited by the data Accordance supplies to the Share sheet:

* There's a "9" in the ESV quote above because Accordance does not eliminate subscript note indicators from the text it shares, although it does eliminate superscripts.

* On the other hand, occasionally it would have been better if it kept the superscript text, like when it indicates the number of a papyrus: “

post-35131-0-25372100-1559638674_thumb.jpeg

post-35131-0-55110900-1559638758_thumb.jpeg

Edited by jlm
  • Like 1
Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...