-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enhancement: Discuss man pages (+ other documentation) that have yet to be added (and those already added) #275
Comments
Probably for someone browsing the site, a markdown file for each man page might be nice. Github renders However we don't want duplicate data: I.e., we don't want to have to edit So if there was a way to generate However without such a man page / markdown translator, we would not recommend doing that too often. Comments? |
Those come to mind for starters. |
The FILES section content is probably not the best place for content that is ore along the lines of make depend: I.e., this FILES section shouldn't list source code files and header files. For example, in Not every FILES section needs to go away. For example, in If it is a "Source file of" or "Header file for", it probably should not be in the FILES section. if it is a reference to a test script, then that script should have its own man page and the reference should be in the SEE ALSO section. |
I think it would be nice too. That's true that GitHub does that though I was thinking more for the IOCCC website. But maybe here is enough? I don't really know.
Okay so is
I'm not sure if there is or isn't. I know there's a I was thinking that it might be an idea after everything is sorted though? |
Hmm yes and some of those I wouldn't have thought of needing man pages. I was going to say as for As for the The same goes for the timestamp one and possibly the iocccsize one since you know these better. I'm not sure about the prep one. I might be able to do that one. The others (esp the I believe there might be some other tools that are missing though? A question about Should any other scripts have the section changed in your mind? For example what about |
Interesting thought.
Hmm yes that is a mistake indeed. So with What about others though? One way to go about is that only the ones that are absolutely part of it and will never change be listed. For example with
Hmm... (NOTE: I refer to Some of the above I'm not actually clear on. The first part of the paragraph I follow but for some reason not the second half. I'm not sure if that's how you worded it or if it's because I'm rather uncomfortable (physically) right now - from surgery. I can try reading it later on (not sure if that'll be today but probably would be the next time I work on documentation) and if it isn't clear then I can ask you to elaborate/rephrase it.
I agree on the test script file yes. I'm not sure in all cases for the source file of / header file for. I mean I can remove those but for some I think it might be good to have. But then your idea is equally valid. So what I guess is needed is a yes or no: should ALL the source file / header files for ALL (or some?) of the man pages be removed? If not yes entirely what should be kept? Going to do something else now and probably won't work on the repo more today. Hope you have a great day! If you reply to things I should be able to get back to that depending on the time and how my day is going. Good day! |
An interesting variation of the files being updated or missing or being renamed I discovered a short bit ago. I have the fix already in place for a commit (but not today) but it made me think I should mention it here too since it's kind of related - even if not related to documentation it is related to missing files. See the following git diff: $ git diff jstr_test.sh
diff --git i/jstr_test.sh w/jstr_test.sh
index e64abe7..d32e94b 100755
--- i/jstr_test.sh
+++ w/jstr_test.sh
@@ -84,12 +84,12 @@ else
fi
# test some text holes in the encoding and decoding pipe
#
echo "$0: about to run test #6"
-export SRC_SET="jstr_test.sh dbg.c dbg.h fnamchk.c iocccsize.c chkauth.c"
-SRC_SET="$SRC_SET chkinfo.c json_parse.c json_parse.h jstrdecode.c jstrencode.c"
+export SRC_SET="jstr_test.sh dbg.c dbg.h fnamchk.c iocccsize.c"
+SRC_SET="$SRC_SET chkentry.c json_parse.c json_parse.h jstrdecode.c jstrencode.c" The question is: what is the purpose of using And with that I'm done here. Going to get some food and then will just take it easy a bit longer and then try sleeping. It's been a difficult day. |
The IOCCC website is on GitHub, which is why GitHub's markdown rendering will be relevant. We plan to remove the old HTML duplicates of stuff on the IOCCC web site and use markdown files and GitHub's rendering of them. |
Interesting. Somehow that kind of disappoints me - but maybe that's a nostalgia thing. Not sure. But then I also haven't seen it yet so maybe it's fine. We shall see I guess but I'm sure you've given it a lot of thought anyway so it'll work out. EDIT: Ah. Maybe you mean you'll take GitHub's html files and put them on the old IOCCC website? That's an interesting thought too. |
You raise a good point. The Recall that the dbg facility is hosted on dbg repo. The repo needs a README.md file, which is what dbg.md in intended to convey. We cannot call it |
Yes. But how it does so is another matter entirely.
True. I'm still not clear on the conflict you refer to in the other repo but I gave a solution to that as well. Otherwise I can fix it tomorrow or the next day. |
The writeup will be a single URL per entry. We could go the other way and generate the HTML from markdown as well. This is TBD. |
One concern (from the sound of it): what about people who write a lot or want to organise different things in more than one file? For example with Snake I have an entire document dedicated to different gameplay modes but the general remarks is shorter (though not necessarily short). In that entry I also have a file for spoilers (on obfuscation) and various other files. In the Enigma machine I have the obfuscation details enciphered via the actual machine itself! In weasel words of 2018 I have more of it in one file but I still have more than one file of details. I know I'm more of an exception with documentation (though that's only for the contest) but even so it's something to keep in mind. But maybe you're working on this too. |
Yes,. the If it helps: perhaps We suggest you focus on pull requests in the dbg repo, and then copy over BTW: For a similar reason, we might want to drop So may we suggest: UPDATE 0:
|
We guess that someone who needs to read a man page such as |
I'll have to look at this later - not today. I'm having a hard time focusing my eyes and I'll be off soon for the night. But from what I gather this is probably a good idea yes. |
This is probably true for many of the man pages yes. Perhaps that's enough given that there might not be a better option. And actually I think I guess then we can say that it's probably not needed to have html files for all the man pages? What about other documentation file types? (Not sure what those might be - just saying that in case there is something now or in the future.) |
The content of README.md is currently focused on repo developers. That is OK, for developers. However the majority of people who will use this repo are IOCCC contestants wanting to enter the IOCCC. They just want to know how to do what they need to do in order to package their entry. So README.md should address the needs of someone who wants to submit to the IOCCC. This isn't to say that the current contents of README.md are unwanted. That content is useful, but perhaps not as a
While it is true that people who enter the IOCCC are, by their very nature, developers. Such people are probably not developers of the code in mkkioccentey repo. Please consider moving the contents of |
This is a great idea actually. I'll have to look at it in more detail - hopefully in the coming days. I suspect that this will require some discussion as well but that's okay. I'll hopefully get to this soon. |
The entry can create its own fun documentation and stuff. That is one of the reasons for all of those extra files are allowed. We are taking about the title page of the entry. There needs to be a single URL where someone can view the judges writeup, along with selected notes from the author. For that title page of we don't need the same data in two or more different forms: we just need one URL. There needs to be a focus on simplicity of maintaining the IOCCC web site. The complexity and over engineered design of the web site is WHY the IOCCC was delayed sooooooo mmaaaannnnyyy times. It is often why the IOCCC skipped a year. It is why Simon is no longer part of the IOCCC: too much focus on an organization of web site, not enough on judging. We are mindful that the rebuild of the IOCCC web site is a big task that MUST be done before the IOCCCMOCK can happen, let alone holding the next IOCCC. We need to finalize the JSON parser semantics test code and return to editing the IOCCC web site. UPDATE 0aSimplicity of maintenance of the process is vital in order to streamline the holding and running of the IOCCC. Until the IOCCC web site maintenance is brought under control, the next IOCCC will be stalled waiting to be help. The complexity of the existing tools that maintained the IOCCC web site caused the IOCCC to collapse into a heap. The solution to maintaining and rebuilding the IOCCC web site will be JSON files. A JSON file for each IOCCC author, and a JSON file for each winning entry. Those JSON files will grab data from the The title page of a winning entry will be formed, in part, from the JSON files for the winners and their entry, along with the contents of the judges remarks and selected remarks from the authors. The title page of a winning entry will refer to the manifest (JSON file for each winning entry that in turn came from the manifest array So if the entry has a bunch of fun ways to provide documentation, it can so do. References to those files will be shown in the manifest of the JSON file the each winning entry. Moreover, the judges remarks and/or selected remarks from the authors can further point to fun documentation that entry might provide. Winning authors will be able to submit pull requests against their JSON winners file and JSON file for the winning entry. They can submit pull requests against the judges remarks and selected remarks from the authors ... plus changes to the enter itself. However the title page will be auto generated from content. BTW: It is likely that the title page will be |
Aha. Well I probably was the first one (besides you and Leo of course) to know - he mailed me right after publication of the 2020 entries. I would have asked if he was okay but he told me all was well so I did not worry. I think I saw him make a comment on hacker news since then about the contest (about formatting of code and not any tips or anything like that). I was going through a pretty rough time then and he wished me well as well. But I didn't know why he retired. I will reply to the other things later - hopefully tomorrow. I had to go help my mum with her iPad but now I'm going to get ready to sleep. Hope you have a good night my friend! |
We looked at man2html v3.0.1 (also available on macOS via homebrew) ... With commit 04df879
UPDATE 0We have a suggestion, @xexyl for you: The man2html: ${MANPAGES} man2html.sh
-./man2html.sh ${MANPAGES} The Then you could add the The instead of using |
FWIW under CentOS: $ rpm -q man2html
man2html-1.6-13.g.el7.x86_64 Fedora (36) has 1.6-29.g.fc36. MacPorts does not have it. I can look at manually compiling it but that'll be another day. Going to shut the laptop down and get some sleep (though I'll be awake a while I fear). I don't know if the options you added to the Makefile exist in older versions. I can have a look tomorrow and let you know. If so maybe you could add some way to test it. I'm not sure though: there doesn't seem to be an option that prints just the version. In other words though this will not be a rule I can run most likely unless I can get it to compile under macOS another time. I'm sure I can if it's worth doing - but I'm not sure if it will be or not. Perhaps not since it won't need to be done very often I should think? Anyway hope you have a great night. I have some things to commit tomorrow and maybe I'll have other things come up too. I'll also try getting to the comments above. |
See the comment I just posted. I can see if that's possible but it depends on what options are available and what you use. I'll look at it in the coming days. Good night my friend! EDIT: Possibly I could still write such a script even if the options are not available though. Will look at that in the coming days too. Anyway have a great night! Sleep well when you do. EDIT 1: The man page for both CentOS and Fedora versions are dated 1998. Would you mind telling me what the authors are of the ones you have? I wonder if it's a different implementation? Or perhaps you can give the synopsis as well - or options? That way we can compare. EDIT 2:
Netscape brings back memories! Okay so does lynx - but never mind that. :) Anyway I'll check into this tomorrow. Good night! |
Not left yet ... might have found it. Is it by Thomas Dickey? The one who is behind ncurses? Here's what I see in usage:
is this the right one? If so I'll look at making the script in the coming days. Going to sleep now. Good night! UPDATE 0:I see you actually included a link to it. But trying the link I can't seem to find a download to the tarball. Mind giving a direct link? Well past bedtime here. Good night! |
Just a quick comment: If you react to comment #275 (comment) I will address the issues in the man pages you cited. I am also curious what you think of #275 (comment) and the man2html version issue as well. I believe that the one I linked will suffice but I want to be sure. Possibly check #275 (comment) too. I hope to address comments #275 (comment) and #275 (comment) in the coming days. There are some other comments as well but those are not as important to the issue so I'm not as worried about them. I'm really worn out today and I think I won't be doing anything else here today. |
$ man2html -h
Option h is ambiguous (headmap, help)
Usage: man2html [ options ] < infile > outfile
Options:
-bare : Do not put in HTML, HEAD, BODY tags
-belem <elem> : HTML Element for overstriked text (def: "B")
-botm <#> : Number of lines for bottom margin (def: 7)
-cgiurl <url> : URL for linking to other manpages
-cgiurlexp <url> : Perl expression URL for linking to other manpages
-compress : Compress consective blank lines
-headmap <file> : Filename of user section head map file
-help : This message
-k : Process a keyword search result
-leftm <#> : Character width of left margin (def: 0)
-nodepage : Do not remove pagination lines
-noheads : Turn off section head detection
-pgsize <#> : Number of lines in a page (def: 66)
-seealso : Link to other manpages only in the SEE ALSO section
-solaris : Process keyword search result in Solaris format
-sun : Section heads are not overstriked in input
-title <string> : Title of manpage (def: Not defined)
-topm <#> : Number of lines for top margin (def: 7)
-uelem <elem> : HTML Element for underlined text (def: "I")
Description:
man2html takes formatted manpages from STDIN and converts it to HTML sent
to STDOUT. The -topm and -botm arguments are the number of lines to the
main body text and NOT to the running headers/footers.
Version:
3.0.1
Copyright (C) 1995-1997 Earl Hood, ehood@medusa.acs.uci.edu
man2html comes with ABSOLUTELY NO WARRANTY and man2html may be copied only
under the terms of the GNU General Public License, which may be found in
the man2html distribution. We recommend using HomeBrew for $ brew install man2html or compile via nonGNU man2html page. |
The json semantics tables related tools - which I'm not so clear on them. Same with dyn_array man page. I think those are the only ones left? |
Yes you are correct. |
Maybe we're finally getting to the point of being able to invite more public feedback. I hope so. |
Issue #87 documents our good progress! |
True and it looks great! As for that see comment #87 (comment) there. |
Are the comments still relevant? The second one about man2html script is maybe less important since it doesn't even seem to work right (man2html itself) but the other one might be relevant? What do you think? -- I don't think I'll be doing anything else (other than the commits I did earlier today) today. I am aware of some issues with some of the markdown in some of my winning entries but I'm not sure exactly how you have it all set up yet so I've not committed them. I do believe I have another pull request open on that repo though. I'm waiting on more information on the way the website will be generated etc. before I worry about the fixes to my entries. I should maybe open an issue on the winner repo but for now I'm going to do something else - for the rest of the day. Have a great day! |
With commit ade28d2 there is now a man page for |
comment 1179412882 does not seem relevant. Regarding comment 1179439529:
We agree. Should we simply abandon the HTML pages OR can you find a better replacement OR ??? |
Thank you.
I do have a link here that has some other options but if none of these work then maybe we should abandon it. I'm not sure I'll look into it today but it's something that maybe we should do. I'm almost ready to commit the other changes. Just running some tests to make sure it goes okay. Seems fine though. |
https://invisible-island.net/scripts/man2html.html is a good discussion with a list of a number of tools. He also linked to a SE post with the question and some others have some suggestions of different kinds. Whether the latter is of any use I don't know. |
With commit ab97007 we have the (I believe) last remaining man pages added. See the log please as I need to leave for now. It might or might not be that these man pages can be improved - I note some example ways (including examples) in the log. I don't expect to do anything else today but I feel good about this. Are we good to close this or should we keep it open until I have gone through consistency (and formatting) and also deciding the man2html issue ? Personally I like to keep it open until everything is resolved but if you think we can close this and want to (both) go ahead. Or else I can. But I do warn again that these man pages could be improved. Good day! |
Perhaps we should simply abandon forming the HTML pages from the man pages, @xexyl ? |
That sounds reasonable to me yes. So I have to fix those two or three man pages but otherwise this issue is resolved unless some other tool comes up. However there’s one thing to consider. I still need to go over them all to make everything consistent and check for typos etc. When do you think I should do that? My thinking is I should wait until we’re absolutely positive that nothing else needs to be written or changed in the man pages (or more specifically until after everything written is complete). Do you think that we should do that after I fix those man pages or should we wait a bit longer? |
Yes, that sounds very reasonable. |
I hope that I was typing that on my phone! Anyway: which way do you think it should be? Once those man pages are fixed I should go ahead and make everything consistent or should I wait until later? I hope to get to the other comment later on today. Trying to solve an issue completely unrelated. |
Some thoughts on this issue crossed my mind. One of them I already thought of before (much earlier on) but did not bring up. That's the first one (or is that first 0 ? :) )
|
Yes.
Yes and Yes.
Yes, that is a good idea, @xexyl |
Thanks. This gives me some things to do. I also don’t know how my week will go but I hopefully will be able to at least start this soon. |
Okay as for the jparse.3: what functions should be included? That needs to be decided before I can do that. As for the UPDATE 0Obviously these have to be documented: /*
* function prototypes for jparse.l
*/
extern struct json *parse_json(char const *ptr, size_t len, char const *filename, bool *is_valid);
extern struct json *parse_json_stream(FILE *stream, char const *filename, bool *is_valid);
extern struct json *parse_json_file(char const *name, bool *is_valid); but what other ones? UPDATE 1Obviously these too: extern bool json_dbg_allowed(int json_dbg_lvl);
extern bool json_warn_allowed(void);
extern bool json_err_allowed(void);
extern void json_dbg(int json_dbg_lvl, char const *name, const char *fmt, ...) \
__attribute__((format(printf, 3, 4))); /* 3=format 4=params */
extern void json_vdbg(int json_dbg_lvl, char const *name, const char *fmt, va_list ap); What about the rest in that file - Any others ? |
Another thing. The Doing something else now. I was really hoping to work on the man page thing today but I don't see that happening. |
We think the functions above are the most important to document, plus: #define JPARSE_VERSION ... BTW: the We don't need every version string documented, the commands with By document, @xexyl, we do NOT mean document the actual value. We don't want to have to update the man page every time there is a version string. Instead you can document the general format of the version string and give an example value. When you do, mention that the example value is just an example for illustrative purposes and will have from release to release. |
Good idea. The |
I was thinking something like that yes. Not sure what I'll get done today but hopefully I can do at least one thing if not more. Hope you're having a nice sleep! |
Thank you. Can you think of any other function that might be of use? Well maybe I'll see something when I get to it.
What about
Right.
Good for clarification as I was not sure about that - and the concern you had also crossed my mind. |
Actually this won't work right because What do you propose? |
Okay as far as the man page splitting up there's more than one way to go about it I'm realising. I'm not up to actually doing any of them right now but I can at least discuss the ideas. Method 0Copy the dbg.3 file to individual files (with the name of the function) but make it in a temporary directory (so I can use sed to replace everything needed quickly). Instead of having one main file for each group (info, warn, debug etc.) I could have them all links to the main Method 1I could instead have as I noted above a main man page for each category (info, warn, debug etc.) and then have the remaining functions (in that category) link to the main man page (of that category). Method 2 ?There probably are other ways and one would be to start out like 0 and then move to 1 in time. Other pointsIf I choose 1 then I have to change Now the question is which way to go. That's a good question. What of it? Using the quicker way might be ideal in some ways as it lets us worry about other things (including that elusive thing called 'real life' which after all these years on the planet I've yet to determine if it's a myth or not). But it's not as useful to the user maybe. The quicker way is of course easier too. What do I do? I don't know. What would you prefer? My guess is it's the way I would prefer too but will take more time and thought - the way of breaking it up. I know what man pages I can use as a model too: those for curses. But it'll take some work. I'm not up to that work today at least. I think that once I have I'm going to do other things for the rest of the day but if you reply and I'm able to do I'll get back to writing here. It might be that I need to wait until after the holiday - and some days later as there will be quite a lot of stimulation that day which always exhausts me even more than usual. But perhaps I'll be able to start out on it before then. If so that would be tomorrow but I doubt it honestly (even though I'd like to get it done). I am sleeping a bit more but not good sleep either (never is). Whether the more sleep will last or not I don't know but I hope so. Even so I'm not any more rested than I had been and I've been feeling low for some time now as well (and for reasons I've yet to figure out if it's other t has the trying to fix the sleep schedule which is of course necessary). Hope you're having a great day and wishing you a great holiday and new year (I have a meme to share with you at that time though)! |
Making really good progress on this issue but I need to take a break to do some other things! I should be able to finish it today. I'm at the place where I need to finally modify I'll be probably an hour before I can do anything more - at the least. |
See #444 (comment) and in particular some discussion things to consider. In particular: Also because a lot of man pages have been added aside from these I moved
Note that only the main man pages are installed. I'm not sure what we want for the rest so I've left that off. Well another reason is I don't feel up to doing any more today but I think it's something that has to be decided anyway. |
I wasn't sure if this should be in the 'issues that aren't really issues' or not but I decided to make it a new issue for now as maybe there's enough to discuss that it warrants a new issue.
I think I know the answer but does every script need a man page? Every tool should have one but what about every script? Do we need any other man pages that aren't section 1?
Currently (as of 7 July 2022) running
(Maybe there's a more efficient way to do this but this is what came to my mind at 0223 ... but suggestions welcome please!)
Will give you:
Now
chkentry.1
is not complete because the tool is not yet written. Theold.chk*
will only be used in some concepts: the tools are no longer needed aschkentry
will take their place.As I said at the time I wasn't sure if
limit_ioccc.sh
's man page should be section 1 but I decided to make it that way because it can be used (and is used) in shell scripts viasource
(or.
).But there are many man pages that are missing too. What should be added? Should anything be changed in the man pages that exist?
I am very well aware of course that even if new discussion brings changes to any of these that prior to the repo being tested in the general public there might be some changes that are needed. Perhaps this issue should be left open until that is done? Certainly until all tools have man pages though. As new tools are added we can add more to discuss.
BTW: I know I asked before and the answer then was 'no' but should there be html versions of the man pages at any point? It might be easy to convert to html via not using the
-P
option and redirecting to markdown files ... though of course maybe we'd have to make some manual edits. Or perhaps there's even aman2html
? I seem to recall there might be. Just a thought that might be worth thinking about on the website: or perhaps not. I leave that up to you but I'd be happy to help with it if you decide this is a good idea.Going to try resting now .. hope you're having a nice sleep my good friend! I do have to be out later on today - post surgery doctor visit - but at that point I would be done here for the day anyway most likely. Did a small pull request. Not sure if I'll do more later on. We shall see. BCNU! :)
The text was updated successfully, but these errors were encountered: