Heating Trunk Packs relieve nausea and pain during pregnancy.
More than half of all pregnant women suffer from morning sickness but the treatment typically aims "to lessen the symptoms of nausea, rather than attacking the root cause(s) of the nausea" (Wikipedia). This usually means that a mother suffers weeks of discomfort, and sometimes distress, during pregnancy. This can be avoided with hydrotherapy.
Dr Abbott, when talking about severe morning sickness (hyperemesis gravidarum), said the Hot and Cold Abdominal Pack is an "almost never-failing remedy".
When she is pregnant my wife has relatively mild morning sickness and used hydrotherapy in her last two pregnancies. One treatment would relieve morning sickness for about two weeks when it would be repeated with similar effects. She has used it on other women with similar results. All of the cases I am aware of were not severe, but they uniformly had relief.
For use at home, the Heating Trunk Pack is the safest and easiest. Because it seems a little complex to the beginner, I wrote up the full procedure. Kellogg says the cause of morning sickness is Celiac Congestion and so the treatments are all Vascular Antiphlogistics any of which would probably work so if you want to modify things then go ahead.
Please leave a comment if this treatment helps you, or someone you love, enjoy their pregnancy without the effects of nausea.
Tuesday, September 28, 2010
Sunday, September 19, 2010
Malaria Treatment
A friend on the western border of Thailand sent me a email asking about treating malaria with hydrotherapy.
This makes sense because a lot of the malaria in this area is resistant to preventives and can lead to cerebral malaria, which if it doesn't kill, often leaves the person with major brain damage. I know this because I taught hydrotherapy up on the Burma border about 20 years ago and saw the results of malarial infection.
The Traditional Hydrotherapy page on Malaria lists a lot of treatment methods but basically it is a heating treatment until the patient starts sweating and then a Graduated Tonic Cold which is a short cold treatment. Then the patient is wrapped up warmly to sleep and for other treatments.
As with all treatment, the sooner it is started, the better. One of hydro's great advantages is that it doesn't interfere with other treatment and even if we have misdiagnosed, it won't cause any damaging side effects in most cases.
So... if it looks like it may be malaria, start treating it straight away before the patient gets weak.
On days 1,2 and 3 do something to get the patient sweating (but make sure they have a Cooling Compress on their head). The hill tribe people I worked with wrapped a patient in black polythene plastic out in the sunshine, to achieve sweating.
Once sweating started do a quick cold treatment. The tribe's people would quickly dunk them in the very cold river.
They are kept warm between treatments.
The principles are much the same for all fevers.
If you have experience at treating malaria successfully with hydrotherapy, please contact me.
This makes sense because a lot of the malaria in this area is resistant to preventives and can lead to cerebral malaria, which if it doesn't kill, often leaves the person with major brain damage. I know this because I taught hydrotherapy up on the Burma border about 20 years ago and saw the results of malarial infection.
The Traditional Hydrotherapy page on Malaria lists a lot of treatment methods but basically it is a heating treatment until the patient starts sweating and then a Graduated Tonic Cold which is a short cold treatment. Then the patient is wrapped up warmly to sleep and for other treatments.
As with all treatment, the sooner it is started, the better. One of hydro's great advantages is that it doesn't interfere with other treatment and even if we have misdiagnosed, it won't cause any damaging side effects in most cases.
So... if it looks like it may be malaria, start treating it straight away before the patient gets weak.
On days 1,2 and 3 do something to get the patient sweating (but make sure they have a Cooling Compress on their head). The hill tribe people I worked with wrapped a patient in black polythene plastic out in the sunshine, to achieve sweating.
Once sweating started do a quick cold treatment. The tribe's people would quickly dunk them in the very cold river.
They are kept warm between treatments.
The principles are much the same for all fevers.
If you have experience at treating malaria successfully with hydrotherapy, please contact me.
Sunday, September 12, 2010
Traditional Hydrotherapy is Online!
This is really a big day. At long, long last the website is now live.
It has taken exactly a year from when I decided to get serious about turning Traditional Hydrotherapy from a dinky DOS programme into a stunning (hyperbole) website. And 19 years after I started going through the original books and putting them on HyperHelper.
Admittedly the content is still the same, it just looks a whole lot more attractive. It is easier to use with redundant cards combined and plenty of indexes and navigation added.
Please visit Traditional Hydrotherapy and tell me if you find mistakes. There must be some!
I'm not sure when the Google Search function will begin working. Google has to index the site first. Apart from that it looks good to me.
For those of you who can actually use the information on the site, I would love you to tell me how it goes. If I get enough feedback I will start a forum where you can add to the knowledge base of currently used and successful (or unsuccessful) hydrotherapy.
Big sigh of relief... and prayer of thanks to God.
What am I going to do now? Maybe get some more sleep... or relaxation? Software Freedom Day next weekend so that's next Sunday out.
It has taken exactly a year from when I decided to get serious about turning Traditional Hydrotherapy from a dinky DOS programme into a stunning (hyperbole) website. And 19 years after I started going through the original books and putting them on HyperHelper.
Admittedly the content is still the same, it just looks a whole lot more attractive. It is easier to use with redundant cards combined and plenty of indexes and navigation added.
Please visit Traditional Hydrotherapy and tell me if you find mistakes. There must be some!
I'm not sure when the Google Search function will begin working. Google has to index the site first. Apart from that it looks good to me.
For those of you who can actually use the information on the site, I would love you to tell me how it goes. If I get enough feedback I will start a forum where you can add to the knowledge base of currently used and successful (or unsuccessful) hydrotherapy.
Big sigh of relief... and prayer of thanks to God.
What am I going to do now? Maybe get some more sleep... or relaxation? Software Freedom Day next weekend so that's next Sunday out.
Vim Makes a Sitemap File
This is probably the last tech (Vim) post I will be making as Traditional Hydrotherapy is online.
To try to jump start Google into indexing the site, I made a sitemap.xml file manually. I'm not sure if it will work, but I submitted it to Google anyway.
The instructions were quite clear from Manually Creating Sitemap Files, but how to achieve it quickly with Vim and over 900 files to index?
I used Split Screens, Reading-in files and, of course a repeating Macro.
I started by manually doing my home directory and making sure the parts worked. This was the longest part of the process and involved making some files (to read in) and the macro.
I had to produce code like this for each file:
I first made two files "top.n" and "end.n" to get the beginning and end of the url block
This is top.n:
I had to get the cursor in the right place in both files so moving to the line above the first file in the PageIndex list I then used Ctrl-W-P to move back the sitemap file then "G" to take me to the end of the file and ran this macro:
G$^Wpj0 - move the cursor to the end of the sitemap file and Ctrl-W-p (CTRL is ^W) to take me to the PageIndex file and then move down one line and to the beggining of the line.
f"lyt" - find the first quote on the line, move one character to the right and yank to the next quote (this simply copies the url of the file from the link).
^Wpp - Ctrl-W-p back to the sitemap file and put the yanked text (the url)
:read end.n^M - read in the contents of end.n
kJx - move up one line and join the next line, deleting the space.
G$ - move the cursor to the end of the file and end of the line, ready for the next itineration of the macro.
Of course the this macro was repeatable so I just typed:
When it got to the "</ul>" at the end of the list of files, it just stopped the macro as there was no " on the line.
I had to modify top.n and end.n for each of the four sections (Diseases, Effects, Problems, and Techniques) but otherwise it was quite quick.
I indexed 955 files in all.
The last bits were easy, I just added the xml header and footer and the file was complete.
Originally it was over 130 kb so I turned it into a 7kb .gz (sitemap.xml.gz) and ftp'd it to the site. Then I used Google Webmaster tools to submit it to Google.
Done. I think.
To try to jump start Google into indexing the site, I made a sitemap.xml file manually. I'm not sure if it will work, but I submitted it to Google anyway.
The instructions were quite clear from Manually Creating Sitemap Files, but how to achieve it quickly with Vim and over 900 files to index?
I used Split Screens, Reading-in files and, of course a repeating Macro.
I started by manually doing my home directory and making sure the parts worked. This was the longest part of the process and involved making some files (to read in) and the macro.
I had to produce code like this for each file:
<url>
<loc>http://www.traditionalhydrotherapy.com/Problems/VisceralCongestion.html</loc>
<lastmod>2010-08-17</lastmod>
</url>
<loc>http://www.traditionalhydrotherapy.com/Problems/VisceralCongestion.html</loc>
<lastmod>2010-08-17</lastmod>
</url>
I first made two files "top.n" and "end.n" to get the beginning and end of the url block
This is top.n:
<url>
<loc>http://www.traditionalhydrotherapy.com/Problems/
This is what end.n looked like:<loc>http://www.traditionalhydrotherapy.com/Problems/
</loc>
<lastmod>2010-08-17</lastmod>
</url>
Then I opened "sitemap.xml" in the hydro home directory (where the file would end up) and split the screen to "Problems/PageIndex.html" (using :sp Problems/PageIndex.html). PageIndex consist of an alphabetical list of all the pages in the directory, in this case the Problems directory.<lastmod>2010-08-17</lastmod>
</url>
I had to get the cursor in the right place in both files so moving to the line above the first file in the PageIndex list I then used Ctrl-W-P to move back the sitemap file then "G" to take me to the end of the file and ran this macro:
:read top.n^MG$^Wpj0f"lyt"^Wpp:read end.n^MkJxG$
:read top.n^M I read-in the contents of the top.n file (^M represents the single character for Enter, don't try to copy this file as I've escaped all the special characters - better to make your own keyboard macro)G$^Wpj0 - move the cursor to the end of the sitemap file and Ctrl-W-p (CTRL is ^W) to take me to the PageIndex file and then move down one line and to the beggining of the line.
f"lyt" - find the first quote on the line, move one character to the right and yank to the next quote (this simply copies the url of the file from the link).
^Wpp - Ctrl-W-p back to the sitemap file and put the yanked text (the url)
:read end.n^M - read in the contents of end.n
kJx - move up one line and join the next line, deleting the space.
G$ - move the cursor to the end of the file and end of the line, ready for the next itineration of the macro.
Of course the this macro was repeatable so I just typed:
300@a
and it simply itinerated down the list 300 times. (the macro was in the "a" register)When it got to the "</ul>" at the end of the list of files, it just stopped the macro as there was no " on the line.
I had to modify top.n and end.n for each of the four sections (Diseases, Effects, Problems, and Techniques) but otherwise it was quite quick.
I indexed 955 files in all.
The last bits were easy, I just added the xml header and footer and the file was complete.
Originally it was over 130 kb so I turned it into a 7kb .gz (sitemap.xml.gz) and ftp'd it to the site. Then I used Google Webmaster tools to submit it to Google.
Done. I think.
Thursday, August 26, 2010
Vim wnext, and Macros for Multiple Files
I have finished the pages for the home section. Yipee!, praise God! Almost done.
But while I did these pages I found a few things I needed to change on all the other cards. The first two were warnings from the validator:
First I made two files and put them in the home directory:
lang.txt was
And copy.txt:
Then I moved into a section (eg. Diseases with 202 pages) and in the console:
This started Vim editing all 202 html files in the directory and displayed the first file. I then recorded the following macro "@A":
/<html xml^Mdd Find the present namespace declaration (^M is Enter - didn't type it, just pressed Enter) and delete the line
k:read ../lang.txt^M - Move up one line and read the lang.txt file
G?div^M - Move to the end of the file and search backwards for the last closing div
k:read ../copy.txt^M - Move up a line (to where the copyright needed to be) and read in the copy.txt file.
:%s/ ">/">/ge^M - Substitute the attribute ending with the space for one without a space. The "g" flag means that it will substitute all the occurrences on the line but the "e" flag is essential in a multifile macro because this doesn't report an error when there is no occurence in a particular file (and therefore stop the macro repeating).
After I checked the file and validated it. I made a new macro "@B":
:wnext - Wrote the file and moved to the next file in the series then repeated what I had done in previous macro, "@A".
When this file validated correctly, I issued the following command
This repeated the "@b" macro on the remaining 200 files in the directory.
I repeated this for each of the remaining three sections and had it all done in under an hour. So it is now finished... I've only got to find a place to host it.
But while I did these pages I found a few things I needed to change on all the other cards. The first two were warnings from the validator:
- My XHTML namespace declaration was invalid because I hadn't stated which language I was using. I needed to delete the whole line and insert a declaration that included xml:lang to denote the primary language of the page.
- Most of the tooltips had a space at the end of the title's value, just before the closing quote. I needed to delete them all.
- I needed to add a copyright notice on every page.
First I made two files and put them in the home directory:
lang.txt was
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
And copy.txt:
<p>© Copyright 2010 Bruce Thompson</p>
Then I moved into a section (eg. Diseases with 202 pages) and in the console:
gvim *.html
This started Vim editing all 202 html files in the directory and displayed the first file. I then recorded the following macro "@A":
/<html xml^Mddk:read ../lang.txt^MG?div^Mk:read ../copy.txt^M:%s/ ">/">/ge^M
/<html xml^Mdd Find the present namespace declaration (^M is Enter - didn't type it, just pressed Enter) and delete the line
k:read ../lang.txt^M - Move up one line and read the lang.txt file
G?div^M - Move to the end of the file and search backwards for the last closing div
k:read ../copy.txt^M - Move up a line (to where the copyright needed to be) and read in the copy.txt file.
:%s/ ">/">/ge^M - Substitute the attribute ending with the space for one without a space. The "g" flag means that it will substitute all the occurrences on the line but the "e" flag is essential in a multifile macro because this doesn't report an error when there is no occurence in a particular file (and therefore stop the macro repeating).
After I checked the file and validated it. I made a new macro "@B":
:wnext^M/<html xml^Mddk:read ../lang.txt^MG?div^Mk:read ../copy.txt^M:%s/ ">/">/ge^M
:wnext - Wrote the file and moved to the next file in the series then repeated what I had done in previous macro, "@A".
When this file validated correctly, I issued the following command
:200@b
This repeated the "@b" macro on the remaining 200 files in the directory.
I repeated this for each of the remaining three sections and had it all done in under an hour. So it is now finished... I've only got to find a place to host it.
Sunday, June 27, 2010
Vim Pagemaking Macro
Today is a high day. I finished making content pages (all the Hydrotherapy stuff) at 2.30 this afternoon. I wondered if it would ever end.
The numbers breakdown is:
Diseases: 202
Effects: 54
Problems: 437
Techniques: 295
Making a grand total of 988 pages.
The Vim pagemaker macro I used was:
And we need to know that:
"l = register L etc
^M = Enter
^[ = Escape
^W = Ctrl-W (for window navigation with a split screen)
^R = Ctrl-R (reads in the contents of following register)
The macro would start with the cursor in the previous card so:
will find the first line of the card, yank the link, <a href="VisceralCongestion.html">Visceral Congestion</a>, to Register L (Link) and append this link to the end of the Page Index file.
Then moving down to the second line (Visceral Congestion) then yanks it to Register T (Title). Then it moves down to the third line (VisceralCongestion.html), appends it to Register F (Filename) and splits to a window editing the file, VisceralCongestion.html.
This starts the Visceral Congestion.html with the DTD and other HTML down to the <title> tag by "reading" in the contents of a file I had previously made called "head.h". It then puts the contents of Register T (Visceral Congestion) and moves to the end of the file (with G$) before reading in the contents of the file "cont.h" which takes us down to the top of the content of the file.
This reads in the breadcrumb navigation, which I made at the beginning of each section, and places the title at the end then completes the heading of page by placing the title in h1 tags.
Using window navigation we return to the lower window containing the contents of the card, places Mark A (ma) on the first line of the file (just below the filename and searches for the end of the card. It then deletes the card's contents, navigates up a window puts the contents then moves to the end of the file.
A long list of file with various HTML are read in at the end of the file, the last ones containing the site map at the bottom of the page. The "col" files had the contents of the map.
Once the contents of the site map were read in, the page's title needed highlighting with the class "here" and the footer file finished off the page.
I then opened the page in Firefox, corrected any obvious problems then validated it with Total Validator (6.3.0) as desktop tool.
Total Validator was great with British English spellchecking and accessibility validation as well as the expected HTML validation.
The whole process for one page without major problems took only a minute.
But now it's finished. Just the main index page and the messy stuff up the top of the site to write now.
The numbers breakdown is:
Diseases: 202
Effects: 54
Problems: 437
Techniques: 295
Making a grand total of 988 pages.
The Vim pagemaker macro I used was:
/#card^Mf<"ly2f>:sp PageIndex.html^MG$o^[p:wq^Mj^"ty$j"fy$:sp ^Rf^M:read top.h^MG$"tp:read head.h^MkJxG$:read cont.h^MG$:read breadcrumb.h^Mj/<\/p>^Mh"tpG$"tpa</h1>^[^Wwjma/#end^Mkd'a^WWpG$:read rightbox.h^MG$:read badge.h^MG$:read bottom1.h^MG$:read col1.h^MG$:read bottom2.h^MG$:read col2.h^MG$:read bottom3.h^MG$:read col3.h^M/^Rf^M^faa class="here"^[G$:read footer.h^MG:w^M
To tease it out a bit we need to remember that the first three lines of the card "Visceral Congestion" were:#card @<a href="VisceralCongestion.html">Visceral Congestion</a>
Visceral Congestion
VisceralCongestion.html
Visceral Congestion
VisceralCongestion.html
And we need to know that:
"l = register L etc
^M = Enter
^[ = Escape
^W = Ctrl-W (for window navigation with a split screen)
^R = Ctrl-R (reads in the contents of following register)
The macro would start with the cursor in the previous card so:
/#card^Mf<"ly2f>:sp PageIndex.html^MG$o^[p:wq^M
will find the first line of the card, yank the link, <a href="VisceralCongestion.html">Visceral Congestion</a>, to Register L (Link) and append this link to the end of the Page Index file.
j^"ty$j"fy$:sp ^Rf^M
Then moving down to the second line (Visceral Congestion) then yanks it to Register T (Title). Then it moves down to the third line (VisceralCongestion.html), appends it to Register F (Filename) and splits to a window editing the file, VisceralCongestion.html.
:read top.h^MG$"tp:read head.h^MkJxG$:read cont.h^MG$
This starts the Visceral Congestion.html with the DTD and other HTML down to the <title> tag by "reading" in the contents of a file I had previously made called "head.h". It then puts the contents of Register T (Visceral Congestion) and moves to the end of the file (with G$) before reading in the contents of the file "cont.h" which takes us down to the top of the content of the file.
:read breadcrumb.h^Mj/<\/p>^Mh"tpG$"tpa</h1>^[
This reads in the breadcrumb navigation, which I made at the beginning of each section, and places the title at the end then completes the heading of page by placing the title in h1 tags.
^Wwjma/#end^Mkd'a^WWpG$
Using window navigation we return to the lower window containing the contents of the card, places Mark A (ma) on the first line of the file (just below the filename and searches for the end of the card. It then deletes the card's contents, navigates up a window puts the contents then moves to the end of the file.
:read rightbox.h^MG$:read badge.h^MG$:read bottom1.h^MG$:read col1.h^MG$:read bottom2.h^MG$:read col2.h^MG$:read bottom3.h^MG$:read col3.h^M
A long list of file with various HTML are read in at the end of the file, the last ones containing the site map at the bottom of the page. The "col" files had the contents of the map.
/^Rf^M^faa class="here"^[G$:read footer.h^MG:w^M
Once the contents of the site map were read in, the page's title needed highlighting with the class "here" and the footer file finished off the page.
I then opened the page in Firefox, corrected any obvious problems then validated it with Total Validator (6.3.0) as desktop tool.
Total Validator was great with British English spellchecking and accessibility validation as well as the expected HTML validation.
The whole process for one page without major problems took only a minute.
But now it's finished. Just the main index page and the messy stuff up the top of the site to write now.
Sunday, May 30, 2010
Tooltips with Vim Regular Expressions
Off the top of your head, can you define "anodyne" or "faradic"?
Probably not, but these and many more obscure words, occur throughout Traditional Hydrotherapy. To overcome the lack of knowledge of these terms I had made up a glossary. I now wanted to make this available easily to the reader of Traditional Hydrotherapy. The answer was in Tooltips.
To illustrate a tooltip just hover your mouse over anodyne or faradic. That box that springs up is a tooltip and exactly what I needed... a simple way to get the definition to the reader.
The code for the "anodyne" tooltip looks like this:
Problems presented themselves immediately, and, as always, Vim was up to the task.
This is the text from the glossary file (made under DOS with PCWrite):
Problem: I had to turn the definition into a single line.
Answer: Use "J", which appends the following line with a space in between.
Second Problem: These words are often part of larger words and I didn't want to chop words up.
Answer: Use the Vim regular expressions:
Word Beginning, "\<", and Word End, "\>".
This way I would be able to make tooltips around whole words only.
Thirdly: how do I substitute the text for both upper and lowercase occurrences, "Faradic" and "faradic"?
The answer is two macros that begin on the "#card" in the glossary file, glos.txt and split to a single file which contained all four html files (appropriately called "big.html" as it ended up at over 3Mb:
@G - which deals with lowercase version
then @M which does the tooltips for the upper-case and also deals with words in the titles of pages.
and @N a final macro that corrects some of the changes @M made and goes to the next card in the glossary.
Let's have a look at the macros:
@G
l"tyE - move right one (onto the first letter of the title) and yank to End of the word into register "t"
j^"dy$ - move down one line and to the beginning of the word then yank to end of line into register "d"
:sp big.html^M - split screen and open into the file containing all the html
:%s+\<^Rt\>+<span title="^Rd">^Rt</span>+gc^M
:%s+\<^Rt\>+^Rt+gc^M - the business substitution - using Word Beginning, "\<", and Word End, "\>", this is to prevent words as part of URLs being substituted. The registers are called using the "-R (register letter)" form. The substitution is for all occurrences on a line and "c"hecks. so I can be sure it is going OK.
@M
-W p
k/@^M - move up a line and search for "@"
l~h - move one letter to the right and change the case of the letter (to capitalise)
"lyE^Wp - yank to end of the word into register "l" and return to the previous window (big.html)
:%s+^Rl.html+LL^Rl.html+ge^M - a substitution to add "LL" to the beginning of the word if it is a filename and thus preventing it being changed.
:%s+\<^Rl\>+<span title="^Rd">^Rl</span>+gc^M - much the same as the substitution in @G except using register "l" instead of "t"
@N
:wq^M - write and quit the big.html file
j/#card^M - now in glos.txt, move down a line and search for the next occurrence of "#card" (for the next word)
Using these files I managed to add tooltips to about 200 words in my spare time last week.
Now to make all those files (and validate them).
Probably not, but these and many more obscure words, occur throughout Traditional Hydrotherapy. To overcome the lack of knowledge of these terms I had made up a glossary. I now wanted to make this available easily to the reader of Traditional Hydrotherapy. The answer was in Tooltips.
To illustrate a tooltip just hover your mouse over anodyne or faradic. That box that springs up is a tooltip and exactly what I needed... a simple way to get the definition to the reader.
The code for the "anodyne" tooltip looks like this:
<span title="a treatment to relieve pain">anodyne</span>
Problems presented themselves immediately, and, as always, Vim was up to the task.
This is the text from the glossary file (made under DOS with PCWrite):
#card @faradic
electric current used mainly for stimulating innervated muscle, consists of pulsed DC current
#end
electric current used mainly for stimulating innervated muscle, consists of pulsed DC current
#end
Problem: I had to turn the definition into a single line.
Answer: Use "J", which appends the following line with a space in between.
Second Problem: These words are often part of larger words and I didn't want to chop words up.
Answer: Use the Vim regular expressions:
Word Beginning, "\<", and Word End, "\>".
This way I would be able to make tooltips around whole words only.
Thirdly: how do I substitute the text for both upper and lowercase occurrences, "Faradic" and "faradic"?
The answer is two macros that begin on the "#card" in the glossary file, glos.txt and split to a single file which contained all four html files (appropriately called "big.html" as it ended up at over 3Mb:
@G - which deals with lowercase version
then @M which does the tooltips for the upper-case and also deals with words in the titles of pages.
and @N a final macro that corrects some of the changes @M made and goes to the next card in the glossary.
Let's have a look at the macros:
@G
/@^Ml"tyEj^"dy$:sp big.html^M:%s+\<^Rt\>+<span title="^Rd">^Rt</span>+gc^M
/@^M -search for "@" l"tyE - move right one (onto the first letter of the title) and yank to End of the word into register "t"
j^"dy$ - move down one line and to the beginning of the word then yank to end of line into register "d"
:sp big.html^M - split screen and open into the file containing all the html
:%s+\<^Rt\>+<span title="^Rd">^Rt</span>+gc^M
:%s+\<^Rt\>+^Rt+gc^M - the business substitution - using Word Beginning, "\<", and Word End, "\>", this is to prevent words as part of URLs being substituted. The registers are called using the "
@M
^Wpk/@^Ml~h"lyE^Wp:%s+^Rl.html+LL^Rl.html+ge^M:%s+\<^Rl\>+<span title="^Rd">^Rl</span>+gc^M
^Wp - return to the previous window (glos.txt) with k/@^M - move up a line and search for "@"
l~h - move one letter to the right and change the case of the letter (to capitalise)
"lyE^Wp - yank to end of the word into register "l" and return to the previous window (big.html)
:%s+^Rl.html+LL^Rl.html+ge^M - a substitution to add "LL" to the beginning of the word if it is a filename and thus preventing it being changed.
:%s+\<^Rl\>+<span title="^Rd">^Rl</span>+gc^M - much the same as the substitution in @G except using register "l" instead of "t"
@N
:%s+LL^Rl+^Rl+ge^M:wq^Mj/#card^M
:%s+LL^Rl+^Rl+ge^M - a substitution to remove the, now unneeded "LL" notice the "e" tag which means it doesn't stop on an error (usually where the LL doesn't exist because there were no pages to be made with that filename):wq^M - write and quit the big.html file
j/#card^M - now in glos.txt, move down a line and search for the next occurrence of "#card" (for the next word)
Using these files I managed to add tooltips to about 200 words in my spare time last week.
Now to make all those files (and validate them).
Subscribe to:
Posts (Atom)
