Commit Graph

39 Commits

Author SHA1 Message Date
Jeremy Rand 573f12bbaf Update the project readme to point to the distribution readme. 2021-06-30 00:27:08 -04:00
Jeremy Rand 345a1bb88b Final commit before publishing version 1.0. 2021-06-30 00:21:59 -04:00
Jeremy Rand e5e654f5ec Add a Read.Me.md file which will be used to document the shell command for the distribution. For now, it is just a skeleton. Use md2teach to convert that markdown file into a Teach file for the distribution. Make running the test.md file through md2teach optional based on a DEBUGBUILD setting in the Makefile. 2021-06-23 00:09:38 -04:00
Jeremy Rand 51f8ff5574 Remove the work on trying to support a BabelFish translator. Chris Vavruska has picked it up because I was struggling with dealing with the 64K code resource limit. His code is here: https://github.com/vavruska/markdownGS
My plan is to go forward with just a shell command which is focused only on markdown to Teach file conversion, intended to be used in my build engine under Golden Gate.
2021-06-22 23:56:19 -04:00
Jeremy Rand 51ea60fe31 A bit more code towards building a babel fish translator for markdown. 2021-05-19 22:54:53 -04:00
Jeremy Rand fa4966261d The start of the implementation of the init code for the babel fish translator. 2021-05-16 23:34:29 -04:00
Jeremy Rand b89ad278dc Improve the build to better support building the babel fish translator. Fix the bugs in the filter code for the translator. Based on testing, I think it is working now and matches any file with a name *.md. 2021-05-13 23:28:53 -04:00
Jeremy Rand 1572698a42 Add some code to filter files to those which match "*.md". This code is untested as yet but it compiles so that is something. I suspect I may have maybe messed up the stack but I will test it when I get closer to something that I can install. 2021-05-12 23:56:05 -04:00
Jeremy Rand 9e8e470ed9 Using the latest version of GoldenGate, the teachRez script workaround is no longer required. The md2teach exec works as well now under GoldenGate as it does under GNO/ORCA (which hopefully means it works well, TBD). 2021-05-11 23:35:26 -04:00
Jeremy Rand c361a9c311 Add a few files for the resources of a babel fish translator. Code to come. 2021-05-11 00:14:23 -04:00
Jeremy Rand ff039e5ee0 Implement some changes based on feedback from Kelvin:
- Add the window position resource first.  That way, if the style resource needs to grow, the window position resource will not need to be re-written.

- Do not dispose of a handle passed to the resource manager through AddResource.  The resource is owned by the resource manager after that.

- No need to make the resource as changed when adding a resource.  It is implied.

Also, rename the disk image from Distribution to md2teach.
2021-05-10 22:58:12 -04:00
Jeremy Rand f1fd4a7bd3 Install Babelfish on the boot disk. It no longer boots in GSPlus for some reason (warning about memory and not sure why). So, will do further testing from mame I guess. 2021-05-07 00:19:26 -04:00
Jeremy Rand e54c22fdda Add more to the makefiles to support building both the shell command and the babelfish translator which is the next step in supporting markdown. 2021-05-06 23:43:31 -04:00
Jeremy Rand 76d20f76e6 Turn on the -r argument in the default execution rule in the makefile. Some minor cleanup. 2021-05-05 23:33:59 -04:00
Jeremy Rand e7cef1bfca
Merge pull request #1 from ksherlock/rezflag
add -r flag to generate rez file
2021-05-05 23:28:12 -04:00
Kelvin Sherlock fb3ea1342d add -r flag to generate rez file/proper resource fork at run time 2021-05-05 21:58:48 -04:00
Jeremy Rand 34fd580448 Implement the rest of the direct writing of resources to the file. I have tested this under GNO (as opposed to Golden Gate where resource writes are not yet supported) and it does seem to work. I also tested it at 2.8MHz and the large test file takes about 30 seconds to convert. I may look at turning on the optimizer in the compiler to try to get a bit better performance on real HW. I decreased the stack size to 8K for now because 32K was too big for a "real" machine as opposed to the emulated Golden Gate. 2021-05-05 00:23:28 -04:00
Jeremy Rand e4778d0581 Add all of the supported entities to the test markdown file. They look good in the resulting Teach file. 2021-04-29 20:37:17 -04:00
Jeremy Rand 0c001196b1 Some minor fixes to style translation. Quote blocks should be working now. Some extra carriage returns are removed. Some extra style debug output to figure out if there are problems. Extend the test.md file to better cover cases I care about (versus cases the md parser cares about). 2021-04-29 19:33:15 -04:00
Jeremy Rand 9e3562dd5f Implement a workaround for writing resources. Write the resources I want to a .rez file and use a script in the build itself to turn that into resources and attach it to the output file. This seems to result in a styled teach file for my test input that loads and looks pretty close to right. 2021-04-29 00:24:27 -04:00
Jeremy Rand 8b97df852c Use the --mem argument in Golden Gate to get an accurate stack usage value. Beginnings of work on writing resource information. 2021-04-28 23:20:20 -04:00
Jeremy Rand ce6666456d Call into the style code from translate. I think the right styles are being set now. Just need to write the resources to the output file. 2021-04-27 20:26:12 -04:00
Jeremy Rand 2d31af9b45 Provide a bunch of the implementation for updating the style information. 2021-04-26 20:16:42 -04:00
Jeremy Rand 6f5cefe417 Split out the work in progress on styling the text into its own file. 2021-04-24 16:25:32 -04:00
Jeremy Rand 2c6c191af8 Add this missing file. 2021-04-24 16:18:30 -04:00
Jeremy Rand 59913db1ff Cleanup the implementation and split things into separate files a bit. 2021-04-24 16:15:43 -04:00
Jeremy Rand 72da5a8db2 Write the file as a teach file even though the resources aren't there yet. Add a bunch of infrastructure to start tracking the format of the text. 2021-04-23 00:20:27 -04:00
Jeremy Rand 3456321b23 Change from stdio to direct GS/OS calls for writing the file. Need to switch from a text file to a teach file and write the resources next. 2021-04-22 20:21:14 -04:00
Jeremy Rand beb063b56f Fill in all of the entities, mapping to the GS's character set (which is based on that from classic MacOS). 2021-04-22 00:56:13 -04:00
Jeremy Rand a642513db3 Add some basic support for HTML entities. Just the copyright symbol is supported now but all characters from the extended set of the GS that exist in the HTML entities should be added. 2021-04-21 00:21:02 -04:00
Jeremy Rand effa777037 Improve the pure text output of the converter. It now handles numbered and unnumbered lists. It adds a horizontal line for HR. Spacing is better between blocks. It no longer inserts a leading blank line at the top of the document.
I have extended the execution rule to put the resulting text file onto a disk image and launch an emulator so I can see the text file on the target machine.  This should make iteration easier.

Even though I am asking to print carriage returns in the output, I am getting line feeds.  Now sure what is doing the translation.  It could be the ORCA standard library (not likely) or Golden Gate (maybe).  I should next change to direct use of GS/OS for the writes and avoid the ORCA library anyway.
2021-04-21 00:00:01 -04:00
Jeremy Rand 04233b2621 Turn the old output into the debug output and parse some arguments to enable/disable that debug output. Open the output file and send some raw output to it. The current output isn't complete yet but it is a step towards the right output. 2021-04-19 00:05:45 -04:00
Jeremy Rand 40a8761f75 Review all uses of int and unsigned and promote them to int32_t or uint32_t as required. 2021-04-16 00:26:25 -04:00
Jeremy Rand cfc83f702a Change the output format to be more readable in order to understand the output of the parser, I think I will turn this output into optional debug output at some point but it is useful for now in development. 2021-04-15 00:20:19 -04:00
Jeremy Rand b641d4a508 Add a test markdown file. Parse the arguments in main to get the input and output file. Read the input file and pass it to the parser. The test markdown file is successfully parsed! 2021-04-14 23:12:04 -04:00
Jeremy Rand bd1424169d Fix copyright in the file header. 2021-04-14 00:01:05 -04:00
Jeremy Rand 361cdd941e Add a readme and license file. 2021-04-13 23:53:20 -04:00
Jeremy Rand 727f7494c4 Initial commit of a "working-ish" port of md4c for the ORCA shell. Lots of todos to follow up on but it is a good start. 2021-04-13 23:40:58 -04:00
Jeremy Rand ad2a57f4d4 Initial Commit 2021-04-13 15:10:02 -04:00