Replies: 5 comments 3 replies
-
Worked a bit more on this and will probably submit as a draft PR. More thoughts:
Then I have a script that parses the file similar to what I have above, use a Mojolicious template to convert to HTML. This script now parses all I'm also thinking the results could be put in a separate repository on GitHub (say |
Beta Was this translation helpful? Give feedback.
-
I have a few thoughts. First the simple one, shouldn't these problems live in Second, I think your format is a bit too complicated for this. I have some ideas, not a full description, but I think we should use markdown (instead of html), since this will help keep things more uniformly formatted and be easier to write/maintain, and I think the actual .pg file should look something like this:
Basic idea is to have some symbol that is a comment like The first row (or maybe multiple rows if needed) of each markdown block can contain some configuration information in the form Some other thoughts are that the problems should have very minimal comments (the description block should be describing what things are). Otherwise if there are too many comments these will just get copy/pasted into each problem built from the template. The wiki should include a link to the full .pg file (not split into different blocks) in which all of the markdown blocks, Anyways, when I was thinking about this, I would have approached it as described here, not a complete description, but a basic idea I had. |
Beta Was this translation helpful? Give feedback.
-
@somiaj i was thinking that we should use markdown and I like your formatting ideas. I think it shouldn’t be too difficult to parse. I also was thinking along the same lines with you about providing the full file available with all of the markdown stripped out. I’ll try to play with this. My thought was to have this as either a link in the file or available in a collapsible text area. Lastly.I think it probably does belong in PG and I think this seems like something we can get done before the full release this summer. |
Beta Was this translation helpful? Give feedback.
-
Here's some new ideas. For a given block that we want comments on, we need the comments as well as markers where to include code. I think it will be too difficult to "guess" where these are, so here's an example, where there are
Also, easily parsed all |
Beta Was this translation helpful? Give feedback.
-
I just put in a draft PR for this in openwebwork/pg#811 |
Beta Was this translation helpful? Give feedback.
-
So I decided to go ahead and try the idea we talked about yesterday with regards to sample problems. I have a proof of concept that takes a sample pg file, embeds
The latter I put in a
__DATA__
at the bottom of the pg file and have it as yaml with embedded html markup.Here's a sample PG file with everything embedded:
I wrote a small script to parse the file, pull out the code blocks, parse the explanation and output to an html file. Here's an example:
with some of the similar styling to the wiki, but we should work to a new style with coloring for the code (code mirror?)
I think we also use GitHub actions to automate this and probably simplest to use GitHub pages to serve the sample problems.
I'm not wed to any particular thing I did here, but wanted to test out to see how easy it would be to do this.
Anyway, had an itch and scratched it. Thoughts?
Beta Was this translation helpful? Give feedback.
All reactions