mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-11 10:06:47 +00:00
docs code block formatting
`console` type code-block is designed mainly for examples of the console commands with the output. If it's just a shell script with comments, then `console` only gets in the way - e.g. if you try to select a console code block manually, you won't be able to select comment symbol `#` at the beginning of the command making code unrunnable if you try to copy and run it. I've replaced it with `bash` or `bat` (for Windows) code blocks where `console` wasn't necessary. I've also removed `$` symbols at the beginning of the commands if it's not a `console` code-block - since otherwise it just breaks "Copy Code Block" because you copy unrunnable code.
This commit is contained in:
@@ -17,7 +17,7 @@ Source installation
|
||||
Here is a minimal example of how to use IfcPatch as a Python module or CLI
|
||||
utility:
|
||||
|
||||
::
|
||||
.. code-block:: console
|
||||
|
||||
$ python -m ifcpatch -h
|
||||
|
||||
@@ -45,10 +45,10 @@ This recipe expects one argument, which uses the
|
||||
:ref:`ifcopenshell-python/selector_syntax:filtering elements` syntax. In this
|
||||
example, we'll extract out all `IfcWall` elements.
|
||||
|
||||
::
|
||||
.. code-block:: bash
|
||||
|
||||
$ ifcpatch -i input.ifc -o output.ifc -r ExtractElements -a "IfcWall"
|
||||
$ cat output.ifc
|
||||
ifcpatch -i input.ifc -o output.ifc -r ExtractElements -a "IfcWall"
|
||||
cat output.ifc
|
||||
|
||||
Here is a minimal example of how to use IfcPatch as a library:
|
||||
|
||||
@@ -66,16 +66,16 @@ Here is a minimal example of how to use IfcPatch as a library:
|
||||
|
||||
You can also alias it to a command:
|
||||
|
||||
::
|
||||
.. code-block:: bash
|
||||
|
||||
$ alias ifcpatch='python -m ifcpatch'
|
||||
alias ifcpatch='python -m ifcpatch'
|
||||
|
||||
Alternatively, you can package it as an executable.
|
||||
|
||||
::
|
||||
.. code-block:: bash
|
||||
|
||||
$ python make.py
|
||||
$ ./dist/ifcpatch
|
||||
python make.py
|
||||
./dist/ifcpatch
|
||||
|
||||
Patch recipes
|
||||
-------------
|
||||
|
||||
Reference in New Issue
Block a user