Commit Graph

17 Commits

Author SHA1 Message Date
Kris Slyka
27115e98e4 [tools] fcinfo: fix syntax warnings and improve output for git diffs (#16312)
* Fix syntax warnings about invalid escape sequences

Backspaces in regular expressions were not escaped properly leading to warnings on every invocation of the program.

* Improve formatting of fcinfo output

* Printing of part BREP file properties (hash and size) has been made optional since these values often change without explicit user action making git diffs almost unreadable by hiding actual changes behind a flood of changed hashes because a base feature further up the history was changed. There is a new option (-p) to re-enable the printing of these file properties.

* Unformatted float outputs have been replaced with proper formatting using f-strings which round the values to a sensible number of places.

* Colors are printed in their native 0-255 range. Printing them as float brings no benefit here.

* Most string concatenation for output has been replaced with f-strings

* Fix printing of color properties
2024-11-18 17:52:16 +01:00
DeflateAwning
1e3179e9bc Find and replace http://freecad.org to https://freecad.org
Find and replace:
http:\/\/(.{0,10})freecad
https://$1freecad
Done in all remaining files (after doing it in SVGs in the last commit)
2023-10-29 22:39:22 -06:00
luzpaz
38a01939e0 Migrate domain name from freecadweb to freecad (#9352)
* Migrate domain name from freecadweb to freecad
* Migrate src/Mod/Material files
* Migrate Stylesheet related files
* Migrate *.svg files
* Migrate miscellaneous files
* Migrate some build files
* Migrate recently added TD AR_IRAM template files

Closes #6415
2023-04-24 15:19:20 -05:00
Chris Hennes
99cd277a93 Tools: Apply pre-commit autoformatting 2023-04-22 13:07:06 -05:00
Adrian Insaurralde Avalos
8269fdbe70 [tools] fix fcinfo -g script [skip-ci]
ZipFile.read returns a bytes-like object so re.sub must be passed byte-like objects arguments when operating on those read files.
2022-09-13 19:38:43 -04:00
Christian Meusel
1e14a24bef Tools: Use Python 3 as interpreter for fcinfo
Since Python 2 support has been dropped with #6143, let's have Python 3
as default interpreter on the platforms caring for it.
2022-08-22 12:21:55 +05:00
luz paz
6debee9947 Tools: remove py2 support from fcinfo script 2022-02-08 16:29:27 +01:00
tomate44
05dfa5ccc0 fcinfo: support FCBak backup files 2020-12-20 09:59:43 +01:00
tomate44
d320c7bb8d fcinfo: support backup files 2020-12-20 09:25:36 +01:00
Mitch Roote
ea5d2efabe Update fcinfo script for py3 compatibility 2020-12-15 11:10:40 -05:00
luz.paz
50a8e3cf22 Fix misc. source comment typos
Found via `codespell -q 3 -I ../fc-word-whitelist.txt -S ./.git,*.po,*.ts,./ChangeLog.txt,./src/3rdParty,./src/Mod/Assembly/App/opendcm,./src/CXX,./src/zipios++,./src/Base/swig*,./src/Mod/Robot/App/kdl_cp,./src/Mod/Import/App/SCL,./src/WindowsInstaller`  
Fix ./src/Tools/fcinfo grammar + whitesapce  
Fix typos in ./src/Mod/Mesh/App/Core/Evaluation.cpp
2019-08-07 20:16:45 -04:00
Yorik van Havre
a1edbb092c Tools: added --gui option to fcinfo tool 2019-07-28 13:59:03 -03:00
Yorik van Havre
d04686026d Tools: Small additional fix in fcinfo tool 2019-07-27 15:59:03 -03:00
Yorik van Havre
42d0282580 Tools: More options to fcinfo tool 2019-07-27 15:48:51 -03:00
Patola
c60824db35 Better handle non-ascii characters
This prevents the following error when using fcinfo as diff driver for WebTools Git:
(...)
  File "/usr/local/bin/fcinfo", line 89, in startElement
    print ("   " + key + " : " + val)
UnicodeEncodeError: 'ascii' codec can't encode character u'\xe1' in position 17: ordinal not in range(128)
fatal: unable to read files to diff
2018-02-26 10:51:29 -03:00
Yorik van Havre
0f259a2c54 fixed wrong info in fcinfo tool 2016-03-28 00:27:43 -03:00
Yorik van Havre
abba688ee5 Added fcinfo utility
This utility prints information about a given FreeCAD file (*.FCStd)
on screen, including document properties, number of included objects
and object sizes.

It can be used as a textconv tool for git diff by adding this utility to
your exec path andadding this entry to .gitattributes: *.fcstd diff=fcinfo

Usage: fcinfo myfile.FCStd
2015-06-27 20:01:35 -03:00