From 86d5e1c068fa739d58ad2e366fd27ce989e508ba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Samohel?= Date: Wed, 19 May 2021 14:37:15 +0200 Subject: [PATCH] make ascii art compatible, docstrings update --- tools/build.ps1 | 30 ++++++++++++++++++----------- tools/build_win_installer.ps1 | 29 +++++++++++++++++----------- tools/create_env.ps1 | 27 +++++++++++++++----------- tools/create_zip.ps1 | 31 +++++++++++++++++------------- tools/make_docs.ps1 | 22 ++++++++++----------- tools/run_documentation.ps1 | 36 ++++++++++++++++++++++++----------- tools/run_mongo.ps1 | 22 ++++++++++----------- tools/run_project_manager.ps1 | 4 ++-- tools/run_tests.ps1 | 22 ++++++++++----------- 9 files changed, 131 insertions(+), 92 deletions(-) diff --git a/tools/build.ps1 b/tools/build.ps1 index 611d8af668..d9fef0f471 100644 --- a/tools/build.ps1 +++ b/tools/build.ps1 @@ -12,6 +12,14 @@ PS> .\build.ps1 +.EXAMPLE + +To build without automatical submodule update: +PS> .\build.ps1 --no-submodule-update + +.LINK +https://openpype.io/docs + #> $arguments=$ARGS @@ -82,17 +90,17 @@ $art = @" . . .. . .. _oOOP3OPP3Op_. . - .PPpo~· ·· ~2p. ·· ···· · · - ·Ppo · .pPO3Op.· · O:· · · · - .3Pp · oP3'· 'P33· · 4 ·· · · · ·· · · · - ·~OP 3PO· .Op3 : · ·· _____ _____ _____ - ·P3O · oP3oP3O3P' · · · · / /·/ /·/ / - O3:· O3p~ · ·:· · ·/____/·/____/ /____/ - 'P · 3p3· oP3~· ·.P:· · · ·· · · ·· · · · - · ': · Po' ·Opo'· .3O· . o[ by Pype Club ]]]==- - - · · - · '_ .. · . _OP3·· · ·https://openpype.io·· · - ~P3·OPPPO3OP~ · ·· · - · ' '· · ·· · · · ·· · + .PPpo~. .. ~2p. .. .... . . + .Ppo . .pPO3Op.. . O:. . . . + .3Pp . oP3'. 'P33. . 4 .. . . . .. . . . + .~OP 3PO. .Op3 : . .. _____ _____ _____ + .P3O . oP3oP3O3P' . . . . / /./ /./ / + O3:. O3p~ . .:. . ./____/./____/ /____/ + 'P . 3p3. oP3~. ..P:. . . .. . . .. . . . + . ': . Po' .Opo'. .3O. . o[ by Pype Club ]]]==- - - . . + . '_ .. . . _OP3.. . .https://openpype.io.. . + ~P3.OPPPO3OP~ . .. . + . ' '. . .. . . . .. . "@ diff --git a/tools/build_win_installer.ps1 b/tools/build_win_installer.ps1 index 4a4d011258..e46cd6a84d 100644 --- a/tools/build_win_installer.ps1 +++ b/tools/build_win_installer.ps1 @@ -1,16 +1,15 @@ <# .SYNOPSIS - Helper script to build OpenPype. + Helper script to build OpenPype Installer. .DESCRIPTION - This script will detect Python installation, and build OpenPype to `build` - directory using existing virtual environment created by Poetry (or - by running `/tools/create_venv.ps1`). It will then shuffle dependencies in - build folder to optimize for different Python versions (2/3) in Python host. + This script will use already built OpenPype (in `build` directory) and + create Windows installer from it using Inno Setup (https://jrsoftware.org/) + #> .EXAMPLE -PS> .\build.ps1 +PS> .\build_win_installer.ps1 #> @@ -76,11 +75,19 @@ function Install-Poetry() { $art = @" -▒█▀▀▀█ █▀▀█ █▀▀ █▀▀▄ ▒█▀▀█ █░░█ █▀▀█ █▀▀ ▀█▀ ▀█▀ ▀█▀ -▒█░░▒█ █░░█ █▀▀ █░░█ ▒█▄▄█ █▄▄█ █░░█ █▀▀ ▒█░ ▒█░ ▒█░ -▒█▄▄▄█ █▀▀▀ ▀▀▀ ▀░░▀ ▒█░░░ ▄▄▄█ █▀▀▀ ▀▀▀ ▄█▄ ▄█▄ ▄█▄ - .---= [ by Pype Club ] =---. - https://openpype.io + . . .. . .. + _oOOP3OPP3Op_. . + .PPpo~. .. ~2p. .. .... . . + .Ppo . .pPO3Op.. . O:. . . . + .3Pp . oP3'. 'P33. . 4 .. . . . .. . . . + .~OP 3PO. .Op3 : . .. _____ _____ _____ + .P3O . oP3oP3O3P' . . . . / /./ /./ / + O3:. O3p~ . .:. . ./____/./____/ /____/ + 'P . 3p3. oP3~. ..P:. . . .. . . .. . . . + . ': . Po' .Opo'. .3O. . o[ by Pype Club ]]]==- - - . . + . '_ .. . . _OP3.. . .https://openpype.io.. . + ~P3.OPPPO3OP~ . .. . + . ' '. . .. . . . .. . "@ diff --git a/tools/create_env.ps1 b/tools/create_env.ps1 index 5600ae71c7..7ada92c1e8 100644 --- a/tools/create_env.ps1 +++ b/tools/create_env.ps1 @@ -11,6 +11,11 @@ PS> .\create_env.ps1 +.EXAMPLE + +Print verbose information from Poetry: +PS> .\create_env.ps1 --verbose + #> $arguments=$ARGS @@ -98,17 +103,17 @@ $art = @" . . .. . .. _oOOP3OPP3Op_. . - .PPpo~· ·· ~2p. ·· ···· · · - ·Ppo · .pPO3Op.· · O:· · · · - .3Pp · oP3'· 'P33· · 4 ·· · · · ·· · · · - ·~OP 3PO· .Op3 : · ·· _____ _____ _____ - ·P3O · oP3oP3O3P' · · · · / /·/ /·/ / - O3:· O3p~ · ·:· · ·/____/·/____/ /____/ - 'P · 3p3· oP3~· ·.P:· · · ·· · · ·· · · · - · ': · Po' ·Opo'· .3O· . o[ by Pype Club ]]]==- - - · · - · '_ .. · . _OP3·· · ·https://openpype.io·· · - ~P3·OPPPO3OP~ · ·· · - · ' '· · ·· · · · ·· · + .PPpo~. .. ~2p. .. .... . . + .Ppo . .pPO3Op.. . O:. . . . + .3Pp . oP3'. 'P33. . 4 .. . . . .. . . . + .~OP 3PO. .Op3 : . .. _____ _____ _____ + .P3O . oP3oP3O3P' . . . . / /./ /./ / + O3:. O3p~ . .:. . ./____/./____/ /____/ + 'P . 3p3. oP3~. ..P:. . . .. . . .. . . . + . ': . Po' .Opo'. .3O. . o[ by Pype Club ]]]==- - - . . + . '_ .. . . _OP3.. . .https://openpype.io.. . + ~P3.OPPPO3OP~ . .. . + . ' '. . .. . . . .. . "@ diff --git a/tools/create_zip.ps1 b/tools/create_zip.ps1 index 2fef4d216b..a34af89159 100644 --- a/tools/create_zip.ps1 +++ b/tools/create_zip.ps1 @@ -4,14 +4,19 @@ .DESCRIPTION This script will detect Python installation and run OpenPype to create - zip. It needs mongodb running. I will create zip from current source code - version and copy it top `%LOCALAPPDATA%/pypeclub/pype` if `--path` or `-p` + zip. It will create zip from current source code + version and copy it top `%LOCALAPPDATA%/pypeclub/openpype` if `--path` or `-p` argument is not used. .EXAMPLE PS> .\create_zip.ps1 +.EXAMPLE + +To put generated zip to C:\OpenPype directory: +PS> .\create_zip.ps1 --path C:\OpenPype + #> function Exit-WithCode($exitcode) { @@ -52,17 +57,17 @@ $art = @" . . .. . .. _oOOP3OPP3Op_. . - .PPpo~· ·· ~2p. ·· ···· · · - ·Ppo · .pPO3Op.· · O:· · · · - .3Pp · oP3'· 'P33· · 4 ·· · · · ·· · · · - ·~OP 3PO· .Op3 : · ·· _____ _____ _____ - ·P3O · oP3oP3O3P' · · · · / /·/ /·/ / - O3:· O3p~ · ·:· · ·/____/·/____/ /____/ - 'P · 3p3· oP3~· ·.P:· · · ·· · · ·· · · · - · ': · Po' ·Opo'· .3O· . o[ by Pype Club ]]]==- - - · · - · '_ .. · . _OP3·· · ·https://openpype.io·· · - ~P3·OPPPO3OP~ · ·· · - · ' '· · ·· · · · ·· · + .PPpo~. .. ~2p. .. .... . . + .Ppo . .pPO3Op.. . O:. . . . + .3Pp . oP3'. 'P33. . 4 .. . . . .. . . . + .~OP 3PO. .Op3 : . .. _____ _____ _____ + .P3O . oP3oP3O3P' . . . . / /./ /./ / + O3:. O3p~ . .:. . ./____/./____/ /____/ + 'P . 3p3. oP3~. ..P:. . . .. . . .. . . . + . ': . Po' .Opo'. .3O. . o[ by Pype Club ]]]==- - - . . + . '_ .. . . _OP3.. . .https://openpype.io.. . + ~P3.OPPPO3OP~ . .. . + . ' '. . .. . . . .. . "@ diff --git a/tools/make_docs.ps1 b/tools/make_docs.ps1 index 01edaf9c58..2f9350eff0 100644 --- a/tools/make_docs.ps1 +++ b/tools/make_docs.ps1 @@ -32,17 +32,17 @@ $art = @" . . .. . .. _oOOP3OPP3Op_. . - .PPpo~· ·· ~2p. ·· ···· · · - ·Ppo · .pPO3Op.· · O:· · · · - .3Pp · oP3'· 'P33· · 4 ·· · · · ·· · · · - ·~OP 3PO· .Op3 : · ·· _____ _____ _____ - ·P3O · oP3oP3O3P' · · · · / /·/ /·/ / - O3:· O3p~ · ·:· · ·/____/·/____/ /____/ - 'P · 3p3· oP3~· ·.P:· · · ·· · · ·· · · · - · ': · Po' ·Opo'· .3O· . o[ by Pype Club ]]]==- - - · · - · '_ .. · . _OP3·· · ·https://openpype.io·· · - ~P3·OPPPO3OP~ · ·· · - · ' '· · ·· · · · ·· · + .PPpo~. .. ~2p. .. .... . . + .Ppo . .pPO3Op.. . O:. . . . + .3Pp . oP3'. 'P33. . 4 .. . . . .. . . . + .~OP 3PO. .Op3 : . .. _____ _____ _____ + .P3O . oP3oP3O3P' . . . . / /./ /./ / + O3:. O3p~ . .:. . ./____/./____/ /____/ + 'P . 3p3. oP3~. ..P:. . . .. . . .. . . . + . ': . Po' .Opo'. .3O. . o[ by Pype Club ]]]==- - - . . + . '_ .. . . _OP3.. . .https://openpype.io.. . + ~P3.OPPPO3OP~ . .. . + . ' '. . .. . . . .. . "@ diff --git a/tools/run_documentation.ps1 b/tools/run_documentation.ps1 index 1be3709642..a3e3a9b8dd 100644 --- a/tools/run_documentation.ps1 +++ b/tools/run_documentation.ps1 @@ -1,23 +1,38 @@ <# .SYNOPSIS - Helper script to run mongodb. + Helper script to run Docusaurus for easy editing of OpenPype documentation. .DESCRIPTION - This script will detect mongodb, add it to the PATH and launch it on specified port and db location. + This script is using `yarn` package manager to run Docusaurus. If you don't + have `yarn`, install Node.js (https://nodejs.org/) and then run: + + npm install -g yarn + + It take some time to run this script. If all is successful you should see + new browser window with OpenPype documentation. All changes is markdown files + under .\website should be immediately seen in browser. .EXAMPLE -PS> .\run_mongo.ps1 +PS> .\run_documentation.ps1 #> $art = @" -▒█▀▀▀█ █▀▀█ █▀▀ █▀▀▄ ▒█▀▀█ █░░█ █▀▀█ █▀▀ ▀█▀ ▀█▀ ▀█▀ -▒█░░▒█ █░░█ █▀▀ █░░█ ▒█▄▄█ █▄▄█ █░░█ █▀▀ ▒█░ ▒█░ ▒█░ -▒█▄▄▄█ █▀▀▀ ▀▀▀ ▀░░▀ ▒█░░░ ▄▄▄█ █▀▀▀ ▀▀▀ ▄█▄ ▄█▄ ▄█▄ - .---= [ by Pype Club ] =---. - https://openpype.io + . . .. . .. + _oOOP3OPP3Op_. . + .PPpo~. .. ~2p. .. .... . . + .Ppo . .pPO3Op.. . O:. . . . + .3Pp . oP3'. 'P33. . 4 .. . . . .. . . . + .~OP 3PO. .Op3 : . .. _____ _____ _____ + .P3O . oP3oP3O3P' . . . . / /./ /./ / + O3:. O3p~ . .:. . ./____/./____/ /____/ + 'P . 3p3. oP3~. ..P:. . . .. . . .. . . . + . ': . Po' .Opo'. .3O. . o[ by Pype Club ]]]==- - - . . + . '_ .. . . _OP3.. . .https://openpype.io.. . + ~P3.OPPPO3OP~ . .. . + . ' '. . .. . . . .. . "@ @@ -26,7 +41,6 @@ Write-Host $art -ForegroundColor DarkGreen $script_dir = Split-Path -Path $MyInvocation.MyCommand.Definition -Parent $openpype_root = (Get-Item $script_dir).parent.FullName -cd $openpype_root/website - -yarn run start +Set-Location $openpype_root/website +& yarn run start diff --git a/tools/run_mongo.ps1 b/tools/run_mongo.ps1 index 05fc497d34..6719e520fe 100644 --- a/tools/run_mongo.ps1 +++ b/tools/run_mongo.ps1 @@ -15,17 +15,17 @@ $art = @" . . .. . .. _oOOP3OPP3Op_. . - .PPpo~· ·· ~2p. ·· ···· · · - ·Ppo · .pPO3Op.· · O:· · · · - .3Pp · oP3'· 'P33· · 4 ·· · · · ·· · · · - ·~OP 3PO· .Op3 : · ·· _____ _____ _____ - ·P3O · oP3oP3O3P' · · · · / /·/ /·/ / - O3:· O3p~ · ·:· · ·/____/·/____/ /____/ - 'P · 3p3· oP3~· ·.P:· · · ·· · · ·· · · · - · ': · Po' ·Opo'· .3O· . o[ by Pype Club ]]]==- - - · · - · '_ .. · . _OP3·· · ·https://openpype.io·· · - ~P3·OPPPO3OP~ · ·· · - · ' '· · ·· · · · ·· · + .PPpo~. .. ~2p. .. .... . . + .Ppo . .pPO3Op.. . O:. . . . + .3Pp . oP3'. 'P33. . 4 .. . . . .. . . . + .~OP 3PO. .Op3 : . .. _____ _____ _____ + .P3O . oP3oP3O3P' . . . . / /./ /./ / + O3:. O3p~ . .:. . ./____/./____/ /____/ + 'P . 3p3. oP3~. ..P:. . . .. . . .. . . . + . ': . Po' .Opo'. .3O. . o[ by Pype Club ]]]==- - - . . + . '_ .. . . _OP3.. . .https://openpype.io.. . + ~P3.OPPPO3OP~ . .. . + . ' '. . .. . . . .. . "@ diff --git a/tools/run_project_manager.ps1 b/tools/run_project_manager.ps1 index 78dce19df1..67c2d2eb5e 100644 --- a/tools/run_project_manager.ps1 +++ b/tools/run_project_manager.ps1 @@ -1,13 +1,13 @@ <# .SYNOPSIS - Helper script OpenPype Tray. + Helper script to run Project Manager. .DESCRIPTION .EXAMPLE -PS> .\run_tray.ps1 +PS> .\run_project_manager.ps1 #> $current_dir = Get-Location diff --git a/tools/run_tests.ps1 b/tools/run_tests.ps1 index 7b9a5c841d..30e1f29e59 100644 --- a/tools/run_tests.ps1 +++ b/tools/run_tests.ps1 @@ -34,17 +34,17 @@ $art = @" . . .. . .. _oOOP3OPP3Op_. . - .PPpo~· ·· ~2p. ·· ···· · · - ·Ppo · .pPO3Op.· · O:· · · · - .3Pp · oP3'· 'P33· · 4 ·· · · · ·· · · · - ·~OP 3PO· .Op3 : · ·· _____ _____ _____ - ·P3O · oP3oP3O3P' · · · · / /·/ /·/ / - O3:· O3p~ · ·:· · ·/____/·/____/ /____/ - 'P · 3p3· oP3~· ·.P:· · · ·· · · ·· · · · - · ': · Po' ·Opo'· .3O· . o[ by Pype Club ]]]==- - - · · - · '_ .. · . _OP3·· · ·https://openpype.io·· · - ~P3·OPPPO3OP~ · ·· · - · ' '· · ·· · · · ·· · + .PPpo~. .. ~2p. .. .... . . + .Ppo . .pPO3Op.. . O:. . . . + .3Pp . oP3'. 'P33. . 4 .. . . . .. . . . + .~OP 3PO. .Op3 : . .. _____ _____ _____ + .P3O . oP3oP3O3P' . . . . / /./ /./ / + O3:. O3p~ . .:. . ./____/./____/ /____/ + 'P . 3p3. oP3~. ..P:. . . .. . . .. . . . + . ': . Po' .Opo'. .3O. . o[ by Pype Club ]]]==- - - . . + . '_ .. . . _OP3.. . .https://openpype.io.. . + ~P3.OPPPO3OP~ . .. . + . ' '. . .. . . . .. . "@