Quoter 4.2 build: 9142 released: 2008-04-07
Converts text with many possible cleanups, including preparation of HTML and Java, aligning in columns, character set conversion, case converting, removing excess white space, removing blank lines, preparing regex expressions etc..
Copyright (c) 2008 Canadian Mind Products.
Java Applet (that can also be run as an application).
Download from http://mindprod.com/products1.html#QUOTER
===> Free <===
Full source included.
You may even include the source code, modified or unmodified
in commercial 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/roedy.html#NONMILITARY
If you include any Canadian Mind Products code in your own applications,
your app too must be labeled non-military use only.
All Java jars and source code are included.
----
Prerequisites:
This program runs under any OS,
(e.g. Win2K/XP/Vista/OSX/Linux/Solaris/Vista64/AIX...) so long as you have
<><> Java version 1.5 <><> or later installed.
See http://mindprod.com/jgloss/installingjava.html for details.
----
Installing on a PC:
Download source and compiled class files to run on your own machine as an application or Applet.
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 “user folder names” option.
To run as an application,type:
java -jar J:\com\mindprod\quoter\quoter.jar parms
adjusting as necessary to account for where the jar file is.
----
Installing on a MacIntosh:
Use Safari to download source and compiled class files to run on your own machine as an application or Applet.
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.
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 -jar com/mindprod/quoter/quoter.jar parms
adjusting as necessary to account for where the jar file is.
I don't have a MacIntosh, just a PC, so I can't test the 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.
----
Rebuilding:
The zip already contains the necessary class and jar files, so unless you modify
the program, there is no need to recompile the source or rebuild the jar.
Configure 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:
Converts text with many possible cleanups, including
preparation of HTML and Java, aligning in columns, character
set conversion, case converting, removing excess white
space, removing blank lines, preparing regex expressions....
converts raw text with the following possible cleanups:
1. Quoting for HTML, e.g. & -> & or accented characters
like é to é
2 . Converting HTML &enties; back to plain characters.
3. Stripping out HTML
4. Quoting for Java String literals
e.g. c:\MyDir\MyFile.txt -> "c:\\MyDir\\MyFile.txt"
5. Quoting for Java char[] literals
e.g. c:\ -> new char { 'c', ':', '\\' }
6. removing leading and/or trailing spaces.
5. removing embedded control characters.
7. collapsing runs of spaces into one space.
8. collapsing multiple blank lines into one line.
9. converting to UPPER, lower, or Book Title case.
10. Aligning space or comma delimited text in columns.
11.Aligning Java source in columns
(considers "\"", '\'', /* comment */, // ...
in column delimiter rules).
12. Converting raw multiline clipboards into regexes
by quoting reserved characters for search/replace
for Funduc, SlickEdit (Vslick) or Java regexes.
Often followed by converting to Java string literals
It will help you write HTML, especially HTML that talks
about HTML or Java. It can be useful for creating JavaDOC
that mentions the tags needed to run the program or that
quotes Java source which makes common use of < > and &.
It takes raw text and converts HTML's reserved characters
such as & < > and " and converts them to their cooked forms
& < > and ". It also converts accented and
special characters to their cooked forms, e.g. the copyright
symbol to © and the e' character to é Just paste
the raw text into the upper window, click Convert then copy
the converted cooked text from the lower window.
When you run the Quoter Amanuensis as an application, it is
even more automatic. You don't need to do any manual pasting
and copying. Just click Convert to convert the current
contents of the clipboard. The cooked HTML replaces the old
the raw text clipboard contents. This automatic feature is
not available in the Applet version because the Applet
sandbox considers it a security risk.
For example, Quoter will take a clipboard that looks like
this:
special characters:
< > & " ¡ ¢ £ ¤ ¥ ¦ § ¨ © ª «
¬ ® ¯ ° ± ² ³ ´ µ ¶ · ¸ ¹ º » ¼ ½ ¾ ¿ ÷ ×
accented characters like:
À Á Â Ã Ä Å Æ Ç È É Ê Ë Ì Í Î Ï Ð Ñ Ò Ó Ô Õ Ö Ø Ù Ú Û Ü Ý Þ ß
à á â ã ä å æ ç è é ê ë ì í î ï ð ñ ò ó ô õ ö ø ù ú û ü ý þ ÿ.
and converts it to this:
special characters:
< > & " ¡ ¢ £ ¤ ¥
¦ § ¨ © ª «
¬ ® ¯ ° ± ² ³
´ µ ¶ · ¸ ¹ º
» ¼ ½ ¾ ¿ ÷ ×
accented characters like:
À Á Â Ã Ä Å Æ
Ç È É Ê Ë Ì Í
Î Ï Ð Ñ Ò Ó Ô
Õ Ö Ø Ù Ú Û Ü
Ý Þ ß
à á â ã ä å æ
ç è é ê ë ì í
î ï ð ñ ò ó ô
õ ö ø ù ú û ü
ý þ ÿ.
Quoter is also useful when you are writing Java programs
that write Java or C++ programs. For example, when you
select Java instead of HTML as the target it will take a
clipboard containing template code like this:
if ( myString.compareTo("\n ABC") > 0 )
test++;
it will convert it to:
"if ( myString.compareTo(\"\\n ABC\") > 0 )\n"
+ " test++;\n"
It is also useful any time you cut and paste material for
String literals from some other source, e.g. in preparing
filenames. For example, it will convert:
C:\myDir\Myprog.exe
to
"C:\\myDir\\Myprog.exe"
There is a bug in the way the JDK 1.1 in Win/NT handles the
clipboard. It prevents you from clicking CONVERT more than
once to quote the quoted result. This works properly under
JDK 1.3. With JDK 1.1 you must paste the first result in
some other application, copy the result back into to the
clipboard, then go back and hit CONVERT again, then go back
to some other application and paste the second result.
Watch out! Quoter translates to 0xA0, a non-printing
space, not ordinary 0X20 space.
Java source code included. May be freely distributed and
used for any purpose except military.
To install, Extract the zip download with Winzip, available from
http://www.winzip.com (or similar unzip utility) into any
directory you please, often C:\ -- ticking off the "user
folder names" option. To run as an application, type:
java -jar C:\com\mindprod\quoter\quoter.jar
adjusting as necessary to account for where the jar file is.
It works on the clipboard. Copy to the clipboard from some
application. Click the operation your want in Quoter, then
paste the result back into your app. You won't see anything
on the Quoter screen, unless you run it as an Applet. Then
you must paste into the upper screen and copy from the
lower.
Why the 99 logo? It represents a double quote character.
Quoter among other things "quotes" (in the sense of escapes)
regexes and Java strings using \.
2.6 fixes a bug where too many
s were generated
in HTML output.
2.7 uses a clever way of dealing with newline characters
when stripping tags so that the line breaks are closer to what
was rendered in HTML. Also has an about box.
2.8 handled tabs with \t in Java string literals.
2.9 no longer uses \' in "..." literals. This makes
SQL-encoded strings more readable.
3.0 will not be fooled by tags similar to the standard
ones.
3.1 uses ant builds, and explains the encodings a
little better.
3.2 just increase the footprint a bit to handle some
of the longer options.
3.3 was a code cleanup using IntelliJ, and conversion to Swing.
3.4 removed the obsolute translate feature, and
added a transform to convert a string to a char[]
initialisation.
3.5 fixes a bug in StripEntities that was mishandling
3.6 proper size when run as application. tidy code.
3.7 has a new logo and a PAD file.
3.8 2008-01-01 supports slickEdit Unix style regexes.
3.9 2007-12-16 add support for encode/decode URL
4.0 2008-01-29 add > as a reserved character in Java regex.
4.1 2008-02-09 remove =<> as Java regex search reserved chars
4.2 2008-04-07 add build to title, tidy code, correct
spelling, convert to enums. Application mode now displays
raw and cooked text.