Skip to content

Commit

Permalink
Add an update command to the embedded Plano instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
ssorj committed May 24, 2024
1 parent d28ba95 commit a642d92
Showing 1 changed file with 28 additions and 7 deletions.
35 changes: 28 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,22 +101,43 @@ pip install pyyaml

Change directory to the root of your project:

cd <project-dir>/
~~~ console
cd <project-dir>/
~~~

Add the Plano code as a subdirectory:

mkdir -p external
curl -sfL https://github.com/ssorj/plano/archive/main.tar.gz | tar -C external -xz
mv external/plano-main external/plano
~~~ shell
mkdir -p external
curl -sfL https://github.com/ssorj/plano/archive/main.tar.gz | tar -C external -xz
mv external/plano-main external/plano
~~~

Symlink the Plano library into your `python` directory:

mkdir -p python
ln -s ../external/plano/src/plano python/plano
~~~ shell
mkdir -p python
ln -s ../external/plano/src/plano python/plano
~~~

Copy the `plano` command into the root of your project:

cp external/plano/bin/plano plano
~~~ shell
cp external/plano/bin/plano plano
~~~

Optionally, add a command to `.plano.py` to update the embedded Plano:

~~~ python
from plano.github import *

@command
def update_plano():
"""
Update the embedded Plano repo
"""
update_external_from_github("external/plano", "ssorj", "plano")
~~~

## Extending an existing command

Expand Down

0 comments on commit a642d92

Please sign in to comment.