Skip to content

Commit ac07855

Browse files
committed
REVIEW: final modifications integrated
1 parent 27b3bf2 commit ac07855

File tree

3 files changed

+12
-12
lines changed

3 files changed

+12
-12
lines changed

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -89,18 +89,18 @@ Alternatively, you can also use this tool directly from the command line.
8989
Make sure to have IronPython or Python3/pythonnet installed and the `GH_IO.dll` assembly available.
9090
Then start the script pointing it to a source and target folder, e.g.:
9191

92-
ipy componentize_ipy.py examples build
93-
python componentize_cpy.py examples build
92+
ipy componentize_ipy.py examples/ipy build
93+
python componentize_cpy.py examples/cpy build
9494

9595
Optionally, tag it with a version:
9696

97-
ipy componentize_ipy.py examples build --version 0.1.2
98-
python componentize_cpy.py examples build --version 0.1.2
97+
ipy componentize_ipy.py examples/ipy build --version 0.1.2
98+
python componentize_cpy.py examples/cpy build --version 0.1.2
9999

100100
An optional name prefix can help tell components apart from other similarly named ones:
101101

102-
ipy componentize_ipy.py examples build --prefix "(PACKAGE-NAME)"
103-
python componentize_cpy.py examples build --prefix "(PACKAGE-NAME)"
102+
ipy componentize_ipy.py examples/ipy build --prefix "(PACKAGE-NAME)"
103+
python componentize_cpy.py examples/cpy build --prefix "(PACKAGE-NAME)"
104104

105105
## How to create components
106106

componentize_cpy.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
import tempfile
88
import urllib.request, urllib.parse, urllib.error
99
import zipfile
10-
from io import StringIO
10+
from io import BytesIO
1111

1212
import clr
1313
import System
@@ -66,9 +66,9 @@ def fetch_ghio_lib(target_folder="temp"):
6666
ghio_dll = "GH_IO.dll"
6767
filename = "lib/net48/" + ghio_dll
6868

69-
response = urllib.urlopen("https://www.nuget.org/api/v2/package/Grasshopper/")
69+
response = urllib.request.urlopen("https://www.nuget.org/api/v2/package/Grasshopper/")
7070
dst_file = os.path.join(target_folder, ghio_dll)
71-
zip_file = zipfile.ZipFile(StringIO.StringIO(response.read()))
71+
zip_file = zipfile.ZipFile(BytesIO(response.read()))
7272

7373
with zip_file.open(filename, "r") as zipped_dll:
7474
with open(dst_file, "wb") as fp:

examples/cpy/Test_KitchenSink/metadata.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"iconDisplay": 2,
1212
"inputParameters": [
1313
{
14-
"name": "X",
14+
"name": "x",
1515
"nickname": "x",
1616
"description": "The X value of the component.",
1717
"optional": true,
@@ -25,7 +25,7 @@
2525
"simplify": false
2626
},
2727
{
28-
"name": "Y",
28+
"name": "x",
2929
"nickname": "y",
3030
"description": "The Y value of the component.",
3131
"optional": true,
@@ -38,7 +38,7 @@
3838
"simplify": true
3939
},
4040
{
41-
"name": "Z",
41+
"name": "z",
4242
"nickname": "z",
4343
"description": "The Z value of the component.",
4444
"optional": true,

0 commit comments

Comments
 (0)