Commit Graph
29 Commits
Author SHA1 Message Date
Landon Curt Noll 4ee4c731f7 convert markdown copyright TAB chars into SPACE chars
While not strictly necessary, replacing the two ASCII tab characters
in the markdown copyright comment makes it easier to detect problematic
TAB indentation within markdown files.

After this commit, only 90 markdown files have leading ASCII TAB
characters.  And again, while not strictly necessary, we can consider
running expand on those 90 markdown files to see what effect that
might have on the HTML files they produce.

Replace leading ASCII TAB characters with multiples of 8 ASCII SPACE
characters (the default action of the `expand(1)` tool) might have
an negative effect on some HTML formatting where **hack-a-round**
formatting was attempted to fix broken indentation caused by
problematic ASCII TAB characters.

Think of this as a baseline for evaluating leading
TAB characters within markdown files.

TODO: Consider either using `expand(1)` to replace leading ASCII
TAB characters with multiples of 8 ASCII SPACE characters AND/OR
modifying the appropriate `bin` tool to convert leading ASCII TAB
characters into multiples of 8 ASCII SPACE characters.
2024-06-22 22:15:25 -07:00
Landon Curt Noll 3ddbac9e6b improve how markdown code language is commented
We added a space between the markdown triple code mark
and language that was enclosed in HTML comments.

So a line of the form:

````
```<!---c--->
````

became:

````
``` <!---c--->
````

This was done to **help** some code see that the HTML comment
string was not a markdown code specifier.   Not all code
understands this after this changed.  For example, `pandoc(1)`
still forms HTML classes of the form "&lt;!---c--&gt;"
when it encounters the above mentioned change.

We also fixed a problem with `2019/dogon/README.md` regarding
a markdown code block.

We also fixed a problem with `2020/yang/README.md` regarding
a markdown code block.
2024-04-12 11:45:50 -07:00
Landon Curt Noll b66c79254a add hack-a-round for language specified markdown code blocks
When language is specified in a markdown code block such as:

````
```c
    printf("Hello, world!\n");
```
````

is used, the resulting HTML as produced by `pandoc(1)` combined
with our revised `ioccc.css` is not intent the code block well.

A temporary "_hack-a-round_" is to turn the "markdown code language
specifier" into an HTML comment.  For example:

````
```<!---c-->
    printf("Hello, world!\n");
```
````

This commits turns off existing markdown code language specifiers
for now, while preserving our ability to restore them in the future
when a better  "_hack-a-round_" to the "markdown code language
specifier" problem is found.

The HTML impact if this "_hack-a-round_" is to produce HTML that
looks like this:

```
<pre class="&lt;!---c--&gt;"><code> .. </code></pre>
```

We might be able to create a complex set of classes for each markdown
code language (there won't be very many) in `ioccc.css`, or we might
find a more general CSS (or maybe `pandoc(1)`?) solution.

For now, this hack-a-round will have to do.
2024-04-04 14:50:38 -07:00
Landon Curt Noll a996f8d2b8 improved indentation and whitespace for markdown code blocks
All code blocks in markdown have been intended by at least 4 spaces.

We add `--tab-stop=8` to all `pandoc(1)` executions in order to set
a better tab stop indentation, especially for tab intended code blocks.

Changed `bin/pandoc-wrapper.sh` VERSION from "1.5.3 2024-03-26"
to "1.6 2024-03-31".

Fixed `1991/brnstnd/sorta.README.md` so that the sorta code
is code blocks.

Removed unneeded paragraph group in copyright in `inc/footer.default.html`.

Fixed excess whitespace after list Author on entry `index.html` page.

Changed `bin/output-index-author.sh` VERSION from "1.5.2 2024-03-26"
to "1.6 2024-03-31".

Performed `make www` to perform the above and test under macOS.

TODO: Fix the problem of the initial line of code being extra intended.
TODO: Fix excess whitespace around code that is inline.
2024-04-01 04:48:48 -07:00
Landon Curt Noll cbc022d864 improve Copyright and CC
The inc/footer.default.html now has a common Copyright and CC BY-SA
4.0 License section for all generated HTML files.

All markdown files have a similar Copyright and CC
at the bottom in the form of an HTML comment.
2024-03-20 00:19:52 -07:00
Cody Boone Ferguson ba764a1833 Fix tmp/format-headers.sh, format headers
The script had "s surrounding the git ls-files command which turned it
to a single file which of course is wrong.

Ran script again fixing many README.md files that had incorrect number
of blank lines for critical headers.

This will have to be done a final but a good number of files have been
corrected.
2023-12-27 08:54:28 -08:00
Cody Boone Ferguson eb529e9eeb Improve instructions/alt code for 1988/spinellis
There is no need to compile to 'runme': the way I designed the alt code
is so that it can be compiled and used exactly like the original entry.
Since the original entry need not compile to another file neither does
the alt version. It just compiles to spinellis.alt instead. (Perhaps
both should compile to something else though?)

The instructions of how to build/how to use in the README.md file have
been fixed and improved (it referred to the old way). The alt code
subsections have been added as well.

I also added to spinellis.alt.c #include <stdlib.h> as it's not a
one-liner anyway and this way system(3) is available without worrying
about warnings. The -Wno-everything still remains there in the system(3)
call in case there is a problem with the code that is typed in (though
that's not been tested either way).
2023-12-18 06:00:31 -08:00
Cody Boone Ferguson 249e865de2 Mass edit README.md: remove top award/author lines
As requested on GitHub: a tool that will be written, readme2index, will,
as explained:

    '... will take the converted HTML from the README.md markdown and
    inject it into an HTML template. Things such title, award one and
    author information will be injected into the HTML page ahead of the
    HTML that was converted from the README.md markdown. Without going
    into details of HOW at this time, the result will be a coherent HTML
    index.html page with the winner title / award, winning author
    information, and important file links come from other sources and
    NOT from the README.md file.

    The text from the 1st award line, thru the authorship information,
    and up to but not including the "## To build:" line in the README.md
    file will just get in the way. Moreover authors might be tempted to
    try and maintain that top of README.md text instead of working with
    the author/_author_handle_.json and winner .winner.json files.

This was done with my[0] sgit(1) (https://github.com/xexyl/sgit) tool like:

    sgit -o -n -e '/^## To build:/,$p' '[12][0-9][0-9][0-9]/*/README.md'

[0] Is that shameless self-promotion? I don't know but I don't care: it
is generally a very useful tool and has been used in other repos too.
Besides, I've done it many times before and it's a great example that I
will be adding to the README.md file of the tool, one I hadn't thought
of doing.
2023-11-05 03:39:46 -08:00
Landon Curt Noll 360708f858 cleanup winner README.md files
Fixed cases where there was a bad trailing backslash.

Improved a few cases where a code block was needed
to highlight some text.

Changed a few cases where a code block needed to
declared as, say, a sh code block.

Fixed a few cases where the winner information was not properly formatted.

Plus a few nits and clarifying text was added.
2023-11-04 03:21:11 -07:00
Landon Curt Noll d2188d1491 fix a few more standard header lines in winner README.md files 2023-11-02 16:01:23 -07:00
Landon Curt Noll fbd20cfdc2 fix standard headers and header spacing in winner README.md files 2023-11-02 15:45:36 -07:00
Landon Curt Noll e1cd30eff0 change use of <br> with blackslash for markdown line breaks 2023-10-18 16:21:43 -07:00
Cody Boone Ferguson 41427c64c3 Format/typo check 1988/spinellis 2023-10-18 09:27:50 -07:00
Landon Curt Noll 95e41fa835 fix 1988/spinellis
Prevent the Makefile from hanging on stdin by
providing some sample input files and asking the
user to run the command themselves.
2023-07-02 18:23:59 -07:00
Cody Boone Ferguson 76cef25333 Fixes to thanks for fixes file
At least one entry was missing (1984/anonymous).

Some entries were removed. One such entry was not ever broken but
instead when I had renamed a file (to markdown) I forgot to update the
DATA variable in the Makefile which then broke compilation. This was
seen in the log and mistakenly believed that there was something wrong
with the entry when there wasn't. Other entries removed were not fixes
but notes.

Various README.md files have been updated for this sometimes just
formatting merely because I opened the file because for instance there
is an alternate version (many by me) that is referred to. I'd not be
surprised if more README.md files have to be updated for this much
better system but these will be found in time when I do another pass
(and some years I have not checked at all yet).
2023-07-01 09:49:26 -07:00
Cody Boone Ferguson 3500226a0c Fixes in thanks-for-fixes.md file
There were several fixes that needed to be made. Some were done and in
the process I discovered some fixed entries that really should be an
alternate version. That was not yet done but I have kept track of some
and will find the others - another time.

As there are more important things to do (like the jprint tool in the
mkiocccentry repo) and since I need a break I have decided to make a
pull request with the changes made.

Some README.md files had to be updated for this commit as well.
2023-06-09 03:59:07 -07:00
Cody Boone Ferguson d235b565df Fix consistency of award titles
This was done quite easily with a bit of thought. I generated a script
that could be modified in vim if necessary (as it turned out to be
though some of it could have been generated too but I did not think of
everything at once and it is a hack).

This is how I generated it:

    echo '#!/bin/bash' > bin/check_awards.sh ; ( while read -r g ; do echo grep "$g"; done < <(sed -e 's,_,/,g' -e 's/"/\\"/g' tmp/year-auth-prize.csv | awk -F, '{print grep "\x22" $2 "\x22" " " $1 "/" "README.md"}' ); ) >> bin/check_awards.sh

Then I I modified the file (again this was a hack to make it easier and
quicker and better for being tired too) in vim to make the grep use -Hc
so I could pipe it to 'grep :0'. This found the files without the right
award. So the final command was:

    sh bin/check_awards.sh |grep :0

though I did have to edit some files several times.

For reference the script has been added to the repo too but with +x
permissions.

This change also required updating the CSV file in tmp/.
2023-05-13 07:02:07 -07:00
Cody Boone Ferguson 104a8496e7 Add mastodon link for Diomidis Spinellis 2023-05-12 11:05:22 -07:00
Cody Boone Ferguson 15787fbdd3 Update 1988 winning entries' README.md files
Format and typo fixes.
2023-04-14 06:19:50 -07:00
Cody Boone Ferguson 9e323d8392 Remove colon at end of award in README.md files
As in

    sgit -e '1s/:$//g' '*README.md'
2023-04-11 08:43:41 -07:00
Cody Boone Ferguson 4bf3f302cb 'comments' -> 'remarks' in all README.md files
As in

    sgit -e 's/\([Aa]uthor.*\)comments/\1remarks/g' -e 's/\([Jj]udge.*\)comments/\1remarks/g' '*README.md'
2023-04-10 11:01:39 -07:00
Cody Boone Ferguson f0eb23a14e Fixes URL for Diomidis Spinellis entries 2023-04-10 06:08:10 -07:00
Cody Boone Ferguson 94051d551d Add important note to 1988/spinellis/README.md
One needs to make clobber for this entry to work right! It cannot easily
be added to the Makefile as the rule depends on the source code. This
probably should be fixed.
2023-04-07 05:14:41 -07:00
Cody Boone Ferguson e09f677b37 Mass typo fix (all README.md and Makefiles)
As in

    sgit -e 's/the terms this license/the terms of this license/g' '*/Makefile' '*/README.md'
2023-04-02 09:27:13 -07:00
Cody Boone Ferguson 4085c7701a Minor update to 1988/spinellis/README.md
I don't believe one needs to enter two EOFs in order for it to function
though I could swear I encountered the issue once before.
2023-03-27 09:01:30 -07:00
Cody Boone Ferguson 6e206fc25a Add 1988/spinellis/spinellis.alt.c for clang
This was fun to do even though it's also a very simple one liner plus
special handling in the Makefile (the latter part is so you can use it
the exact same way as the original). The original code just #included
/dev/tty. This does something just as magical! It can be used like:

	make alt
	# some C code
	^D
	./spinellis

For instance:

	make alt
	#include <stdio.h>
	int main() { puts("hello world"); }
	^D
	./spinellis

Now those with clang can enjoy the entry without any functional
difference.

I have a very twisted point to make about the original version and this
version too: with a very slight change one can actually make a C++
version. Ick! :-)
2023-03-27 08:59:03 -07:00
Landon Curt Noll 1b1dd2f2e4 put all README.md files under CC BY-SA 4.0 License
This will make is easier for others to share README.md
files while requiring them to attribute the file
when using it.
2023-03-26 02:58:27 -07:00
Cody Boone Ferguson a958027ee6 Get all 1988 entries to compile
For 1988/dale it will not compile under macOS. I was able to get it to
almost compile under macOS but there was one problem. As well this 'fix'
will make it not compile under linux. One change was required which was
changing the #define _ define followed by #_ foo to be just '#define
foo' etc.

Added to 1988/isaak/.gitignore isaak.output.

1988/spinellis won't compile with clang.

1988/phillipps will compile but it is likely to segfault at least in
some systems (maybe not all).

Updated many README.md files for the changes above (and probably other
changes I've neglected to write in this log). Most changes in the readme
files are probably just formatting and probably typos as well as how to
compile and run entries nowadays. There might have been other changes.
2023-03-05 09:39:48 -08:00
Cody Boone Ferguson 17ea7fbd9e git mv *.hint -> README.md
There is one exception:

    $ find . -name '*.hint' -execdir git mv '{}' README.md \;
    git statufatal: destination exists, source=1992/albert/albert.hint, destination=1992/albert/README.md

Looking at the two files they differ quite a bit so I've not changed it.
I'll bring this up on GitHub.
2023-02-08 05:47:28 -08:00