scy on Nostr: I need to convert #HTML to #Markdown and I'm looking for a tool to do that. The ...
I need to convert #HTML to #Markdown and I'm looking for a tool to do that.
The output should
• preserve line breaks in paragraphs
• not contain additional, unnecessary linebreaks (e.g. 4 empty lines between paragraphs)
• be configurable (e.g. whether to use * or _ for emphasis, or * vs - for unordered lists)
• if possible, allow me to hook into details (e.g. to convert <pre class="shell"> to ```sh)
#Python or #CLI. Alternatively, what's a _really_ configurable prettifier?
#askFedi

Published at
2024-04-24 16:34:26Event JSON
{
"id": "6583b6d31f49dfcf5a9b1e7035a9e1c44347a1cc76b0392f1ced5e6b4a78207b",
"pubkey": "a071462e960207a7a2272a3f59d042e59623bb2217b56f9365cba21e12213e3e",
"created_at": 1713976466,
"kind": 1,
"tags": [
[
"t",
"cli"
],
[
"emoji",
"BoostOK",
"https://assets.chaos.social/custom_emojis/images/000/299/341/original/0e9f801df9f74cbe.png"
],
[
"t",
"python"
],
[
"t",
"html"
],
[
"t",
"markdown"
],
[
"t",
"askfedi"
],
[
"proxy",
"https://chaos.social/users/scy/statuses/112327161713617163",
"activitypub"
],
[
"L",
"pink.momostr"
],
[
"l",
"pink.momostr.activitypub:https://chaos.social/users/scy/statuses/112327161713617163",
"pink.momostr"
]
],
"content": "I need to convert #HTML to #Markdown and I'm looking for a tool to do that.\n\nThe output should\n\n• preserve line breaks in paragraphs\n• not contain additional, unnecessary linebreaks (e.g. 4 empty lines between paragraphs)\n• be configurable (e.g. whether to use * or _ for emphasis, or * vs - for unordered lists)\n• if possible, allow me to hook into details (e.g. to convert \u003cpre class=\"shell\"\u003e to ```sh)\n\n#Python or #CLI. Alternatively, what's a _really_ configurable prettifier?\n\n#askFedi :BoostOK:",
"sig": "6d67260b4db6aaec8aaa97873976059d2697ba788d4fd2a6e9c2268ceb1df15797fab4f02df66020a7dfd12b6432ab4417bb83eb3c261cfe06861b4a7b2b73ae"
}