Re: copy out of lynx, replace and paste
Tim Chase <[email protected]>
| Newsgroups | gmane.comp.web.lynx.devel |
|---|---|
| Message-ID | <[email protected]> |
On 2022-03-23 08:21, [email protected] wrote: > lynx makes line-breaks with 3spaces where there would be > normaly a dynamic word wrap in html. You can use lynx to dump the output of a URL to a file if you prefer: $ lynx -width=99999 -dump https://example.com > example.txt which sets the wrap-width to a super-wide value (thus hopefully preventing the wrapping you want to avoid) > 3) doing something "nasty", storing it tmp, let something (i have > done it by python) going over the text for formating it, and put it > back to the clipboard, like yu made a suggestion (thanks!) If you want to un-wrap *everything* (not just the particular pattern of newline-followed-by-three-spaces), it's a lot less complex, as you can use `fmt` with a really wide width $ fmt -w 999999 < wrapped.txt > unwrapped.txt which is a *lot* tidier than my awk solution which targets the very specialized/limited requirement of your original request. -tim