Easy way to link all URLs in a text.

75 views
Skip to first unread message

Thomas N. Robb

unread,
Jan 23, 2024, 9:11:11 AM1/23/24
to bbe...@googlegroups.com
I was wondering whether BBedit had an easy way to batch link multiple URLs in a text. I did find an old thread on how to create on the topic dating from 2011 but they mainly suggested using GREP. The suggestions worked but were not "easy."

We run a quarterly academic journal, which always has 20-50 references that need to be linked. MS Word has no easy way to create them except manually by hitting <enter> at the end of each link. 

Here's the easy way.  Copy the entire text into the message box of a fresh Google mail. Close the mail and open it again. All of the URLs will now be linked. You can now copy the text with formatting intact back into the original document.

I hope some of you find this useful!

Cheers,
  Tom Robb, Japan

**       Thomas N. Robb, Ph.D., Department of English     **
**                   Kyoto Sangyo University, Japan                  **
**                             Professor Emeritus                            **
**                       <tr...@cc.kyoto-su.ac.jp>                      **

Peter Schoo

unread,
Jan 23, 2024, 10:42:34 AM1/23/24
to bbe...@googlegroups.com, Thomas N. Robb
Tom,

I'm using a text filter (Window > Palettes > Text Filters)


#!/usr/bin/perl -w

use strict;
while (<>) {
print "<a href=", $_, ">", $_, "</a>";
}


and assigned it to a keyboard shortcut. When using, I select the URL and
type the shortcut. This might be a starting point to create a batch.

Otherwise, Search'n Replace maybe.

BR
Peter


Am 23.01.24 um 14:16 schrieb Thomas N. Robb:
> <mailto:tr...@cc.kyoto-su.ac.jp>>                      **
>
> --
> This is the BBEdit Talk public discussion group. If you have a feature
> request or need technical support, please email "sup...@barebones.com"
> rather than posting here. Follow @bbedit on Twitter:
> <https://twitter.com/bbedit <https://twitter.com/bbedit>>
> ---
> You received this message because you are subscribed to the Google
> Groups "BBEdit Talk" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to bbedit+un...@googlegroups.com
> <mailto:bbedit+un...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/bbedit/CAGsQGCvMu8Yxf0hQ%2Bx0HMu65nD7G4c7Cq215p-%3Da4ogiah7gaw%40mail.gmail.com <https://groups.google.com/d/msgid/bbedit/CAGsQGCvMu8Yxf0hQ%2Bx0HMu65nD7G4c7Cq215p-%3Da4ogiah7gaw%40mail.gmail.com?utm_medium=email&utm_source=footer>.
OpenPGP_signature.asc
Reply all
Reply to author
Forward
0 new messages