Hoping having been not too complicated in my explanation. ![]() ![]() Let me work on it some more, I have in mind to create two scripts, the actual module2Latex.py and a more simple docstring2txt.py that will permit to diff two text file and see what is changed in term of docstrings content between two version of FreeCAD to see what has to be modified in the PDF file, as in current state there is many part that have to be edited by hand to make a decent "PDF product". Bash scripting cheatsheet Getting started Introduction This is a quick reference to getting started with Bash scripting. If you could see the potential power of this approach, you maybe could try to make developers to adhere to a sort of "FreeCAD docstring standard" that could evolve in a more easy to make, user documentation.īut as said this is an experiment, that could produce some good starting point, it is limited to Part, maybe we could try to make similar thing for Draft and see what's happen, it is not too difficult. Whether you’re a beginner or a more advanced user looking for a memory aid, this cheatsheet will help you remember the basic sed commands. This has to be planned, as if developers put appropriate docstrings, making other type of documentation will became superflous.Įven now with some little conventions some "keywords" could be used to trigger actions, like marking a piece of code the description, i have simply use the convention, noted that there is a command description after "-" so when searching for a " - " in a line and splitting this line first part is the command, second part i description, such ways I have put the "command" in a "code formatting stanza" (environment in Latex terminology) and this has done the job for most of the methods. The Sed Cheatsheet Sed is really a great tool to filter & transform text but the syntax is not always easy. Main goal and "show case" is the ability to produce automatic documentation, that could even be issued at "version creation time" to produce "official documentation". This is I think a way to produce better documentation, as it is easy as running a script in a FreeCAD session, the example is done running the script module2Latex.py and running the 00-FCCheat.tex in Latex (using arara as typesetting supervisor, but it is a detail, you could even use a makefile to automate in a different manner the document creation). You can use square brackets to provide a list of letters: grep -E AC.+a example.txt Albania Algeria Canada. ![]() No as this "example" is not a proper cheat sheet, is simply a way to automatically retrieve from FreeCAD Part module, docstrings and make them a PDF document. So instead, you can use + to match a single character at least once and then again as many times as necessary until the end of the word: grep -E A.+a example.txt Albania Algeria. Yes it is possible to make a similar thing, adding two column and maybe a landscape format is not a problem, obviously we have to strip examples and similar things, but with a decent planning, such sort of things could be managed. Are we going to make a multi-column list of links as the first page that will link down in to the rest of the document?
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |