Using text fragments

(date: 2025-12-03)

Using text fragments

By R. S. Doiel, 2025-12-03

We've forgotten how important links are

(scripting.com, accessed 2025-12-03)

Dave's right. We can't forget the humble link. His one line post nudged me to add a feature to Antenna App. The feature is implemented as a new "action" called "reply". Here's how I started this post you're reading.

antenna reply http://scripting.com/2025/12/01.html#a144337:~:text=We%27ve%20forgotten%20how%20important%20links%20are

That generate a first draft of this post that looked like this.


> We've forgotten how important links are

[cited](http://scripting.com/2025/12/01.html#a144337:~:text=We%27ve%20forgotten%20how%20important%20links%20are) 2025-12-03

It was enough to start things off but the "cited" isn't a useful label IMO. I wound up doing to copy editing. In the next release it'll be more like how this post started.

The reply feature is intended to be minimal. Just enough to avoid a blank page and minimizing the amount of select, copy, paste and formatting I need to do to get going.

The current implementation takes the text fragment URL and turns it into Markdown. The Markdown consists of a block quote holding the reference to what would be highlighted if you clicked the link below it.

The code that parses the text fragment is naive. It only supports the "copy link to highlight" current generated in Desktop Firefox and Chrome. The specification has several ways of indicating the text to "highlight". You can provide the whole text to highlight (this tops out at about a sentence in Firefox). You can provide starting phrase of the text you want to highlight. You can provide start and end phrases bracketing the text to be highlight. I have only implemented the first case. I haven't found a web browser that implements the phrase parts approach yet.

Since the reply action writes to standard out I pipe the result to a draft of the post I am creating. Long run I way want to add explicit filename support, or to allow a quoted text fragment to be appended to an existing post.

https://rsdoiel.github.io/blog/2025/12/03/using_text_fragments.html

Upgrade my Raspberry Pi 500+ to Trixie

(date: 2025-11-28)

Upgrading my Raspberry Pi 500+ to Trixie

By R. S. Doiel, 2025-11-29

I got a Raspberry Pi 500+ running Raspberry Pi OS 5 (bookworm) earlier this month. It has been a really fun computer for my hobby projects. Raspberry Pi OS 6 is now out (Trixie). The official recommendation to update the OS is to back everything, then re-image the drive. My 500+ boots from an NVME drive by default. I don't have access to boot from Ethernet or network boot. So how to proceed?

I have a several set process.

  1. Using a SD Card and Raspberry Pi Imager, create a bootable SD card
  2. Reboot selecting the SD Card as the boot drive
  3. Test Trixie via the SD Card
  4. If the tests work out then install it on the NVME drive and reboot

This is pretty straight forward and reminds me a bit of the old days with DOS and CP/M. The question is step 2.

I've need the new boot menu flash by when I boot up the 500+ plus but haven't payed close attention to it. It just came with the original OS install. The boot menu provides an option to select a boot drive. This makes it much easier than the old days when you had to edit files to change the boot drive.

The challenge was how to make the choice, what key sequence at boot I needed to type out. That was less obvious to be given how fast the 500+ boots from the NVME drive.

To pause the boot process in the boot menu start from a cold boot (power all the way down then power back on) and press the space bar. This will present you with some choices.

Actual steps

  1. backup home directory on Raspberry Pi 500+ (home was one NVME drive)
  2. Confirm firmware is up to date, following the instruction on Raspberry Pi website
  3. Confirm I have the latest Raspberry Pi Imager
  4. Using Raspberry Pi Imager image an SD Card with latest Raspberry Pi OS 6
  5. Power down Raspberry Pi 500+
  6. Power up Raspberry Pi 500+ pressing space bar during boot process
  7. Select boot from SD Card with fresh OS
  8. Setup Raspberry Pi on SD Card, updating to the latest Raspberry Pi Imager
  9. Using the Pi Imager on the SD Card, install a fresh image on the NVME drive (NOTE: This erases the whole drive!!!)
  10. Then finished, power down the 500+
  11. Remove the SD Card from the 500+
  12. Boot 500+ from the NVME, complete the usual setup process
  13. Restore my home directory backup, install latest Go, Deno, OBNC, etc.
https://rsdoiel.github.io/blog/2025/11/29/Upgrade-Pi-500-plus.html

Upgrade my Raspberry Pi 500+ to Trixie

(date: 2025-11-28)

Upgrading my Raspberry Pi 500+ to Trixie

By R. S. Doiel, 2025-11-28

I has a Raspberry Pi 500+ running Raspberry Pi OS 5 (bookworm). It has been a really fun computer for my hobby projects. Raspberry Pi OS 6 is now out (Trixie). The official recommendation to update the OS is to back everything, then re-image the drive. For the Raspberry Pi 500+ the image is on the NVME drive. I don't have access to boot from Ethernet for the 500+ so how to proceed? One approach is install Pi OS on an SD Card, boot from it to re-image the NVME drive.

Here's the multi-step process.

  1. Using a SD Card and Raspberry Pi Imager, create a boot-able SD card
  2. Reboot selecting the SD Card as the boot drive
  3. Test Trixie via the SD Card
  4. If the tests work out then install Trixie on the NVME drive and reboot

This is pretty straight forward and reminds me a bit of the old days with DOS and CP/M. The question is step 2.

I've have seen the new boot menu flash by when I boot up the 500+ plus but haven't payed close attention to it. It came with the original OS install on the Pi 500+. The boot menu provides an option to select a boot drive. This makes it much easier than the old days when you had to edit files to change the boot drive.

My missing bit of information was how to interrupt the regular boot sequence to make the selection. The 500+ boots pretty quickly so it was hard to read the text that flashes by. The answer is to pause the boot process and enter the boot menu start from a cold boot. Power up and press the space bar. This will present you with some choices. Select the number for the drive and proceed.

Actual steps

  1. Backup home directory on Raspberry Pi 500+ (home was one NVME drive)
  2. Confirm firmware is up to date, following the instruction on Raspberry Pi website
  3. Confirm I have the latest Raspberry Pi Imager
  4. Using Raspberry Pi Imager image an SD Card with latest Raspberry Pi OS 6
  5. Power down Raspberry Pi 500+
  6. Power up Raspberry Pi 500+ pressing space bar during boot process
  7. Select boot from SD Card with fresh OS
  8. Setup Raspberry Pi on SD Card, updating to the latest Raspberry Pi Imager
  9. Using the Pi Imager on the SD Card, install a fresh image on the NVME drive (NOTE: This erases the whole drive!!!)
  10. Then finished, power down the 500+
  11. Remove the SD Card from the 500+
  12. Boot 500+ from the NVME, complete the usual setup process
  13. Restore my home directory backup, install latest Go, Deno, OBNC, etc.
https://rsdoiel.github.io/blog/2025/11/28/Upgrade-Pi-500-plus.html

Text fragment links as social expression

(date: 2025-11-17, updated: 2025-11-18)

Text fragment links as social expression

By R. S. Doiel, 2025-11-17

Some of the attraction of the walled gardens like Instagram, X, BlueSky and Mastodon was the ease at which you can "re-post", "reply" or "quote". Automatic linking provides a smooth process. Two or more decades ago this was innovation, today your web browser supports linking via text fragments.

How do I get a text fragment link? Select a phrase or block of text in a web page. Right click to pull up the context menu. Pick the menu item "copy link to highlight". This will create the text fragment link on your computer's clipboard. Where should you paste the link?

Pasting the link into a social media site like BlueSky will focus the conversation there. You can also use the link to direct the conversation to your own site. That's helpful. I think the text fragment link can be more useful than that.

A text fragment link could be a corner stone used to assert a web of our own. The trick is to fully realize the convenience while maximizing the content expressed in the URL. I think it has a place both in the HTML page but also as an integral part of our RSS feeds.

text fragment link as a content unit

When you choose, "copy link to highlight", you're composing a URL. It is a URL with more then a location. It is a URL that holds textual content. The text fragment link's syntax means you can target it for additional processing without needing to evaluate every other link that might be in the web page1. That begs the question, what does this type of link enable?

Below is an example of a text fragment link that points to another of my blog posts. It's pretty hard to read because the important bits are hidden by URL encoding.

https://rsdoiel.github.io/blog/2025/11/13/urls_for_text_fragments.html#:~:text=While%20the%20URL%20syntax%20for%20text%20fragments%20is%20verbose%20getting%20a%20link%20to%20one%20is%20pretty%20easy%20with%20a%20desktop%20web%20browser%2E%20Here%27s%20the%20steps%20I%20use%20with%20desktop%20Firefox

Unpacking it you can find the link to the blog post plus the content that had been selected. If you have a url decoder handy you can break it down into its parts. Example, look at the part of that long, horrible url and look closer at the part after "#:~:text=". That's a description of the quote. You just need to URL decode the spaces and punctuation to recover the text the tells the web browser what to highlight when the web page is opened. Here's the decoded text.

"While the URL syntax for text fragments is verbose getting a link to one is pretty easy with a desktop web browser. Here's the steps I use with desktop Firefox."

That quote and link can form the basis of a post, a reply or a comment. It is enough to provide some context to what I want to highlight or discuss at the original URL. That URL can point anywhere on the web, not just some walled garden. Even better I can include that information as an item in an RSS feed. Syndication offers the opportunity for further discussion.

Because of the unique syntax of that type of URL the link can be easily extracted from both HTML documents and Markdown documents. That means I can turn these text fragments into a dedicated feed of things I've commented on.

text fragment links populating a "commented on" feed

On my site I include a recent posts feed. Many blogs and news sites include a "comments" feed too. The problem with the "comments" feed is you're handing off editorial control to someone else. This usually leads to an investment in moderation in order to avoid the inevitable arrival of spam and trolls. An alternative approach is to produce a "commented on" feed. I like this approach.

A "commented on" feed comes with advantages over an old fashioned comment system and feed.

Since both reader and writer have to opt in to the conversation I believe you can have higher quality engagement.

How do you create a "commented on" feed item?

A single text fragment URL contains the location and the content to be highlighted. What I do with the text fragment depends on my intent. A re-post would just include the highlighted text along with the link to its source. A reply or comment would be formed by adding more. Here's an example of a reply style post expressed in Markdown.


> "While the URL syntax for text fragments is verbose getting a link
> to one is pretty easy with a desktop web browser. Here's the steps
> I use with desktop Firefox."

[This looks promising](https://rsdoiel.github.io/blog/2025/11/13/urls_for_text_fragments.html#:~:text=While%20the%20URL%20syntax%20for%20text%20fragments%20is%20verbose%20getting%20a%20link%20to%20one%20is%20pretty%20easy%20with%20a%20desktop%20web%20browser%2E%20Here%27s%20the%20steps%20I%20use%20with%20desktop%20Firefox)

This simple structure can easily be automated. You could create a text fragment handler in any editor that supports macros or plugins.

The point I am trying to drive home is the text fragment itself provides sufficient content to populate a post or an RSS item element. Add additional text and you have something more meaningful. A text fragment can anchor a discussion. The discussion proceeds by exchanging feed items. A feed reader or aggregator can provide conversation threading by following the trail of text fragment links.

If you use a feed oriented content system the social aspect of posts and replies becomes visible through the in bound and out bound RSS feeds. The social context sort of reveals itself naturally. You don't need a complex social graph represented by activity pub or ATProto. You use trusty old web pages and RSS feeds. The technology does not require change. We simply change how we use it.

next steps

Today, I can manually create a post using a text fragment link. It would be better if there was some light weight automation around it. Several approaches come to mind.

It is an interesting opportunity. Little needs to be created to test the concept. Simple automation can improve the writing experience when handling text fragment links. The technical cost are limited while the practical content benefits could be large. Time for me to add this to my to do list for antennaApp.


  1. A text fragment link is implemented in the query string portion of the URL and that query potion starts with "#:~:" sequence. What follows is instructions of highlighted text to be referenced. ↩︎

https://rsdoiel.github.io/blog/2025/11/17/text_fragment_links_a_social_expression.html

URLS for text fragments

(date: 2025-11-13)

URLS for text fragments

By R. S. Doiel, 2025-11-13

A web innovation that I missed was the wide spread support for text fragments expressed as a URL. This is extremely helpful for both citation and quoting sections of a web page in a blog post. The URL syntax is now widely supported by ever green browsers (e.g. Firefox, Safari and Chrome). You can find a nice explanation at Text fragments on the MDN website.

The syntax is a little funky. Here's an example of selecting the second paragraph in my recent blog post Half-life of Frameworks,

https://rsdoiel.github.io/blog/2025/11/07/half-life-of-frameworks.html#:~:text=The%20way,choice

The sequence #:~: indicates it is a link to a text fragment. The text=The%20way,choice essentially tells the browser to jump to the text block that starts with "The%20way" and ends with "choice". Using this URL in Firefox will bring up the web page and highlight the text fragment centering it in the view.

It is important to realize that web pages with JavaScript can break this feature. I've noticed this on sites like Substack and BlueSky. The link may bring you to the right page but will not behave as expected. Here's an example of a text fragment link that should work but doesn't

https://sarahkendzior.substack.com/notes#:~:text=I%20was%20suspended%20from%20BlueSky%20for%20defending%20the%20honor%20of%20Johnny%20Cash%2E

This should link to Sarah Kendzoir's note entry about being banned from BlueSky for her support of rebutting a WSJ article on Johnny Cash. Instead if you want to link to that entry you must resort to a link exposed with the tiny "dot dot dot" menu.

It is not a browser bug. It's a choice of those who render pages via JavaScript. I get their commercial reasons. One more reason not to link to commercial websites and other walled gardens that break web standards.

How do you easily generate text fragment link?

While the URL syntax for text fragments is verbose getting a link to one is pretty easy with a desktop web browser. Here's the steps I use with desktop Firefox.

  1. navigate to the web page
  2. select the text I want a link to
  3. using the context menu (e.g. right click with my mouse)
  4. click on "Copy Link to Highlight"

I now have a text fragment link saved to my web browser's clipboard (i.e. the copy buffer). I can now paste it into my Markdown document. These steps work on other popular desktop browsers (e.g. Safari, Orion and Chrome).

On mobile it's trickier. There isn't really a context menu like their is on the desktop. I haven't found a menu that will take a text selection from the web browser and include a "Copy Link to Highlight" option for sharing. That's shame. While I don't write blog posts on my phone I do take notes. Maybe mobile OS will catch up to that functionality in the future. I'm not holding by breath.

text fragment URL possibilities

As commercial social web platforms continue to devolve into muck. The open web can take advantage of features text fragment URLs. This could be an advantage in demonstrating the fluidity of the open web. In my experiments I've found it easy to take advantage of text fragment links in Markdown. Their just another link. If you're building Markdown processors you could auto-quote the text when you encounter a text fragment link. That's save some cutting and pasting in the writing process. You could even derive feeds from Markdown documents that include links expressing text fragments. I'm hoping to have a chance to experiment with these features in my antennaApp project.

https://rsdoiel.github.io/blog/2025/11/13/urls_and_text_fragments.html

URLS for text fragments

(date: 2025-11-13)

URLS for text fragments

By R. S. Doiel, 2025-11-13

A web innovation that I missed was the wide spread support for text fragments expressed as a URL. This is extremely helpful for both citation and quoting sections of a web page in a blog post. The URL syntax is now widely supported by ever green browsers (e.g. Firefox, Safari and Chrome). You can find a nice explanation at Text fragments on the MDN website.

The syntax is a little funky. Here's an example of selecting the second paragraph in my recent blog post Half-life of Frameworks,

https://rsdoiel.github.io/blog/2025/11/07/half-life-of-frameworks.html#:~:text=The%20way,choice

The sequence #:~: indicates it is a link to a text fragment. The text=The%20way,choice essentially tells the browser to jump to the text block that starts with "The%20way" and ends with "choice". Using this URL in Firefox will bring up the web page and highlight the text fragment centering it in the view.

It is important to realize that web pages with JavaScript can break this feature. I've noticed this on sites like Substack and BlueSky. The link may bring you to the right page but will not behave as expected. Here's an example of a text fragment link that should work but doesn't

https://sarahkendzior.substack.com/notes#:~:text=I%20was%20suspended%20from%20BlueSky%20for%20defending%20the%20honor%20of%20Johnny%20Cash%2E

This should link to Sarah Kendzoir's note entry about being banned from BlueSky for her support of rebutting a WSJ article on Johnny Cash. Instead if you want to link to that entry you must resort to a link exposed with the tiny "dot dot dot" menu.

It is not a browser bug. It's a choice of those who render pages via JavaScript. I get their commercial reasons. One more reason not to link to commercial websites and other walled gardens that break web standards.

How do you easily generate text fragment link?

While the URL syntax for text fragments is verbose getting a link to one is pretty easy with a desktop web browser. Here's the steps I use with desktop Firefox.

  1. navigate to the web page
  2. select the text I want a link to
  3. using the context menu (e.g. right click with my mouse)
  4. click on "Copy Link to Highlight"

I now have a text fragment link saved to my web browser's clipboard (i.e. the copy buffer). I can now paste it into my Markdown document. These steps work on other popular desktop browsers (e.g. Safari, Orion and Chrome).

On mobile it's trickier. There isn't really a context menu like their is on the desktop. I haven't found a menu that will take a text selection from the web browser and include a "Copy Link to Highlight" option for sharing. That's shame. While I don't write blog posts on my phone I do take notes. Maybe mobile OS will catch up to that functionality in the future. I'm not holding by breath.

text fragment URL possibilities

As commercial social web platforms continue to devolve into muck. The open web can take advantage of features text fragment URLs. This could be an advantage in demonstrating the fluidity of the open web. In my experiments I've found it easy to take advantage of text fragment links in Markdown. Their just another link. If you're building Markdown processors you could auto-quote the text when you encounter a text fragment link. That's save some cutting and pasting in the writing process. You could even derive feeds from Markdown documents that include links expressing text fragments. I'm hoping to have a chance to experiment with these features in my antennaApp project.

https://rsdoiel.github.io/blog/2025/11/13/urls_for_text_fragments.html