Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > alt.comp.os.windows-10 > #181690
| From | Marion <marion@facts.com> |
|---|---|
| Newsgroups | alt.comp.os.windows-10, alt.comp.software.firefox, comp.editors |
| Subject | Re: How to edit HTML source file on Windows in one step (not two)? |
| Date | 2025-01-24 01:07 +0000 |
| Organization | BWH Usenet Archive (https://usenet.blueworldhosting.com) |
| Message-ID | <vmup4o$14qf$1@nnrp.usenet.blueworldhosting.com> (permalink) |
| References | <vm7ule$18gd$1@nnrp.usenet.blueworldhosting.com> |
Cross-posted to 3 groups.
For everyone to benefit who cares about creating a search HTML bookmark that
will create clickable links to any desired search engines, below is my latest
attempt at appending to a dual global Amazon/Vine search bookmarks file.
Note that the syntax for a purely Amazon search is the following:
<A HREF=https://amazon.com/s?k=gas+camp+stove>[amazon] gas camp stove</A><P>
Note that the syntax for any specific Amazon Vine search is the following:
<A HREF=https://amazon.com/vine/vine-items?search=gas%20camp%20stove>[vine] gas camp stove</A><P>
It was a pain getting the angle brackets escaped in the Windows batch
file but that was nothing in effort compared to the way Amazon does things
where there are plus signs ("+") and %20 characters in real search terms.
Specifically, it was most miserable getting the Vine %20 to be escaped.
Having figured it out today, the advantage of me kind-heartedly generously
posting my results for you to benefit from is that you can munge what I
provide below to fit any search engine terms that you need to add for
your own global bookmarks search file (which everyone should have).
That makes all my effort writing this leveraged to everyone out there.
As always, please test & improve so that everyone benefits from every post.
@echo off
REM addvine.bat adds amazon & vine search links to a global Vine html file
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\file\vine.htm
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.^<A HREF=https://amazon.com/s?k=%amazon_item%^>[amazon] %item%^</A^>^<P^> >> %vinefile%
echo.^<A HREF=https://amazon.com/vine/vine-items?search=%vine_item%^>[vine] %item%^</A^>^<P^> >> %vinefile%
: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.
)
pause
endlocal
--
Back to alt.comp.os.windows-10 | Previous | Next — Previous in thread | Find similar | Unroll thread
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
csiph-web