This repository has been archived by the owner on Sep 21, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
README.htm
52 lines (51 loc) · 3.58 KB
/
README.htm
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
<html>
<head><style> table,th {border: 1px solid black; padding: 5px;}
</style>
</head>
<body>
<h1> QBASDOWN</h1>
</p><p>
A Markdown implementation for FreeDOS
Version 0.8.1
</p><p>
<pre><code><p style=background-color:LightGray;>
Usage:
qbasdown Markdown_file
qbasdown Markdown_file --verbose
qbasdown Markdown_file --silent
Verbose mode will give you more information about the inner workings
of the program than you knew you wanted ...
Silent mode suppresses all screen output. This is most useful when
calling QBASDOWN from a batch file, shell script or another program.
If no filename is given, the user is prompted for one. Note that at
that stage you cannot add the --verbose or --silent switches.
</code></pre>
Written for FreeDOS in QuickBASIC 4.5, mostly under a hybrid DOSEMU/FreeDOS 1.2 installation, but the final compilation in a release will always be tested on bare silicon in a dedicated FreeDOS installation.
</p><p>
QuickBASIC? Why? To see if it could be done, I guess, and also to re-familiarize myself with this BASIC dialect.
</p><p>
It also compiles in FreeBASIC using the <em>-lang qb</em> switch. Linux has dozens of Markdown implementations, probably better than this one, too, but I don't know of any on FreeDOS. But after I started adding in features other implementations don't have, I thought "But I want to use this on Linux myself!" So from version 0.6 onwards, there will be an X86 64-bit Linux version as well.
</p><p>
The DOS version of this program will ONLY work on DOS/Windows-formatted text files, which end lines with CRLF. If no CRLF is detected in the first 1024 bytes of the file, it will tell the user to run a utility such as UNIX2DOS. Most documents have at least a title line, so that should not be a problem. The Linux version should be able to swallow any input file.
</p><p>
QBASDOWN is distributed as QuickBASIC source code and released as a single OS executable, called <em>QBASDOWN.EXE</em> and a 64-bit Linux executable called <em>qbasdown</em>. Yes, I've kept the name, even if it is now compiled in FreeBASIC. Unzip either one to any directory in your PATH.
</p><p>
Once you've unzipped the Linux version, you can find the dependencies with <em>ldd qbasdown</em>. You should also have the <em>tput</em> command, normally part of <em>ncurses</em>. QBASDOWN will work without <em>tput</em>, it just doesn't look as pretty.
</p><p>
Please download the file TEST.MD, cd to where you saved it and use QBASDOWN to convert it to HTML. It will create a file called TEST.HTM in the same directory. That file will show you which aspects of Markdown I've so far managed to implement in QuickBASIC.
</p><p>
The long-term goal is to implement all of Gruber's original Markdown, plus selected extensions from MultiMarkdown and other developments, a few modest ideas of my own (see the emoji and diacriticals section in <em>test.md</em>), and some prettyprinting. Technically, I suppose that means I am inventing a new dialect of Markdown. Fame at last!
</p><p>
</p><p>
<h2>Limitations:</h2>
</p><p>
Since version 0.5, QBASDOWN is no longer constrained by the size of a string array. I have used it to convert a 532KB MarkDown file of over 10 000 lines into a 707KB HTML file. That's about half of <em>War and Peace</em>.
</p><p>
Complexity, however, is another matter. Whenever a file has failed on me with an out-of-string space error, it always seems to be one with an enormous amount of raw HTML in it. I have written an INCLUDE function for that problem.
</p><p>
This code needs a LOT of optimization. I know that.
</p><p>
<p>© Michel Clasquin-Johnson 2020<br />
Released into the Public Domain.</p>
</body>
</html>