💾 Archived View for midnight.pub › posts › 29 captured on 2022-06-11 at 23:14:28. Gemini links have been rewritten to link to archived content

View Raw

More Information

⬅️ Previous capture (2022-04-28)

➡️ Next capture (2024-08-18)

-=-=-=-=-=-=-

Midnight Pub

Script fiddling

~inquiry

THIS PAGE LEFT INTENTIONALLY BLANK

Write a reply

Replies

~inquiry wrote (thread):

So, for example, I copy/paste the second paragraph, above, into a vi (editor) session.

Then I copy the URL to the post containing it.

Then, in the editor, in "command mode", I execute these keystrokes with the cursor on the line containing the text:

!!y1 https://miso.town/post?id=29

which transforms the text to the right sequence of text and tags to result in this when displayed to you:

Take creating a multi-line "quote" of some lines of<br>> content, with the option to associate a URL with it, doing<br>> so in a way that helps the Midnight Pub post rendering<br>> code path "do the right thing" (i.e. what I want it to<br>> do) with respect to keeping the text to no more than 60<br>> columns, while having line breaks that *don't* cause the<br>> aforementioned code path to essentially double line break<br>> the lines by wrapping then all in html paragraph tags....<br>><br>>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;- https://miso.town/post?id=29

Fun!

("y1" is the name of the script... the '!!' tells vi to run the script against selected standard input, replacing it with the standard output of the command)