The idea is first to fine-tune the script so information is formatted as we want. Then how to make it available publicly in another step.
Detecting if a FreeCAD command page has a complete {{GUICommand}} template
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Be nice to others! Respect the FreeCAD code of conduct!
Re: Detecting if a FreeCAD command page has a complete {{GUICommand}} template
Last edited by openBrain on Wed Jan 22, 2020 10:29 pm, edited 1 time in total.
Re: Detecting if a FreeCAD command page has a complete {{GUICommand}} template
Of course. Thanks.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
Re: Detecting if a FreeCAD command page has a complete {{GUICommand}} template
Attached a first release of the script (sorry, have to zip it so it's accepted by the forum).
It will :
EDIT : minor fixing in script
It will :
- Display a warning when a 'special' icon is used ('Icon' field used)
- Display a warning when no icon exists ('Empty' field used)
- Display a warning if both 'Icon' & 'Empty' fields are used
- Finally, print 'OK' if all mandatory fields are there, or display 'NOK' if not
EDIT : minor fixing in script
- Attachments
-
- checkGuiCommand.zip
- (761 Bytes) Downloaded 20 times
Re: Detecting if a FreeCAD command page has a complete {{GUICommand}} template
.
I'm traveling this week so won't be really available to test. Nevertheless, this is a great solid step in the direction of cleaning up and making the wiki more comprehensive. Cheers!
Well done, my friend.
I'm traveling this week so won't be really available to test. Nevertheless, this is a great solid step in the direction of cleaning up and making the wiki more comprehensive. Cheers!
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
Re: Detecting if a FreeCAD command page has a complete {{GUICommand}} template
Dont' worry. It's done when it's done. Enjoy your trip. Just tell me if you need adjustments when you'll have test it.
Re: Detecting if a FreeCAD command page has a complete {{GUICommand}} template
OK! So, instead of moving forward with bash, lets convert this in to a python script (perhaps with the ability to import pywikibot to actually login and affect change in the future)
There are a lot of false positives due to the script indiscriminately checking wiki pages that wouldn't need to be searched (since they are not commands). The solution I'm thinking for this is creating a file hosted on github that has all the FreeCAD command names (aka pages that would have a {{GuiCommand}} template}, we can then point the script to access said file as an input. Does that make sense?
I'd also propose to have an option to indicate if a template is linted and/or to actually lint it. For example the {{GuiCommand}} markup is preferably expanded and not wrapped all on 1 line, ref: https://forum.freecadweb.org/viewtopic. ... 39#p365395
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
Re: Detecting if a FreeCAD command page has a complete {{GUICommand}} template
Could be good to first define a general algorithm (without referring any coding language).
Re: Detecting if a FreeCAD command page has a complete {{GUICommand}} template
Fair enough.
IHere is a list of all the FC commands (without their translation pages)
https://gist.github.com/luzpaz/08290325 ... 88822d15d1
We can have the script pull https://gist.githubusercontent.com/luzp ... tfile1.txt as the input
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs