HtmlMacros 2.6 build: 9639 released: 2014-07-13 compiled with: Java 1.8.0_131 Jet jet12.0-pro-x86/1.8.0_131

Generates HTML boilerplate from custom macros written in Java.

Copyright: (c) 1996-2017 Canadian Mind Products.

Java application.
Download from: http://mindprod.com/products1.html#HTMLMACROS
View formatted HTML Manual online at: http://mindprod.com/application/htmlmacros.manual.html

----

Notes:

You must install the Java JRE to use this program.
See http://mindprod.com/jgloss/jgloss/jre.html

This program can only be used from the command prompt, (or via an command
line style icon shortcut) e.g. under Windows command.exe or JPSoft
tcmd.exe, formerly called the DOS box. Just clicking the programs in a
directory listing will not do anything useful. Just typing the program
names at the command prompt will not either.

This program requires a manual install! See below.

This program works with vanilla text files, (e.g. ASCII files or UTF-8
Unicode files). You will need a text editor to create and view them, not a word
processor. e.g. notepad, Visual Slick Edit or other suitable text editor
http://mindprod.com/jgloss/editor.html. You must use a monospaced font
http://mindprod.com/jgloss/monospacedfonts.html (aka fixed pitch, aka
programmer font) to view your files, or they won't look properly aligned.

I put out an avalanche of free software into the world, and submit PAD
files to hundreds of distribution sites, but I rarely hear back from
anyone.  What's happening?  Does it all just work fine?  It is so
complicated nobody can figure out how to use it and they give up on it?
It is it useful?  Since everyone has the source, do people just fix the
programs to their liking themselves?  Did you have trouble installing?  Do
I presume you know too much?  I would be happy to hear from you about your
experiences, positive or negative and your requests for improvements.  A
one-line email to roedy@mindprod.com would be great.

===> Free <===
Full source included.
You may even include the source code, modified or unmodified
in free/commercial open source/proprietary programs that you write and distribute.
May be used freely for any purpose but military.
For more details on this restriction, see
http://mindprod.com/contact/nonmil.html
If you include any Canadian Mind Products code in your own applications,
your app too must be labelled non-military use only.
http://mindprod.com/contact/nonmil.html
All Java jars and source code are included. If you need the class files or Javadoc, you will have to build them yourself. To streamline the zip downloads, class files and Javadoc have been removed.

----

Prerequisites:

This program runs under any OS that supports Java,
(e.g.W2K/XP/W2003/Vista/W2008/W7-32/W7-64/W8-32/W8-64/Linux/LinuxARM/LinuxX86
/LinuxX64/Ubuntu/Solaris/SolarisSPARC/SolarisSPARC64/SolarisX86/SolarisX64/OSX/AIX...)
so long as you have
<><> Java version 1.8 <><> or later installed (32-bit or 64-bit Java).
See http://mindprod.com/jgloss/installingjava.html for details.

----

Installing on a PC:

Download source and compiled jar files to run on your own machine as an application.
First install a recent Java JDK or JVM.
See http://mindprod.com/jgloss/installingjava.html.
To install, extract the zip download with WinZip
(or similar unzip utility) into any directory you please,
often J:\ --  ticking off the <span class="click">use folder names</span> option.
To run as an application, type:
java.exe %JAVA_OPTIONS -ea -jar J:\com\mindprod\htmlmacros\htmlmacros.jar {put any parms here}

adjusting as necessary to account for where the jar file is.

----

Installing on a MacIntosh:

Use Safari to download source and compiled jar files to run on your own machine as an application.
Safari will automatically unpack the zip into ~/Downloads (version 10.5)
[or on the Desktop (version 10.4 and earlier)].
First install a recent Java JDK or JVM.
See http://mindprod.com/jgloss/installingjava.html.
You may optionally move the download tree to a permanent home.
I don't have a MacIntosh, just a PC, so I can't test my Java programs for Mac compatibility.
In theory they should work without problems, but in practice that does not always happen.
If you have problems please, let me know, preferably with screenshots and complete verbatim error messages.
To run as an application, without parameters, just double click the jar file.

To run as an application with parameters, in bash shell type:
open Terminal.app
cd ~/Desktop
java.exe -ea -jar com/mindprod/htmlmacros/htmlmacros.jar {put any parms here}

adjusting as necessary to account for where the jar file is.

----

Rebuilding:

The zip already contains the necessary jar files, so unless you modify
the program, there is no need to recompile the source or rebuild the jar.
Configure.java basedir="E:/" in rebuild.xml to the drive where your files are.
Use ANT and rebuild.xml, not build.xml, to recompile and recreate the jar.

----

Use:

A Generic frame work for writing static macros in Java to
generate elaborate boilerplate in HTML text files on the
desktop without requiring any server side coding.  It could
also be used to expand macros in any text files.
The basic idea is this. You embed magic comments in your
HTML that look like something like this:
<!-- macro Measure 20 cm -->
Then you run htmlmacros.exe and it expands those comments to
boilerplate that looks like this:
<!-- macro JDisplay Measure 20 cm -->
<!-- generated -->
<span class="metric">20 cm</span>
<span class="imperial">(7.87 in)</span>
<!-- /generated by Measure -->
and renders for your viewers like this:
20 cm (7.87 in)
For more detail, read the manual posted at
http://mindprod.com/application/htmlmacrosmanual.html
Some of the 100 odd Macros that already exist include:
Age                   Calculate Age of something in years/months/days
AllPosters            affiliate link to AllPosters.com
Amazon                link to non-book product at Amazon
Art                   link to art.com poster
Audio                 link to audio file
BestBrowsers          describe recommended browsers
Book                  links to sell a book at various bookstores
CurrCon               show currency in multiple countries
DailySpecial          random link to take a change page on the website changed daily.
Degrees               show both Fahrenheit/Celsius
Dim                   metric/English width x height
DVD                   link to DVD stores
FileSize              insert the current size of a local file
Foot                  footer with google and public service ads.
Head                  generic header, there are also many special purpose variants.
Image                 display an png, jpg, gif
Include               include boilerplate, possibly containing embedded macros
J2EE                  macro: link to Sun's J2EE docs
JDisplay              display pretty colourised code listing
JDK                   refer to the current JDK
JRE                   refer to the current JRE
KJV                   link to verses in the KJV bible
Link                  smart href with webroot-relative link. Independent of where it is.  Used in Includes instead of href.
LL                    generate a entry for one person in the living love database
Macro                 Interface that all macros implement
MailTo                munged link to email
Measure               display in both metric and imperial units
MenuItem              menu item
Moved                 generate a stub to redirect to a document that has moved
NeedJava              why Java needed
NeedJWS               why Java Web Start Needed
Newsgroup             link to a newsgroup
NoJava                display if Java missing
OSes                  generate a list of OSes
PayPal                generate encrypted link to PayPal
Photo                 link to photo not displayed, with clickable camera icon.
Quilt                 generate an n x m list of links
QuiltPair             generate an n x m list of cell pairs
Quotation             random quote of the day
Reunion               generates entry for one person coming to a reunion.
Revised               generates date last revised
RFC                   link to RFC
RSS                   RSS feed item
RSSBegin              beginning of a group of RSS feed items to sort and group by day.
RSSEnd                beginning of a group of RSS feed times to sort and group by day.
Sun                   links to Sun site/bundled documentation
SunBug                link to Sun bug report
SunJDKandJREVersions  constants for various Sun JRE and JDK current and previous versions
SunJDKFile            ref to file in JDK
SunJREFile            ref to file in JRE
SunRFE                link to Sun RFE (Request For Enhancement)
Video                 Generates link to video file.
WebRing               generates navbar link to WebRing
Why Use HTML Static Macros
1.  You don't need to run any code on the server, just a vanilla HTML
server.  This means you can host an elaborate website on a free or almost
free server.
2.  You can run a arbibtrarily large website on a server with just tiny
amount of RAM.
3.  It means your website in unusually responsive since all pages are
prepared ahead of time before you upload.
4.  Using the Replicator, your clients can maintain a local copy of your
website they can access rapidly without requiring any sort of local
server, just a browser.
5.  It is easy to rapidly validate your HTML, spelling, links, and global
changes using ordinary HTML tools that work with your local disk copies.
Why Not Use HTML Static Macros
1. With static macros, your website cannot interact with the user via servlets.  You must use Java Applets or Java Web Start.
2. The cost of JSP hosting has dropped drastically.
3. Very few people are using this approach.


----

Version History:

 1.4 2007-04-07 WebRing Macro
                Moved now needs only one parm
                all generated images use middle rather than absmiddle
                DVD with upc, support for B&N, Chapters, refactored.
                Book with support for B&N, Chapters, refactored.
                new Tools for manipulating file names.
                use of /> in image links.
                add VISTA enum.
                spaces in URLs armoured.

 1.5 2008-01-01

 1.6 2008-08-01 RSS Feeds with RSS, RSSBegin and RSSEnd macros

 1.7 2008-08-03 New icons for the site, and slightly different headers and footers.
                It is now set up that you can modify the icons just by replacing the images in
                images/navigate. The precise sizes are no longer burned into the program.
                Quotations implementation tidier, uses less RAM by using disk caches of
                tidied quotations. Image dimension finder now caches previous results.
                Get rid of hard coded icon sizes in the code. It now dynamically detects
                the dimensions of each icon/image and caches the results so it does not
                have to keep rechecking.

 1.8 2009-02-06 include go package in ZIP bundle.

 1.9 2010-01-23 new configuration design with interface and multiple dynamic configurations

 2.0 2010-12-21 optionally generate XHTML

 2.1 2010-12-30 handle prev/next links in the Configuration rather than embedding Foot macros.

 2.2 2011-11-27 major refactoring in preparation for distributing macro-less compact html.

 2.3 2012-06-25 new packages com.mindprod.htmlmacros.macro to contain macros and com.mindprod.htmlmacros.support
                to contain common code for macros to use.
                New code for Google translate and adsense. now works on Opera.
                Use Amazon API to find out about book availability. Many improvements in ways other bookstores
                handled.
                Spell Macro, plurals handled automatically in Acronym, Google 1! support. Daily Special allows icons.

 2.4 2014-03-23 convert to JDK 1.8. many other changes.

 2.5 2014-07-02 use FastCat a different way so now uses far few slots to expand each page. fastcats.csv estimates
                adjusted.

 2.6 2014-07-13 FastCat estimates are not dynamically generated and perfectly accurate. fastcats.csv is gone.

-30-