Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > alt.comp.os.windows-10 > #181362 > unrolled thread
| Started by | Marion <marion@facts.com> |
|---|---|
| First post | 2025-01-15 09:20 +0000 |
| Last post | 2025-01-24 01:07 +0000 |
| Articles | 20 on this page of 84 — 11 participants |
Back to article view | Back to alt.comp.os.windows-10
How to edit HTML source file on Windows in one step (not two)? Marion <marion@facts.com> - 2025-01-15 09:20 +0000
Re: How to edit HTML source file on Windows in one step (not two)? Herbert Kleebauer <klee@unibwm.de> - 2025-01-15 11:42 +0100
Re: How to edit HTML source file on Windows in one step (not two)? Marion <marion@facts.com> - 2025-01-15 11:28 +0000
Re: How to edit HTML source file on Windows in one step (not two)? "R.Wieser" <address@is.invalid> - 2025-01-15 13:35 +0100
Re: How to edit HTML source file on Windows in one step (not two)? Marion <marion@facts.com> - 2025-01-15 18:10 +0000
Re: How to edit HTML source file on Windows in one step (not two)? "R.Wieser" <address@is.invalid> - 2025-01-15 22:15 +0100
Re: How to edit HTML source file on Windows in one step (not two)? "R.Wieser" <address@is.invalid> - 2025-01-16 14:29 +0100
Re: How to edit HTML source file on Windows in one step (not two)? "Carlos E.R." <robin_listas@es.invalid> - 2025-01-15 13:36 +0100
Re: How to edit HTML source file on Windows in one step (not two)? Marion <marion@facts.com> - 2025-01-15 18:10 +0000
Re: How to edit HTML source file on Windows in one step (not two)? "Carlos E.R." <robin_listas@es.invalid> - 2025-01-16 23:08 +0100
Re: How to edit HTML source file on Windows in one step (not two)? Marion <marion@facts.com> - 2025-01-17 04:28 +0000
Re: How to edit HTML source file on Windows in one step (not two)? Herbert Kleebauer <klee@unibwm.de> - 2025-01-17 10:03 +0100
Re: How to edit HTML source file on Windows in one step (not two)? Marion <marion@facts.com> - 2025-01-17 18:37 +0000
Re: How to edit HTML source file on Windows in one step (not two)? "Carlos E.R." <robin_listas@es.invalid> - 2025-01-18 14:33 +0100
Re: How to edit HTML source file on Windows in one step (not two)? Newyana2 <newyana@invalid.nospam> - 2025-01-15 09:04 -0500
Re: How to edit HTML source file on Windows in one step (not two)? Marion <marion@facts.com> - 2025-01-15 18:09 +0000
Re: How to edit HTML source file on Windows in one step (not two)? Newyana2 <newyana@invalid.nospam> - 2025-01-15 13:49 -0500
Re: How to edit HTML source file on Windows in one step (not two)? Marion <marion@facts.com> - 2025-01-15 20:03 +0000
Re: How to edit HTML source file on Windows in one step (not two)? Newyana2 <newyana@invalid.nospam> - 2025-01-15 16:00 -0500
Re: How to edit HTML source file on Windows in one step (not two)? Marion <marion@facts.com> - 2025-01-16 02:16 +0000
Re: How to edit HTML source file on Windows in one step (not two)? Lawrence D'Oliveiro <ldo@nz.invalid> - 2025-01-18 06:47 +0000
Re: How to edit HTML source file on Windows in one step (not two)? Newyana2 <newyana@invalid.nospam> - 2025-01-18 09:09 -0500
Re: How to edit HTML source file on Windows in one step (not two)? "Carlos E.R." <robin_listas@es.invalid> - 2025-01-18 15:25 +0100
Re: How to edit HTML source file on Windows in one step (not two)? Newyana2 <newyana@invalid.nospam> - 2025-01-18 13:55 -0500
Re: How to edit HTML source file on Windows in one step (not two)? gazelle@shell.xmission.com (Kenny McCormack) - 2025-01-18 20:15 +0000
Re: How to edit HTML source file on Windows in one step (not two)? "Carlos E.R." <robin_listas@es.invalid> - 2025-01-18 21:19 +0100
Re: How to edit HTML source file on Windows in one step (not two)? Lawrence D'Oliveiro <ldo@nz.invalid> - 2025-01-18 20:55 +0000
Re: How to edit HTML source file on Windows in one step (not two)? "Carlos E.R." <robin_listas@es.invalid> - 2025-01-18 23:29 +0100
Re: How to edit HTML source file on Windows in one step (not two)? Lawrence D'Oliveiro <ldo@nz.invalid> - 2025-01-19 00:44 +0000
Re: How to edit HTML source file on Windows in one step (not two)? "Carlos E.R." <robin_listas@es.invalid> - 2025-01-19 03:50 +0100
Re: How to edit HTML source file on Windows in one step (not two)? "Carlos E.R." <robin_listas@es.invalid> - 2025-01-19 03:56 +0100
Re: How to edit HTML source file on Windows in one step (not two)? Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2025-01-19 09:43 +0100
Re: How to edit HTML source file on Windows in one step (not two)? "Carlos E.R." <robin_listas@es.invalid> - 2025-01-19 14:16 +0100
Re: How to edit HTML source file on Windows in one step (not two)? Marion <marion@facts.com> - 2025-01-19 21:27 +0000
Re: How to edit HTML source file on Windows in one step (not two)? Eric Pozharski <apple.universe@posteo.net> - 2025-01-22 17:57 +0000
Re: How to edit HTML source file on Windows in one step (not two)? Newyana2 <newyana@invalid.nospam> - 2025-01-19 08:18 -0500
Re: How to edit HTML source file on Windows in one step (not two)? Lawrence D'Oliveiro <ldo@nz.invalid> - 2025-01-20 01:13 +0000
Re: How to edit HTML source file on Windows in one step (not two)? Lawrence D'Oliveiro <ldo@nz.invalid> - 2025-01-20 01:15 +0000
Re: How to edit HTML source file on Windows in one step (not two)? "Carlos E.R." <robin_listas@es.invalid> - 2025-01-20 14:00 +0100
Re: How to edit HTML source file on Windows in one step (not two)? Lawrence D'Oliveiro <ldo@nz.invalid> - 2025-01-21 04:48 +0000
Re: How to edit HTML source file on Windows in one step (not two)? "Carlos E.R." <robin_listas@es.invalid> - 2025-01-21 13:28 +0100
Re: How to edit HTML source file on Windows in one step (not two)? Newyana2 <newyana@invalid.nospam> - 2025-01-21 08:39 -0500
Re: How to edit HTML source file on Windows in one step (not two)? Frank Slootweg <this@ddress.is.invalid> - 2025-01-21 14:00 +0000
Re: How to edit HTML source file on Windows in one step (not two)? Lawrence D'Oliveiro <ldo@nz.invalid> - 2025-01-22 00:09 +0000
Re: How to edit HTML source file on Windows in one step (not two)? Newyana2 <newyana@invalid.nospam> - 2025-01-18 16:56 -0500
Re: How to edit HTML source file on Windows in one step (not two)? gazelle@shell.xmission.com (Kenny McCormack) - 2025-01-18 21:57 +0000
Re: How to edit HTML source file on Windows in one step (not two)? Newyana2 <newyana@invalid.nospam> - 2025-01-18 17:40 -0500
Re: How to edit HTML source file on Windows in one step (not two)? "Carlos E.R." <robin_listas@es.invalid> - 2025-01-18 23:33 +0100
Re: How to edit HTML source file on Windows in one step (not two)? Lawrence D'Oliveiro <ldo@nz.invalid> - 2025-01-18 20:54 +0000
Re: How to edit HTML source file on Windows in one step (not two)? Lawrence D'Oliveiro <ldo@nz.invalid> - 2025-01-18 20:50 +0000
Re: How to edit HTML source file on Windows in one step (not two)? Newyana2 <newyana@invalid.nospam> - 2025-01-18 17:36 -0500
Re: How to edit HTML source file on Windows in one step (not two)? Lawrence D'Oliveiro <ldo@nz.invalid> - 2025-01-19 00:46 +0000
Re: How to edit HTML source file on Windows in one step (not two)? Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2025-01-19 10:00 +0100
Re: How to edit HTML source file on Windows in one step (not two)? Marion <marion@facts.com> - 2025-01-19 21:16 +0000
Re: How to edit HTML source file on Windows in one step (not two)? Lawrence D'Oliveiro <ldo@nz.invalid> - 2025-01-20 03:04 +0000
Re: How to edit HTML source file on Windows in one step (not two)? Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2025-01-20 09:26 +0100
Re: How to edit HTML source file on Windows in one step (not two)? Lawrence D'Oliveiro <ldo@nz.invalid> - 2025-01-21 04:47 +0000
Re: How to edit HTML source file on Windows in one step (not two)? Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2025-01-21 07:41 +0100
Re: How to edit HTML source file on Windows in one step (not two)? Lawrence D'Oliveiro <ldo@nz.invalid> - 2025-01-22 00:11 +0000
Re: How to edit HTML source file on Windows in one step (not two)? Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2025-01-22 11:48 +0100
Strange questions (Was: How to edit HTML source file on Windows in one step (not two)?) gazelle@shell.xmission.com (Kenny McCormack) - 2025-01-22 13:13 +0000
Re: Strange questions (Was: How to edit HTML source file on Windows in one step (not two)?) Marion <marion@facts.com> - 2025-01-22 19:54 +0000
Re: Strange questions (Was: How to edit HTML source file on Windows in one step (not two)?) Lawrence D'Oliveiro <ldo@nz.invalid> - 2025-01-22 22:25 +0000
Re: Strange questions (Was: How to edit HTML source file on Windows in one step (not two)?) Marion <marion@facts.com> - 2025-01-23 04:29 +0000
Re: Strange questions (Was: How to edit HTML source file on Windows in one step (not two)?) Newyana2 <newyana@invalid.nospam> - 2025-01-23 08:20 -0500
Re: Strange questions (Was: How to edit HTML source file on Windows in one step (not two)?) Marion <marion@facts.com> - 2025-01-23 21:02 +0000
Re: Strange questions (Was: How to edit HTML source file on Windows in one step (not two)?) Marion <marion@facts.com> - 2025-01-23 22:18 +0000
Re: Strange questions (Was: How to edit HTML source file on Windows in one step (not two)?) Frank Miller <miller@posteo.ee> - 2025-01-24 00:25 +0100
Re: Strange questions (Was: How to edit HTML source file on Windows in one step (not two)?) Marion <marion@facts.com> - 2025-01-23 23:35 +0000
Re: Strange questions (Was: How to edit HTML source file on Windows in one step (not two)?) Lawrence D'Oliveiro <ldo@nz.invalid> - 2025-01-23 23:48 +0000
Re: Strange questions (Was: How to edit HTML source file on Windows in one step (not two)?) Marion <marion@facts.com> - 2025-01-24 00:48 +0000
Re: Strange questions (Was: How to edit HTML source file on Windows in one step (not two)?) Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2025-01-24 11:30 +0100
Re: Strange questions (Was: How to edit HTML source file on Windows in one step (not two)?) Frank Miller <miller@posteo.ee> - 2025-01-24 00:49 +0100
Re: Strange questions (Was: How to edit HTML source file on Windows in one step (not two)?) Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2025-01-24 10:40 +0100
Re: Strange questions (Was: How to edit HTML source file on Windows in one step (not two)?) Marion <marion@facts.com> - 2025-01-24 18:03 +0000
Re: Strange questions (Was: How to edit HTML source file on Windows in one step (not two)?) Marion <marion@facts.com> - 2025-01-24 18:14 +0000
Re: Strange questions (Was: How to edit HTML source file on Windows in one step (not two)?) Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2025-01-25 14:22 +0100
Re: Strange questions (Was: How to edit HTML source file on Windows in one step (not two)?) "Carlos E.R." <robin_listas@es.invalid> - 2025-01-25 14:39 +0100
Re: Strange questions (Was: How to edit HTML source file on Windows in one step (not two)?) Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2025-01-25 17:48 +0100
Re: Strange questions (Was: How to edit HTML source file on Windows in one step (not two)?) Lawrence D'Oliveiro <ldo@nz.invalid> - 2025-01-23 23:46 +0000
Re: How to edit HTML source file on Windows in one step (not two)? "Carlos E.R." <robin_listas@es.invalid> - 2025-01-16 15:05 +0100
Re: How to edit HTML source file on Windows in one step (not two)? Newyana2 <newyana@invalid.nospam> - 2025-01-16 11:08 -0500
Re: How to edit HTML source file on Windows in one step (not two)? "Carlos E.R." <robin_listas@es.invalid> - 2025-01-16 23:03 +0100
Re: How to edit HTML source file on Windows in one step (not two)? Marion <marion@facts.com> - 2025-01-24 01:07 +0000
Page 4 of 5 — ← Prev page 1 2 3 [4] 5 Next page →
| From | gazelle@shell.xmission.com (Kenny McCormack) |
|---|---|
| Date | 2025-01-22 13:13 +0000 |
| Subject | Strange questions (Was: How to edit HTML source file on Windows in one step (not two)?) |
| Message-ID | <vmqqui$3a08v$1@news.xmission.com> |
| In reply to | #181651 |
In article <vmqid8$varl$1@dont-email.me>, Janis Papanagnou <janis_papanagnou+ng@hotmail.com> wrote: ... >This is a strange question from someone who was elsethread advocating >an open, flexible editor interface (as Emacs or Vim have). I think whoever posted the story about the guys in the photo editing group hit the nail directly on the head. -- The whole aim of practical politics is to keep the populace alarmed (and hence clamorous to be led to safety) by menacing it with an endless series of hobgoblins, all of them imaginary. H. L. Mencken
[toc] | [prev] | [next] | [standalone]
| From | Marion <marion@facts.com> |
|---|---|
| Date | 2025-01-22 19:54 +0000 |
| Subject | Re: Strange questions (Was: How to edit HTML source file on Windows in one step (not two)?) |
| Message-ID | <vmrida$2uab$1@nnrp.usenet.blueworldhosting.com> |
| In reply to | #181653 |
On Wed, 22 Jan 2025 13:13:54 -0000 (UTC), Kenny McCormack wrote :
>>This is a strange question from someone who was elsethread advocating
>>an open, flexible editor interface (as Emacs or Vim have).
>
> I think whoever posted the story about the guys in the photo editing group
> hit the nail directly on the head.
Are you referring to a thread in this newsgroup perhaps?
<https://www.novabbs.com/computers/thread.php?group=alt.comp.os.windows-10>
Perhaps this specific thread maybe?
*How to edit HTML source file on Windows in one step (not two)?*
<https://www.novabbs.com/computers/article-flat.php?id=84218&group=alt.comp.os.windows-10#84218>
The original non-sidetracked goal was resolved by Herbert in this post:
<https://www.novabbs.com/computers/article-flat.php?id=84219&group=alt.comp.os.windows-10#84219>
Where that solution was further improved upon in this (& other) posts:
<https://www.novabbs.com/computers/article-flat.php?id=84220&group=alt.comp.os.windows-10#84220>
Which, generalized for any editor, is the following pseudocode example:
a. mozilla-based-browser.exe about:config
b. view_source.editor.external (change from the default of false to true)
c. view_source.editor.path C:\path\to\your\favorite\text\editor.exe
d. mozilla-based-browser.exe file:///C:/sys/bookmarks.html
e. Control+u
The proposed solution happened to use Firefox & the Windows gvim editor.
a. firefox.exe about:config
b. view_source.editor.external (change from the default of false to true)
c. view_source.editor.path C:\programs\editors\text\gvim.exe
d. firefox.exe file:///C:/sys/bookmarks.html
e. Control+u
But, later on, someone had asked about why anyone would want to use gVim.
I think the problem was that the person asking that didn't know about
regular expressions & hence he deprecated the use of regexp in editors.
That same person who deprecated regexp also said he had no idea why a
template would be useful when someone munches HTML code into useful links.
Later on, that same person who deprecated regexp also claimed to not
be aware that Notepad++ has wondrously powerful "xml" macro capabilities.
[C:\Program Files\Editors\Text\Notepad++\shortcuts.xml]
And, that same person advocated writing VBS code instead of simply using
the macros inherent in powerful editors such as Notepad, Emacs & Vim.
Yet, the most complex code that person could write, according to his own
claims, was a VBS script that did a simple word count (which, we all know,
can be accomplished with the wc macro in Vim, e.g., g+<control+G>.
The problem, as I saw it anyway, was that person stated that everything
he didn't know, he disliked - yet everything that he knew - he liked.
Which is fine - as everyone is welcome to their own opinions - but
his opinions were based only on what he did not know already existed.
Hence, he understood not a word of what the solution turned out to be.
An example that person was unable to understand was this one of changing
the "foo" & "bar" in the HTML template to something useful. For example:
CHANGE THIS TEMPLATE FROM:
<HR>
<A HREF=https://www.amazon.com/s?k=foo+bar>(amazon) foo bar</A><P>
<A HREF=https://www.amazon.com/vine/vine-items?search=foo%20bar>(vine) foo bar</A><P>
<HR>
CHANGE THAT TEMPLATE TO:
<HR>
<A HREF=https://www.amazon.com/s?k=windows+pc>(amazon) windows pc</A><P>
<A HREF=https://www.amazon.com/vine/vine-items?search=windows%20pc>(vine) windows pc</A><P>
<HR>
USING A REGEXP MACRO BELOW - which is described fully so as to add
value to every post so that everyone always benefits from every body.
qq
:%s/foo/windows/g<CR>
:%s/bar/pc/g<CR>
q
That efficient set of character inputs is fully described below:
qq: Starts recording a macro into register "q".
:%s/foo/windows/g<CR>: This line performs a global substitution.
% selects the entire file.
s initiates the substitution command.
foo is the pattern to be searched for.
windows is the replacement string.
/g replaces all occurrences of the pattern on the current line.
<CR> presses the Enter key to execute the command.
:%s/bar/pc/g<CR>: This line performs another global substitution,
replacing all instances of "bar" with "pc"
on the current line.
q: Stops recording the macro.
Once you've defined the macro, to use the macro:
Place the cursor on the line you want to modify.
Press @q to execute the recorded macro on the current line.
This macro will efficiently replace all occurrences of "foo"
with "windows" and "bar" with "pc" within the current line.
Note:
This macro only affects the current line.
To apply the macro to multiple lines, you can use visual mode
to select the desired lines and then execute the macro.
In summary, a working solution was proposed, but some people
didn't understand it (which is fine). One open item was there
doesn't seem to be a suitable platform-independent HTML editor.
Is there?
--
The goal is always to be purposefully helpful in adding value!
[toc] | [prev] | [next] | [standalone]
| From | Lawrence D'Oliveiro <ldo@nz.invalid> |
|---|---|
| Date | 2025-01-22 22:25 +0000 |
| Subject | Re: Strange questions (Was: How to edit HTML source file on Windows in one step (not two)?) |
| Message-ID | <vmrr9c$18478$1@dont-email.me> |
| In reply to | #181659 |
On Wed, 22 Jan 2025 19:54:21 -0000 (UTC), Marion wrote: > Yet, the most complex code that person could write, according to his own > claims, was a VBS script that did a simple word count (which, we all > know, can be accomplished with the wc macro in Vim, e.g., g+<control+G>. Remember, the code I linked to was doing a count of the words of text in an HTML file, ignoring markup.
[toc] | [prev] | [next] | [standalone]
| From | Marion <marion@facts.com> |
|---|---|
| Date | 2025-01-23 04:29 +0000 |
| Subject | Re: Strange questions (Was: How to edit HTML source file on Windows in one step (not two)?) |
| Message-ID | <vmsgis$1mvs$1@nnrp.usenet.blueworldhosting.com> |
| In reply to | #181660 |
On Wed, 22 Jan 2025 22:25:49 -0000 (UTC), Lawrence D'Oliveiro wrote : >> Yet, the most complex code that person could write, according to his own >> claims, was a VBS script that did a simple word count (which, we all >> know, can be accomplished with the wc macro in Vim, e.g., g+<control+G>. > > Remember, the code I linked to was doing a count of the words of text in > an HTML file, ignoring markup. Oh. Thanks. I stand corrected. Me culpa. I publicly apologize for deprecating the "wc" that you were discussing. My mistake. In my defense, I was concentrating on solving the problem, where writing a VBS script to munge HTML wasn't likely to be the general purpose solution. Back to the main topic, I think Herbert's general purpose solution works for everyone on Mozilla-based web browsers, which is to define your favorite HTML editor and then to bring it up in one step using Control+u. In my case, that favorite editor is the venerable cross-platform gvim, which, in my case, I've been using in some form or other for decades. As described prior, I employ gvim macros to convert a template into a line of HTML code for Amazon Vine orders <https://amazon.com/vine/about>. That's my specific need - but - I'm always all about general purpose solutions, where my proposal works as well for a platform-independent browser-independent machine-independent global bookmarks.htm file. I am currently using gvim, for example, to add to that bookmarks.htm file. Each URL I want to add, I simply add it by copying & munging this template. <HR> <A HREF=https://foo.com/bar>foo bar</A><P> <HR> With this method, a single bookmarks.htm file is used by the whole system. The editing capability of gvim allows me to munge that HTML to do that. I even posted this article (and every Usenet post) using telnet & gvim, since Marek Novotny (may he rest in peace) originally wrote my newsreader. While gvim isn't intended to be an HTML editor, it would be nice to find a free cross-platform simple-to-use yet powerful HTML editor for this task. Does anyone have a suggestion for a good cross-platform free HTML editor?
[toc] | [prev] | [next] | [standalone]
| From | Newyana2 <newyana@invalid.nospam> |
|---|---|
| Date | 2025-01-23 08:20 -0500 |
| Subject | Re: Strange questions (Was: How to edit HTML source file on Windows in one step (not two)?) |
| Message-ID | <vmtfma$1l5a0$1@dont-email.me> |
| In reply to | #181663 |
On 1/22/2025 11:29 PM, Marion wrote:
>
> While gvim isn't intended to be an HTML editor, it would be nice to find a
> free cross-platform simple-to-use yet powerful HTML editor for this task.
>
> Does anyone have a suggestion for a good cross-platform free HTML editor?
Ha! You scandalous turncoat, you. To think, the vim
community trusted you as one of their own. But now you
betray them. Next you'll want a separate editor for writing
prose and another for javascript. I've seen this before.
HTML editors are a gateway drug to the 21st century.
Free, cross-platform, HTML editors for writing a single
anchor tag? I guess that pretty much boils it down to
VSCode. It's free, cross-platform and probably less than
2 GB. I'm guessing it has REAL colorcoding of text and
"intellisense" menus. It's a sophisticated IDE. You can really
show that A tag who's boss with VSCode.
Surprisingly, most HTML editors are actually quite expensive.
It seems like there were dozens of free ones back in the 90s.
For Windows-only there are various lightweight options, like
maybe CoffeeCup. They're still around and still offering a basic
editor. On Linux I recommend vim or emacs, the same editors
that are best for prose writing, image editing, and for use as a
scratch-resistant finish on your car. I hear that you can even
write a Tinder profile generator for vim in Lisp. "Enjoy late-night
coding of Perl with Pepsi and Doritos. Long walks on the beach..." :)
[toc] | [prev] | [next] | [standalone]
| From | Marion <marion@facts.com> |
|---|---|
| Date | 2025-01-23 21:02 +0000 |
| Subject | Re: Strange questions (Was: How to edit HTML source file on Windows in one step (not two)?) |
| Message-ID | <vmuaoe$833$1@nnrp.usenet.blueworldhosting.com> |
| In reply to | #181674 |
On Thu, 23 Jan 2025 08:20:58 -0500, Newyana2 wrote : >> Does anyone have a suggestion for a good cross-platform free HTML editor? > > Ha! You scandalous turncoat, you. WTF? What's needed for general use is a bookmarks file editor. But we can start simpler than that, with a bookmarks file "appendor". By that, I mean we can run a batch script to append a new bookmark to the global bookmark file that works for all browsers, all platforms. The input to that script is the easy part as that would be only 2 things: 1. The link (e.g., https://www.google.com/search?q=foo+bar) 2. The description of that link (my search) That 'easy' part can be done with a Windows batch script: @echo off REM addbm.bat adds another link to the global bookmark file setlocal setlocal EnableDelayedExpansion set bmfile=C:\path\to\bm.htm echo.Global bookmark file is %bmfile% :input echo.Enter URL: set /p "url=" echo.Enter Description: set /p "description=" echo.Adding... %url% and %description% :append_html REM I need help escaping the angle brackets below! REM echo.<A HREF="%url%">%description%</A><P> >> %bmfile% REM echo.\<A HREF="%url%"\>%description%\<\/A\>\<P\> >> %bmfile% REM echo.^<^A HREF="%url%"^>^%description%^<^/A^>^^<P^>^ >> %bmfile% This works but I had to replace angle brackets with square brackets: echo.[A HREF="%url%"]%description%[/A][P] >> %bmfile% echo.%url% of %description% added to %bmfile% pause endlocal My main problem above is simply I can't figure out (yet) how to escape the angle brackets "<" & ">" in the echo command. Anyone know how to escape those angle brackets in a batch script?
[toc] | [prev] | [next] | [standalone]
| From | Marion <marion@facts.com> |
|---|---|
| Date | 2025-01-23 22:18 +0000 |
| Subject | Re: Strange questions (Was: How to edit HTML source file on Windows in one step (not two)?) |
| Message-ID | <vmuf7f$2pj6$1@nnrp.usenet.blueworldhosting.com> |
| In reply to | #181679 |
On Thu, 23 Jan 2025 21:02:07 -0000 (UTC), Marion wrote : > Anyone know how to escape those angle brackets in a batch script? I solved that problem so that everyone can benefit from this simple batch script, which you can tie to your Win+R runbox pinned to your taskbar: Taskbar:Runbox > addbm Where in the Registry you have added the "addbm.exe" key below: HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\ addbm.exe = C:\path\to\addbm.bat And where the addbm.bat file contains the following working code: @echo off REM addbm.bat adds another link to the global bookmark file setlocal setlocal EnableDelayedExpansion set bmfile=C:\path\to\global\bookmarks\bm.htm echo.Global bookmark file is %bmfile% :input echo.Enter URL: set /p "url=" echo.Enter Description: set /p "description=" echo.Adding... %url% and %description% to the global bookmarks file :append_html echo.^<A HREF="%url%"^>%description%^</A^>^<P^> >> %bmfile% echo.%url% of %description% added to the global bookmark file %bmfile% pause REM What would be nice is to bring up a simple HTML editor also set editor=gvim %editor% %bmfile% endlocal Please improve so that billions of people can benefit from this script which appends a new URL & description to the users' global bookmarks.
[toc] | [prev] | [next] | [standalone]
| From | Frank Miller <miller@posteo.ee> |
|---|---|
| Date | 2025-01-24 00:25 +0100 |
| Subject | Re: Strange questions (Was: How to edit HTML source file on Windows in one step (not two)?) |
| Message-ID | <6792CFCD.7020704@backwurst.de> |
| In reply to | #181680 |
Marion wrote: [..snip..] > Please improve so that billions of people can benefit from this script > which appends a new URL & description to the users' global bookmarks. WOW!I'm really impressed! That's a new level of super egocentric hubris. Tried that right now on my Linux-System and it didn't do *anything*! A really crappy programmed script.
[toc] | [prev] | [next] | [standalone]
| From | Marion <marion@facts.com> |
|---|---|
| Date | 2025-01-23 23:35 +0000 |
| Subject | Re: Strange questions (Was: How to edit HTML source file on Windows in one step (not two)?) |
| Message-ID | <vmujn4$29mf$1@nnrp.usenet.blueworldhosting.com> |
| In reply to | #181683 |
On Fri, 24 Jan 2025 00:25:01 +0100, Frank Miller wrote : >> Please improve so that billions of people can benefit from this script >> which appends a new URL & description to the users' global bookmarks. > > WOW!I'm really impressed! That's a new level of super egocentric hubris. > Tried that right now on my Linux-System and it didn't do *anything*! > A really crappy programmed script. Funny you mention what I was working on for my dual-boot desktop PC... It's not done yet, but even though the linux newsgroups were NOT on the newsgroups list, since you complained that the script worked for only Windows users, here's an unfinished yet equivalent Linux Bash script, which I'm sure you will certainly test for the team since you are a purposefully helpful poster, Frank Miller. Please post back with your comments on how well it worked in your tests. Thanks! #!/bin/bash # 1. Set your preferred text or HTML editor editor="vi" # Replace with your preferred editor (e.g., nano, vim) # 2. Set the location of your global bookmark HTML file bmfile="/path/to/your/bookmarks/file/bm.htm" # Replace with the path echo "Global bookmark file is $bmfile" read -p "Enter URL: (e.g., https://amazon.com/vine/about) " url read -p "Enter Description: (e.g., Amazon Vine Program) " description echo "Adding... \"$url\" as \"$description\"" echo "<A HREF=\"$url\">$description</A><P>" >> "$bmfile" echo "\"$url\" as \"$description\" added to \"$bmfile\"" read -p "Do you want to edit the global bookmark file? [y/n] " choice if [[ $choice == "y" || $choice == "Y" ]]; then echo "Editing file: $bmfile" $editor "$bmfile" elif [[ $choice == "n" || $choice == "N" ]]; then echo "File editing canceled." fi read -p "Press Enter to continue..." --
[toc] | [prev] | [next] | [standalone]
| From | Lawrence D'Oliveiro <ldo@nz.invalid> |
|---|---|
| Date | 2025-01-23 23:48 +0000 |
| Subject | Re: Strange questions (Was: How to edit HTML source file on Windows in one step (not two)?) |
| Message-ID | <vmukfr$1s5se$2@dont-email.me> |
| In reply to | #181684 |
On Thu, 23 Jan 2025 23:35:01 -0000 (UTC), Marion wrote: > # 1. Set your preferred text or HTML editor > editor="vi" # Replace with your preferred editor (e.g., nano, vim) Why not use the standard EDITOR or VISUAL environment variables? That’s what they’re for.
[toc] | [prev] | [next] | [standalone]
| From | Marion <marion@facts.com> |
|---|---|
| Date | 2025-01-24 00:48 +0000 |
| Subject | Re: Strange questions (Was: How to edit HTML source file on Windows in one step (not two)?) |
| Message-ID | <vmuo1p$g9l$1@nnrp.usenet.blueworldhosting.com> |
| In reply to | #181686 |
On Thu, 23 Jan 2025 23:48:11 -0000 (UTC), Lawrence D'Oliveiro wrote :
>> # 1. Set your preferred text or HTML editor
>> editor="vi" # Replace with your preferred editor (e.g., nano, vim)
>
> Why not use the standard EDITOR or VISUAL environment variables? That�s
> what they�re for.
Good idea! Thanks for the improvement! Much appreciated. Will do!
I'm currently busy writing a more complicated version of the bookmarks
batch file that creates the Vine & Amazon links, which is far more
difficult because I have to convert the spaces in Windows to plus signs (+)
for Amazon search links, and to %20 characters for Vine search links.
<A HREF=https://amazon.com/s?k=gas+camp+stove>[amazon] gas camp stove</A><P>
<A HREF=https://amazon.com/vine/vine-items?search=gas%20camp%20stove>[vine] gas camp stove</A><P>
Here's a snippet of how difficult it was to do in Windows, where we'd just
use sed/awk/grep on Linux to convert the spaces to those characters.
:input_item
echo.Enter search item: ; for example, gas camp stove
set /p "item="
:replace_spaces_with_+
set "amazon_item=%item: =+%"
:replace_spaces_with_%20
set "vine_item="
for %%a in (%item%) do (
if "%%a"=="" (
set "vine_item=!vine_item!%%20"
) else (
if defined vine_item (
set "vine_item=!vine_item!%%20"
)
set "vine_item=!vine_item!%%a"
)
)
echo Original item: %item%
echo Amazon item: %amazon_item%
set vine_item=!vine_item!
echo Vine item: %vine_item%
echo.Adding... "%amazon_item%" and "!vine_item!" to %vinefile
It's not lost on me (nor on you, I'm sure) how miserable this task is on Windows.
[toc] | [prev] | [next] | [standalone]
| From | Janis Papanagnou <janis_papanagnou+ng@hotmail.com> |
|---|---|
| Date | 2025-01-24 11:30 +0100 |
| Subject | Re: Strange questions (Was: How to edit HTML source file on Windows in one step (not two)?) |
| Message-ID | <vmvq3c$26cn0$1@dont-email.me> |
| In reply to | #181689 |
On 24.01.2025 01:48, Marion wrote: > On Thu, 23 Jan 2025 23:48:11 -0000 (UTC), Lawrence D'Oliveiro wrote : > > >>> # 1. Set your preferred text or HTML editor >>> editor="vi" # Replace with your preferred editor (e.g., nano, vim) >> >> Why not use the standard EDITOR or VISUAL environment variables? >> That�s what they�re for. > > Good idea! Thanks for the improvement! Much appreciated. Will do! Just note that these variables may not (or not all) be defined. (In my environment, for example, $EDITOR is empty, but $VISUAL is set.) - Typically, applications check them sequentially and provide a default (as you've done) [only] if none is set. Janis > > [...]
[toc] | [prev] | [next] | [standalone]
| From | Frank Miller <miller@posteo.ee> |
|---|---|
| Date | 2025-01-24 00:49 +0100 |
| Subject | Re: Strange questions (Was: How to edit HTML source file on Windows in one step (not two)?) |
| Message-ID | <6792D5A0.6080409@backwurst.de> |
| In reply to | #181684 |
Marion wrote: > On Fri, 24 Jan 2025 00:25:01 +0100, Frank Miller wrote : > > >>> Please improve so that billions of people can benefit from this script >>> which appends a new URL & description to the users' global bookmarks. >> >> WOW!I'm really impressed! That's a new level of super egocentric hubris. >> Tried that right now on my Linux-System and it didn't do *anything*! >> A really crappy programmed script. > > Funny you mention what I was working on for my dual-boot desktop PC... > > It's not done yet, but even though the linux newsgroups were NOT on the > newsgroups list, since you complained that the script worked for only > Windows users, here's an unfinished yet equivalent [..snip..] You didn't read the part of "super egocentric hubris" in relation to "billions of people can benefit from this script" - did you? You have a sense of satire or cynicism? Doesn't seem so.
[toc] | [prev] | [next] | [standalone]
| From | Janis Papanagnou <janis_papanagnou+ng@hotmail.com> |
|---|---|
| Date | 2025-01-24 10:40 +0100 |
| Subject | Re: Strange questions (Was: How to edit HTML source file on Windows in one step (not two)?) |
| Message-ID | <vmvn66$25s41$1@dont-email.me> |
| In reply to | #181684 |
On 24.01.2025 00:35, Marion wrote: > On Fri, 24 Jan 2025 00:25:01 +0100, Frank Miller wrote : > >>> Please improve so that billions of people can benefit from this script >>> which appends a new URL & description to the users' global bookmarks. >> >> WOW!I'm really impressed! That's a new level of super egocentric hubris. Yeah, that's what made me laugh when I read it; imagining "billions" of MS *.bat programmers. >> Tried that right now on my Linux-System and it didn't do *anything*! >> A really crappy programmed script. > > Funny you mention what I was working on for my dual-boot desktop PC... > > It's not done yet, but even though the linux newsgroups were NOT on the > newsgroups list, since you complained that the script worked for only > Windows users, here's an unfinished yet equivalent Linux Bash script, [...] It would be yet more useful if you'd not have restricted your script to Bash and Linux. The script is so primitive (i.e. it has no special features) that it can be written in standard shell for any standard Unix. Hints: use no "read -p" and no "[[...]]". And I'd replace 'echo' by 'printf' for a good measure (and also less [unnecessary] escaping). Janis
[toc] | [prev] | [next] | [standalone]
| From | Marion <marion@facts.com> |
|---|---|
| Date | 2025-01-24 18:03 +0000 |
| Subject | Re: Strange questions (Was: How to edit HTML source file on Windows in one step (not two)?) |
| Message-ID | <vn0kkp$8ta$1@nnrp.usenet.blueworldhosting.com> |
| In reply to | #181695 |
On Fri, 24 Jan 2025 10:40:15 +0100, Janis Papanagnou wrote :
>>> WOW!I'm really impressed! That's a new level of super egocentric hubris.
>
> Yeah, that's what made me laugh when I read it; imagining "billions"
> of MS *.bat programmers.
Hi Janis,
Amazon told me they only select one out of a million of their customers to
be invited to the Amazon Vine program, so I'm not normal in that sense.
Your point is well taken that I have higher hopes to help more people than
others feel can be helped - which is a valid criticism of anyone who is
trying to buck the fiasco that is currently how web browsers do bookmarks.
In my (mathematical) defense, I presume all of you must be aware that there
is the concept of the TAM (but maybe nobody here took Marketing 101?).
The TAM is one of the first things you look at for any new solution
(in this case, a solution to the current misguided browser bookmarks
offering that Mozilla & Chrome-based browsers all errantly employ).
The TAM on solving this trainwreck of web-browser bookmarks debacles
is huge, but at the same time I note that web-browser developers are
shockingly clueless how bookmarks 'should' work; as are most users.
Most users have no clue that there should only be a single bookmark file.
It's beyond their comprehension to THINK about things philosophically.
And no browser developer wants anyone to be able to have one file either.
It's not in browser developers' interest to supply what everyone needs.
Browser developers are desperate to lock people into their specific use
model (much like Apple does for almost anything in their product line).
It takes an uncommonly intelligent person to buck powerful MARKETING.
Given one has to be aware enough first to understand the huge problem we
fact, where I feel only the most intelligent and/or philosophically
enlightened people will own the ability to see the value of a single
bookmarks file for all web browsers on all platforms (for any given user).
I was hoping 1 or 2 of those rare enlightened few would be here. :)
>>> Tried that right now on my Linux-System and it didn't do *anything*!
>>> A really crappy programmed script.
>>
>> Funny you mention what I was working on for my dual-boot desktop PC...
>>
>> It's not done yet, but even though the linux newsgroups were NOT on the
>> newsgroups list, since you complained that the script worked for only
>> Windows users, here's an unfinished yet equivalent Linux Bash script, [...]
>
> It would be yet more useful if you'd not have restricted your script
> to Bash and Linux. The script is so primitive (i.e. it has no special
> features) that it can be written in standard shell for any standard
> Unix.
> Hints: use no "read -p" and no "[[...]]". And I'd replace 'echo' by
> 'printf' for a good measure (and also less [unnecessary] escaping).
If you look at the time stamps, I hacked out that script in less than five
minutes, so while I accept all criticism, I'm focusing on Windows first.
Once I have everything working on Windows, I can port to Linux & Android.
At the moment, here's the latest Windows script to edit browser bookmarks,
where working suggestions for improvements are always welcome because the
goal, always, is to add value to every post so that everyone benefits.
Solving the horrid browser-bookmark debacle is a team effort after all!
Luckily, the browser bookmark script was MUCH EASIER than the Vine script.
@echo off
REM 20240124 addbm.bat appends links to the global bookmark file
setlocal
setlocal EnableDelayedExpansion
REM Action#1 set your favorite text HTML editor
REM set editor=notepad++
set editor=gvim
REM Action#2 set the location of your global bookmarks file
set bmfile=C:\path\to\your\global\bookmark\file\bm.htm
if not exist "%bmfile%" (
echo.The file "%bmfile%" does not exist. Exiting...
goto :end
) else (
echo.Global bookmark file is %bmfile%
)
:input_html
echo.Enter URL: ; for example, https://amazon.com/vine/about
set /p "url="
echo.Enter Description: ; for example, Amazon Vine Program
set /p "description="
echo.Adding... "%url%" as "%description%"
:append_html
echo.^<A HREF="%url%"^>%description%^</A^>^<P^> >> %bmfile%
echo."%url%" as "%description%" added to "%bmfile%"
set /p repeat=Do you want to add another browser bookmark? [y/n]:
if %repeat%== y goto input_html
if not %repeat%== y goto edit_html
:edit_html
echo Do you want to edit the global bookmark file? [y/n]
set /p "choice="
if /i "%choice%"=="y" (
echo Editing file: %bmfile%
%editor% %bmfile%
) else if /i "%choice%"=="n" (
echo File editing canceled.
)
:end
pause
endlocal
exit /B 0
--
This is intended to be a web-findable resource for future users.
[toc] | [prev] | [next] | [standalone]
| From | Marion <marion@facts.com> |
|---|---|
| Date | 2025-01-24 18:14 +0000 |
| Subject | Re: Strange questions (Was: How to edit HTML source file on Windows in one step (not two)?) |
| Message-ID | <vn0l9a$22g1$1@nnrp.usenet.blueworldhosting.com> |
| In reply to | #181701 |
On Fri, 24 Jan 2025 18:03:06 -0000 (UTC), Marion wrote :
> Amazon told me they only select one out of a million of their customers to
> be invited to the Amazon Vine program, so I'm not normal in that sense.
Oops. Too many zeros. One out of about ten-thousand customers. My bad.
While we're correcting mistakes, here's the Vine script for all to benefit.
The miserable part was escaping all the special characters in the URIs.
@echo off
REM 20240124 addvine.bat adds Amazon/Vine search links to global HTML
setlocal
setlocal EnableDelayedExpansion
REM #1 set your favorite text HTML editor
REM set editor=notepad++
set editor=gvim
REM #2 set the location of your global vine search file
set vinefile=C:\path\to\your\global\search\link\html\file\vine.htm
if not exist "%vinefile%" (
echo.The file "%vinefile%" does not exist. Exiting...
pause
goto :END
) else (
echo.Global Vine HTML search file is %vinefile%
)
:input_item
echo.Enter search item: ; for example, gas camp stove
set /p "item="
:replace_spaces_with_+
set "amazon_item=%item: =+%"
:replace_spaces_with_%20
set "vine_item="
for %%a in (%item%) do (
if "%%a"=="" (
set "vine_item=!vine_item!%%20"
) else (
if defined vine_item (
set "vine_item=!vine_item!%%20"
)
set "vine_item=!vine_item!%%a"
)
)
echo Original item: %item%
echo Amazon item: %amazon_item%
set vine_item=!vine_item!
echo Vine item: %vine_item%
echo.Adding... "%amazon_item%" and "!vine_item!" to %vinefile%
:append_html
echo.^<HR^> >> %vinefile%
echo.^<A HREF=https://amazon.com/vine/vine-items?search=%vine_item%^>[vine] %item%^</A^>^<P^> >> %vinefile%
echo.^<A HREF=https://amazon.com/s?k=%amazon_item%^>[amazon] %item%^</A^>^<P^> >> %vinefile%
echo.^<HR^> >> %vinefile%
set /p repeat=Do you want to add another search term? [y/n]:
if %repeat%== y goto input_item
if not %repeat%== y goto edit_html
:edit_html
echo Do you want to edit the global vine HTML file? [y/n]
set /p "choice="
if /i "%choice%"=="y" (
echo Editing file: %vinefile%
%editor% %vinefile%
) else if /i "%choice%"=="n" (
echo File editing canceled.
)
END:
endlocal
exit /B 0
--
As always, this is to help others now, and far into the future.
[toc] | [prev] | [next] | [standalone]
| From | Janis Papanagnou <janis_papanagnou+ng@hotmail.com> |
|---|---|
| Date | 2025-01-25 14:22 +0100 |
| Subject | Re: Strange questions (Was: How to edit HTML source file on Windows in one step (not two)?) |
| Message-ID | <vn2ojh$2qld7$1@dont-email.me> |
| In reply to | #181701 |
On 24.01.2025 19:03, Marion wrote: > [...] I wanted to answer per email but got an error. Janis
[toc] | [prev] | [next] | [standalone]
| From | "Carlos E.R." <robin_listas@es.invalid> |
|---|---|
| Date | 2025-01-25 14:39 +0100 |
| Subject | Re: Strange questions (Was: How to edit HTML source file on Windows in one step (not two)?) |
| Message-ID | <s56f6lx7le.ln2@Telcontar.valinor> |
| In reply to | #181712 |
On 2025-01-25 14:22, Janis Papanagnou wrote: > On 24.01.2025 19:03, Marion wrote: >> [...] > > I wanted to answer per email but got an error. An email to Marion, aka Arlen? All his addresses are faked. -- Cheers, Carlos.
[toc] | [prev] | [next] | [standalone]
| From | Janis Papanagnou <janis_papanagnou+ng@hotmail.com> |
|---|---|
| Date | 2025-01-25 17:48 +0100 |
| Subject | Re: Strange questions (Was: How to edit HTML source file on Windows in one step (not two)?) |
| Message-ID | <vn34ld$2tqi9$1@dont-email.me> |
| In reply to | #181713 |
On 25.01.2025 14:39, Carlos E.R. wrote: > On 2025-01-25 14:22, Janis Papanagnou wrote: >> On 24.01.2025 19:03, Marion wrote: >>> [...] >> >> I wanted to answer per email but got an error. > > An email to Marion, aka Arlen? All his addresses are faked. Ah, didn't know. - Thanks. (I think my email isn't appropriate for above newsgroups, so I spare a post of the email contents here.) Janis
[toc] | [prev] | [next] | [standalone]
| From | Lawrence D'Oliveiro <ldo@nz.invalid> |
|---|---|
| Date | 2025-01-23 23:46 +0000 |
| Subject | Re: Strange questions (Was: How to edit HTML source file on Windows in one step (not two)?) |
| Message-ID | <vmukc9$1s5se$1@dont-email.me> |
| In reply to | #181674 |
On Thu, 23 Jan 2025 08:20:58 -0500, Newyana2 wrote:
> ... VSCode. It's free, cross-platform and probably less than 2 GB.
Is that the bar for what might be considered a “svelte” or “petite”
package nowadays?
ldo@theon:~> du -ks /usr/*/emacs*/ /usr/*/*/emacs*/
16988 /usr/lib/emacs/
68 /usr/lib/emacsen-common/
15660 /usr/libexec/emacs/
105452 /usr/share/emacs/
12 /usr/share/emacsen-common/
8 /usr/local-orig/share/emacs/
8 /usr/local/share/emacs/
52 /usr/share/doc/emacs/
52 /usr/share/doc/emacs-bin-common/
72 /usr/share/doc/emacs-common/
52 /usr/share/doc/emacs-el/
24 /usr/share/doc/emacsen-common/
96 /usr/share/info/emacs/
[toc] | [prev] | [next] | [standalone]
Page 4 of 5 — ← Prev page 1 2 3 [4] 5 Next page →
Back to top | Article view | alt.comp.os.windows-10
csiph-web