Tuesday, January 26, 2010

Enter Vim...

To convert the Traditional Hydrotherapy Hyperhelper stack to HTML, I used Vim, a really great little text editor under Vector Linux.

In the last post I showed the original "Visceral Congestion" card in the "Harvey" stack.

Below is is what it looked like after I'd combined it with cards from the other stacks (You will also see that I've started putting in links to the Effects and Diseases sections, but not the Techniques section yet):

#---------------------------------------------------------------
#card @<a href="VisceralCongestion.html">Visceral Congestion</a>
Visceral Congestion
VisceralCongestion.html

#from from Dr JH Kellogg's Prescriptions...
In:
<a href="../Diseases/Bronchitis.html">Bronchitis</a>
<a href="CardiacInsufficiency.html">Cardiac Insufficiency</a>
<a href="../Diseases/TyphusFever.html">Typhus Fever</a> - 2
<a href="../Diseases/Cholera.html">Cholera</a> - Hot_Blanket Pack then vigorous Cold_Mitten Friction
or Cold_Towel Rub
<a href="../Diseases/Plague.html">Plague</a> - 2
Valvular heart Disease

Treatment Method:
- Cool Abdominal_Compress removed every 2 hours for 15 min of
Fomentations to Abdomen as hot as can be borne
- Electric Light Bath 10-20 min or Sweating Pack 1-2 hours or
Vapor_Bath 6-15 min followed by Wet_Sheet_Rub or Cold_Douche
- Hot_Tub Bath at bedtime 6-10 min followed by prolonged
Neutral_Tub Bath 20-40 min
- Hot_Hip & Leg_Pack followed by Cold_Towel Rub 1-2x a day
2.
- Hot_Blanket Pack 30 min, followed by sweating Wet_Sheet_Pack
1-2 hours 3x a day & ...
- prolonged Neutral_Tub Bath 1-2x a day.
#from from Dr JH Kellogg's Hydriatic Techniques...
Chronic: see <a href="VisceralInflammation.html">Visceral Inflammation</a> for acute cases
In all the catarrhal diseases - increased mucous ie.
<a href="../Diseases/AcuteGastritis.html">Acute Gastritis</a> & <a href="../Diseases/ChronicGastritis.html">Chronic Gastritis</a>
<a href="../Diseases/ChronicDiarrhoea.html">Chronic Diarrhoea</a>
<a href="Dyspepsia.html">Dyspepsia</a>
<a href="../Diseases/Gastroenteritis.html">Gastroenteritis</a>
<a href="../Diseases/IrritableRectum.html">Irritable Rectum</a>
<a href="BladderInflammation.html">Bladder Inflammation</a>
<a href="../Diseases/Haemorrhoids.html">Haemorrhoids</a>
<a href="../Diseases/Hepatitis.html">Hepatitis</a>
Menorrhagia
<a href="UterineDisplacements.html">Uterine Displacements</a>
<a href="Cerebro-SpinalCongestion.html">Cerebro-Spinal Congestion</a>

Problems:
<a href="VisceralInflammation.html">Visceral Inflammation</a>
<a href="VisceralIrritation.html">Visceral Irritation</a> - feeling of heaviness across abdomen

<a href="../Effects/VascularAntiphlogistics.html">Vascular Antiphlogistics</a> & <a href="../Effects/CardiacAntiphlogistics.html">Cardiac Antiphlogistics</a>
- anode Galvanic Current
- cathode Galvanic Current
- Sinusoidal Current
- H&C_Spinal_Pack
- H&C_Gastro-Hepatic Compress - for upper abdomen
- H&C_Intestinal_Compress - for lower abdomen
- Wet_Girdle
- Electric Light Bath
- Wet_Sheet_Rub
- Cold_Towel Rub
- Cold_Mitten Friction
- very hot Epigastric Douche
- Cold_Douche esp if <a href="PassiveCongestion.html">Passive Congestion</a>
- derivative Scotch Douche
- stage III Wet_Sheet_Pack
- Cold_Compress early then Cooling_Compress later
Revulsive
<a href"../Effects/CardiacExcitant.html">Cardiac Excitant</a>
<a href="../Effects/PeripheralCirculatoryTonic.html">Peripheral Circulatory Tonic</a>
<a href="../Effects/Fluxion.html">Fluxion</a>
- Revulsive_Douche esp if chronic congestion
<a href="../Effects/Sudorific.html">Sudorific</a>
<a href="../Effects/Tonic.html">Tonic</a> to restore skin health - very important
<a href="../Effects/Analgesic.html">Analgesic</a> for associated pain
- hot Fan Douche
- Very Hot_Sitz
Also in cardiac diseases:-
<a href="../Effects/CardiacAntiphlogistics.html">Cardiac Antiphlogistics</a>
#from from Dr GK Abbott's Prescriptions...
SYN: acute internal congestion
In:
<a href="../Diseases/AcuteNephritis.html">Acute Nephritis</a>
<a href="Eclampsia.html">Eclampsia</a> in <a href="Pregnancy.html">Pregnancy</a>
<a href="../Diseases/Erysipelas.html">Erysipelas</a>
<a href="Uraemia.html">Uraemia</a>
<a href="../Diseases/PulmonaryCongestion.html">Pulmonary Congestion</a>
acute <a href="../Diseases/Pleurisy.html">Pleurisy</a>
& in early stages of
<a href="../Diseases/Influenza.html">Influenza</a>
<a href="../Diseases/Measles.html">Measles</a>
<a href="../Diseases/ScarletFever.html">Scarlet Fever</a>

<a href="../Effects/Fluxion.html">Fluxion</a>: alternate applications &
mild Diaphoretics followed by tonic cold to send blood to the
skin & retain it there. Use
- Hot_Blanket Pack
- Revulsive_Trunk Pack
- any of the Diaphoretics followed by
- Cold_Mitten Friction
In chronic diseases:
Diaphoretics 2x a week followed by vigorous tonic
#end


In future posts I will show you how I have achieved this with Vim.

Vim, Substitute and Escaping Code

Your browser is designed to read the HTML code on a web page and turn it into something pretty. In my next post I want to show you the code behind the HTML. In order to do that I had to "escape" the code. Of course I used Vim to do this with its Substitute capabilities.

The Substitute command has the form:
<range>substitute/<from>/<to>/<flags>

So to change the "<" on the tags in the code to one that would be displayed as code by your browser, I had to use the code "&lt;"

So my substitution looks like:

%s/</&lt;/g

Which breaks down to mean:
% - over the whole file
s - substitute
/</ - from "<"
&lt;/ - to "&lt;"
g - global flag ie change all occurrences, by default only one occurrence is changed on each line and we usually have two.

Pretty easy eh?

Not really... It changed "<" to "<lt;"

Vim reads the "&" in the "to" to mean the "from" AND the "to". To solve I had to escape the "&".

First I had to correct my mistake and that was easy, I just pressed "u" and it "undid" the last edit command and everything was back to original.

Then I ran:

%s/</\&lt;/g

which worked perfectly. The "\" means that the letter after is not to be parsed by Vim.

The other substitutions were:

%s/>/\&gt;/g
%s/"/\&quot;/g

And finally but with flawed thinking:

%s/&/\&amp;/g

If you have followed me so far you can imagine what the file looked like with every symbolic "&" showing up as "&amp;". But the fix was easy... "u" to undo.

So it is ready to go onto the next post.

One more point, you will notice all the pretty boxes that the code is in, I got the tip from a post by Simrandeep, "Display HTML/CSS Codes On Coloured Background In Blogger Posts"

Ready to continue?

Tuesday, January 19, 2010

Traditional Hydrotherapy under DOS

The original Traditional Hydrotherapy program, running under DOS, had the same contents as the new one will, with a couple of major differences:
  1. The old program was ugly. The new one will be more presentable (A pretty face counts)
  2. The old one was spread over 6 files. The new one will be linked web pages.

Here is a screenshot of the TH "Address card" running in DOSBox on Linux:



I warned you it was ugly!

Notice the six sections; from HYDRO! down to QUOTES. There are many doubles with cards on the same subject in each section. To find all you needed on any particular topic you had to search each section. I did it like this to overcome limit that Hyperhelper had on the number of cards in a stack. Also each section was from different authors or books.

Here is a screenshot of the original program open to "Visceral Congestion" in the Problems section of John:


 


The markup for the card "Visceral Congestion", looked like this after I'd finished with PCWrite:

#---------------------------------------------------------------
#card @Visceral_Congestion
In:
Bronchitis
Cardiac_Insufficiency
Typhus Fever - 2
Cholera - Hot_Blanket Pack then vigorous Cold_Mitten Friction
or Cold_Towel Rub
Plague - 2
Valvular heart Disease

Treatment Method:
- Cool Abdominal_Compress removed every 2 hours for 15 min of
Fomentations to Abdomen as hot as can be borne
- Electric Light Bath 10-20 min or Sweating Pack 1-2 hours or
Vapor_Bath 6-15 min followed by Wet_Sheet_Rub or Cold_Douche
- Hot_Tub Bath at bedtime 6-10 min followed by prolonged
Neutral_Tub Bath 20-40 min
- Hot_Hip & Leg_Pack followed by Cold_Towel Rub 1-2x a day
2.
- Hot_Blanket Pack 30 min, followed by sweating Wet_Sheet_Pack
1-2 hours 3x a day & ...
- prolonged Neutral_Tub Bath 1-2x a day.
#end
#---------------------------------------------------------------


In the next few posts, I'll take you through the process of converting a Hyperhelper stack into HTML, using this card, "Visceral Congestion", as the example.

Sunday, January 17, 2010

Bringing Traditional Hydrotherapy out of the '80's

"Traditional Hydrotherapy" will soon be in HTML as a group of linked web pages. The original program was started before HTML was widely used and was written, under DOS, using a shareware program, PCWrite. It's main advantage was that it produced documents in plain text which is what I needed for Hyperhelper, the hypertext program that runs the original DOS programe.

Hyperhelper compiled a text file with fairly simple markup, into a hypertext stack. One of its strengths is that it doesn't need links to be marked up, as they are in HTML. The links work much like wiki words, if you have the same spelling you can just put your cursor on the word and click or and it will take you to the card of that name. Great for quick writing especially with word completion and shortcuts etc in PC Write.

Here is a short example of a short Hyperhelper stack. As you can see the structure is fairly basic

Once the Hyperhelper program was compiled you could distribute the stack. You can download the original "Traditional Hydrotherapy" stack. But you will have to run it on DOS or something like DOSBox.

Sunday, January 10, 2010

Traditional Hydrotherapy - Nearly there.

After almost 20 years of work (on and off) I am getting near the release of my summary of Kellogg's and Abbott's books on hydrotherapy as web pages.

I have finished the links and have the basic web page layout. I'm busy now working out how to quickly make individual pages as automatically as possible. ( I'm really using Vim's keyboard macros heavily here)

This process equates to the 5th step of my To Do list. Although I'v already worked out most of the css from the 7th step and will probably do that at the same time.

Traditional Hydrotherapy is the hydrotherapy treatment of many diseases and conditions with extensive linkage. The information was taken mainly from books by Drs John Harvey Kellogg and George Knapp Abbott. It is meant to be used by professionals or people trained in hydrotherapy as there is little explanation of the techniques. Read more