diff --git a/Makefile b/Makefile index 3cc6078..03e5871 100644 --- a/Makefile +++ b/Makefile @@ -17,4 +17,5 @@ help: # Catch-all target: route all unknown targets to Sphinx using the new # "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). %: Makefile + @$(MAKE) -C source/_images `[ "$@" = "clean" ] && echo clean || echo all` @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) diff --git a/source/_images/Makefile b/source/_images/Makefile new file mode 100755 index 0000000..14592a0 --- /dev/null +++ b/source/_images/Makefile @@ -0,0 +1,14 @@ + +SRC_DIR = . +OUT_DIR = ../images + +SVG := $(wildcard $(SRC_DIR)/*.svg) +PNG := $(patsubst $(SRC_DIR)/%.svg,$(OUT_DIR)/%.png,$(SVG)) + +all: $(PNG) + +clean: + rm -f $(PNG) + +$(OUT_DIR)/%.png: $(SRC_DIR)/%.svg + inkscape --file=$< --export-area-drawing --export-png=$@ diff --git a/source/images/connecting.png b/source/_images/connecting.png similarity index 100% rename from source/images/connecting.png rename to source/_images/connecting.png diff --git a/source/images/connecting.svg b/source/_images/connecting.svg similarity index 100% rename from source/images/connecting.svg rename to source/_images/connecting.svg diff --git a/source/images/connectingsub1.png b/source/_images/connectingsub1.png similarity index 100% rename from source/images/connectingsub1.png rename to source/_images/connectingsub1.png diff --git a/source/images/connectingsub2.png b/source/_images/connectingsub2.png similarity index 100% rename from source/images/connectingsub2.png rename to source/_images/connectingsub2.png diff --git a/source/images/newproject.png b/source/_images/newproject.png similarity index 100% rename from source/images/newproject.png rename to source/_images/newproject.png diff --git a/source/images/newproject.svg b/source/_images/newproject.svg similarity index 100% rename from source/images/newproject.svg rename to source/_images/newproject.svg diff --git a/source/images/overview.jpg b/source/_images/overview.jpg similarity index 100% rename from source/images/overview.jpg rename to source/_images/overview.jpg diff --git a/source/images/overview.svg b/source/_images/overview.svg similarity index 100% rename from source/images/overview.svg rename to source/_images/overview.svg diff --git a/source/images/projectoverview.png b/source/_images/projectoverview.png similarity index 100% rename from source/images/projectoverview.png rename to source/_images/projectoverview.png diff --git a/source/images/projectoverview.svg b/source/_images/projectoverview.svg similarity index 100% rename from source/images/projectoverview.svg rename to source/_images/projectoverview.svg diff --git a/source/images/running.png b/source/_images/running.png similarity index 100% rename from source/images/running.png rename to source/_images/running.png diff --git a/source/images/running.svg b/source/_images/running.svg similarity index 100% rename from source/images/running.svg rename to source/_images/running.svg diff --git a/source/images/vsix.png b/source/_images/vsix.png similarity index 100% rename from source/images/vsix.png rename to source/_images/vsix.png diff --git a/source/images/vsix.svg b/source/_images/vsix.svg similarity index 100% rename from source/images/vsix.svg rename to source/_images/vsix.svg diff --git a/source/images/.gitignore b/source/images/.gitignore new file mode 100644 index 0000000..8ab8387 --- /dev/null +++ b/source/images/.gitignore @@ -0,0 +1,3 @@ +*.png +!pybricks-logo-large.png +!pybricks-logo-small.png diff --git a/source/images/render.sh b/source/images/render.sh deleted file mode 100755 index c3c3812..0000000 --- a/source/images/render.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/usr/bin/env bash - -rm -rf build -mkdir build - -for filenamedotext in *.svg; do - filename=$(echo "$filenamedotext" | cut -f 1 -d '.') - inkscape --file=$filename.svg --export-area-drawing --export-png=build/$filename.png -done diff --git a/source/startinstall.rst b/source/startinstall.rst index 8345f2b..fa68712 100644 --- a/source/startinstall.rst +++ b/source/startinstall.rst @@ -4,7 +4,7 @@ Installation This page shows how you prepare your computer and the EV3 brick for writing and running Python programs. The final configuration is shown in the figure below. -.. figure:: images/build/overview.png +.. figure:: images/overview.png .. Caption @@ -34,7 +34,7 @@ You will be writing your Python programs using Visual Studio Code. You can downl 3. Download the `EV3 Python extension <.>`_. Follow the steps in the diagram below to install it. 4. Close Visual Studio Code and open it again to activate the extensions. -.. image:: images/build/vsix.png +.. image:: images/vsix.png Preparing the SD Card ----------------------------------------------------------- @@ -47,7 +47,7 @@ You will now follow a series of steps to download and install the EV3 Python fir 3. Insert the micro SD card into your computer or card reader. 4. Launch the etcher program and follow the steps on your screen to install the firmware file you have just downloaded. Do not remove the card until the installation process is complete. 5. Turn the EV3 brick off if it is currently on. -6. Put the micro SD card in the SD card slot of the EV3 brick. +6. Put the micro SD card in the SD card slot of the EV3 brick. Using the EV3 brick diff --git a/source/startrun.rst b/source/startrun.rst index fea10cc..1d908c3 100644 --- a/source/startrun.rst +++ b/source/startrun.rst @@ -4,14 +4,14 @@ Creating and running programs Starting a new project ----------------------------------------------------------- -.. image:: images/build/newproject.png +.. image:: images/newproject.png Example text Understanding projects folder and files ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -.. image:: images/build/projectoverview.png +.. image:: images/projectoverview.png Example text @@ -25,14 +25,14 @@ Running a program Connecting the EV3 brick and the computer ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -.. image:: images/build/connecting.png +.. image:: images/connecting.png Example text Downloading and running a program ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -.. image:: images/build/running.png +.. image:: images/running.png Example text