mightyscape-1.2/README.md

215 lines
14 KiB
Markdown
Raw Normal View History

# MightyScape for Inkscape 1.2
2023-02-16 15:14:19 +01:00
<img title="" src="./extensions/fablabchemnitz/000_Mightyscape.svg" alt="" data-align="left">
In short: A maintained extension collection for Inkscape 1.2 (and newer), working on Windows and Linux. There are **239 extension folders** with **459 .inx files** inside. We also take part at https://inkscape.org/gallery/=extension/ (with single extension uploads).
# About MightyScape
Looking to get more productive we started using some more special Inkscape extensions. We love Inkscape. And we love things like 3d printing, laser cutting, vinyl cutting, pen plotting, maths, physics, geometry, patterns, 2D drawings, 3D CAD , embroidery and more stuff. All this you can do with Inkscape! We recognized that there is no good source to pull extensions in a quick and clean way. Each developer puts his own code on his hidden/unknown repository and often without enough documentation or visible results for common understanding. Many plugins are completely unknown that way, and a lot of extensions are forked x times or are unmaintained. So many of them do not work with recent Inkscape or were never tested with newer versions so far.
# What and why?
This is a one-to-bundle-them-all collection of hundreds of additional functions to Inkscape (extensions) for the new Python 3 based version 1.X including documentation, made for makers and artists. All plugins where sorted into custom categories (to avoid overloading the standard extension menu of Inkscape). You can find most of them in sub menu "FabLab Chemnitz". We renamed and cleaned a lot of *.inx files and *.py files. We applied some function renamings, id changes (for preferences.xml clean-keeping), spelling fixes, formattings and parameter corrections.
It took years to search and find all them on the web (so much different possible sources where to find!), to read, to comment (report issues), to fix problems, to test, to document and to provide them online. Many extensions were nearly lost in translation.
At least this repo will help to bring alife some good things and will show hidden gold. It meshes things together in a fresh and bundled way - with ease of use and minimum installation stress. A lot of code is not at the optimum. A mass of bugs has to be fixed and different tools should be improved in usage generally. This package will show errors more quickly. So hopefully a lot of new code fixes is result from this package. Maybe some people help to make all the stuff compatible with Inkscape 1.2 and newer.
# Licensing and credits
2023-02-16 15:14:19 +01:00
* This is not a repository to steal the work of others. The credits go to each developer, maintainer, commiter, issue reporter and so on. Please have a look at the meta.json in each directory to get information about licenses and authors for each extension.
* All plugins are open source licensed and are GNU GPL compatible. See https://www.gnu.org/licenses/license-list.html#GPLCompatibleLicenses for more details.
* All plugins were taken from each git repo's master branch (if git/svn available). There might exist some development branches, fork branches or issue comments which might resolve some issues or enhance functionality of provided plugins. To check for recent github forks use https://techgaun.github.io
* A mass of plugins were fixed by ourselves in countless hours
* Credits for creation of the MightyScape project: Mario Voigt / FabLab Chemnitz
# Used software for development
2023-02-16 15:14:19 +01:00
* Gitea and Github for hosting this
* LiClipse for code and git committing
* regular Python installation with virtualenv (both Linux and Windows)
2023-05-06 23:10:25 +02:00
# Tested environment
2023-02-16 15:14:19 +01:00
* tested with Inkscape
* Fedora 40: Inkscape 1.3.2 (091e20ef0f, 2024-04-26)
* Kubuntu 40: Inkscape 1.3.2 (091e20ef0f, 2024-04-26)
* Windows 10 (@KVM/QEMU): Inkscape 1.3.2 (091e20ef0f, 2024-04-26)
* tested using Python 3.12 64 Bit
2023-05-06 22:46:27 +02:00
# Structure
2023-05-06 23:10:25 +02:00
The structure of this repo is intended the be easy. MightyScape does not work with any releases or feature branches. Just copy the complete MightyScape folder (or the particular folders you want) to your Inkscape's extension directory. You will find redundancies in this repo like node.exe (NodeJS). We did it this way to give easy possibilty to only pick the extensions you want.
2023-05-06 22:46:27 +02:00
# Installation
Please read this first before opening issues! This documentation does not maintain any progressive information about installing or handling Inkscape itself.
## Unsupported Inkscape versions
2023-05-06 23:10:25 +02:00
- Linux
- MightyScape **does not support the snap version** and also **no** **[AppImage]([https://inkscape.org/release/inkscape-dev/gnulinux/appimage/dl](https://inkscape.org/release/inkscape-dev/gnulinux/appimage/dl/))** version of Inkscape. The snap edition comes with restrictions, letting a lot of extensions fail to work. The reason is missing access to external python interpreters. Libraries like `openmesh` or `pyclipper` cannot be used this way. The AppImage version will fail for a lot extension too, because subprocesses from the AppImage have no acccess to `/tmp` directory. You can still install MightyScape with snap or AppImage version but beware to get different errors. Feel free to contribute solutions to fix these issues.
- Windows
- Windows App Store (this was not tested yet)
2023-05-06 22:46:27 +02:00
2023-05-06 23:10:25 +02:00
## Supported Inkscape versions
2023-05-06 22:46:27 +02:00
- Windows
2023-05-06 23:10:25 +02:00
- portable
2023-05-06 22:46:27 +02:00
- regular installation with MSI Setup
- Linux
- regular installation from package manager like dnf/yum or apt
`sudo apt install inkscape #Ubuntu/Kubuntu (you might need to add PPA first to install the latest version. Do this by sudo add-apt-repository ppa:inkscape.dev/stable)`
`sudo dnf install inkscape #Fedora/CentOS`
2023-05-06 22:46:27 +02:00
- MacOS
- this was never tested. We are sorry!
## Installation dirs (overview)
2023-05-06 22:46:27 +02:00
There are two places where Inkscape extensions can be located by default, either install (global) directory or user directory. We usually put the extensions in the user's data directories directory, because if we would put it to the installation folder of Inkscape, we would risk deletion by upgrading. If we put them to the user directory we do not lose them.
2023-05-06 22:46:27 +02:00
| OS | user directory | global directory |
| ---------------------- | -------------------------------- | --------------------------------------- |
| Linux (Ubuntu, Fedora) | `~/.config/inkscape/extensions/` | `/usr/share/inkscape/extensions/` |
| Windows | `%AppData%\inkscape\extensions\` | `C:\Program Files\inkscape\extensions\` |
2023-05-06 22:46:27 +02:00
Please also refer to the [official documentation](https://inkscape-manuals.readthedocs.io/en/latest/extensions.html#installing-extensions).
2023-05-06 22:46:27 +02:00
## Installation of prerequisites - additional python modules
The following extra libraries are required for some of the extensions within the MightyScape package. Those are listed in our [requirements.txt](https://gitea.fablabchemnitz.de/FabLab_Chemnitz/mightyscape-1.2/requirements.txt) file. We are installing them together with MightyScape in the next section.
2023-05-06 23:10:25 +02:00
**Note:** if `openmesh` fails to install, please see [Paperfold](https://stadtfabrikanten.org/display/IFM/Paperfold) for more details about installing it.
2023-05-06 22:46:27 +02:00
## Installation of MightyScape - way 1: with git dependencies (preferred way)
2023-05-06 22:46:27 +02:00
**On Fedora/CentOS Linux this might look like:**
2023-05-06 23:12:29 +02:00
```
sudo dnf install python3-venv python3-devel
cd ~/.config/inkscape/extensions/
git clone https://gitea.fablabchemnitz.de/FabLab_Chemnitz/mightyscape-1.2.git
python3 -m venv ~/.config/inkscape/extensions/mightyscape-1.2/venv
~/.config/inkscape/extensions/mightyscape-1.2/venv/bin/pip install --upgrade --quiet --no-cache-dir -r ~/.config/inkscape/extensions/mightyscape-1.2/requirements.txt
#use this in case the previous command failed (skip errors)
cat ~/.config/inkscape/extensions/mightyscape-1.2/requirements.txt | sed '/^#/d' | xargs -n 1 ~/.config/inkscape/extensions/mightyscape-1.2/venv/bin/pip install --upgrade --quiet --no-cache-dir
```
2023-05-06 22:46:27 +02:00
**On Ubuntu/Kubuntu Linux this might look like:**
2023-05-06 22:46:27 +02:00
```
sudo apt install python3-venv python3-full
2023-05-06 22:46:27 +02:00
git clone https://gitea.fablabchemnitz.de/FabLab_Chemnitz/mightyscape-1.2.git
python3 -m venv ~/.config/inkscape/extensions/mightyscape-1.2/venv
~/.config/inkscape/extensions/mightyscape-1.2/venv/bin/pip install --upgrade --quiet --no-cache-dir -r ~/.config/inkscape/extensions/mightyscape-1.2/requirements.txt
#use this in case the previous command failed (skip errors)
cat ~/.config/inkscape/extensions/mightyscape-1.2/requirements.txt | sed '/^#/d' | xargs -n 1 ~/.config/inkscape/extensions/mightyscape-1.2/venv/bin/pip install --upgrade --quiet --no-cache-dir
2023-05-06 22:46:27 +02:00
```
**On Windows this might look like:**
```
cd %AppData%\inkscape\extensions\
git clone https://gitea.fablabchemnitz.de/FabLab_Chemnitz/mightyscape-1.2.git
cd %AppData%\..\Local\Programs\Python\Python312\Scripts
2023-05-06 22:46:27 +02:00
python -m pip install --upgrade pip #upgrade pip first
2023-05-06 23:14:56 +02:00
pip install --upgrade --quiet --no-cache-dir -r %AppData%\inkscape\extensions\mightyscape-1.2\requirements.txt
2023-05-06 22:46:27 +02:00
```
2023-05-06 23:12:29 +02:00
**Note about git handling**: You can also download the whole git project as .zip or .tar.gz bundled archive and then place it to your target directory. This way you can ignore installing git on your system yet. You can convert that directory to the git-way using the [upgrade extension](https://gitea.fablabchemnitz.de/FabLab_Chemnitz/mightyscape-1.2/src/branch/master/extensions/fablabchemnitz/about_upgrade_mightyscape)) later on.
2023-05-06 22:46:27 +02:00
<img title="" src="./docs/images/zip-download.png" alt="" data-align="left">
## Installation of MightyScape - way 2: with zip archives (mirrors)
If you only want to download single parts of MightyScape, use one of the following mirrors:
2023-02-16 15:14:19 +01:00
* https://gitea.fablabchemnitz.de/FabLab_Chemnitz/mightyscape-1.2-zipmirror
* https://github.com/eridur-de/mightyscape-1.2-zipmirror
2023-05-06 23:12:29 +02:00
You can put the extracted files into your local or global Inkscape extension directory.
2023-05-06 22:46:27 +02:00
## Adjusting the python interpreter of Inkscape (required)
MightyScape relies on the Python interpreter which is used by the OS. As we need to install some external dependencies (python modules, partially with C bindings), we cannot rely on the bundled Python version, which comes with Inkscape. For this reason we need to adjust the main configuration of inkscape to apply this change by adding a custom `python-interpreter` command in Inkscape default configuration.
**Note:** Using a custom Python environment on Windows wil make the official Inkscape Extensions Manager impossible to run. The reason is the library `pygobject`.
**On Linux this might look like:**
Note: we are using virtual environment (venv) to avoid messing with system libraries
```
vim ~/.config/inkscape/preferences.xml
```
```
<group
id="extensions"
python-interpreter="~/.config/inkscape/extensions/mightyscape-1.2/venv/bin/pip"
```
**On Windows this might look like:**
```
notepad %appdata%\inkscape\preferences.xml
```
```
<group
id="extensions"
python-interpreter="C:\Users\youruser\AppData\Local\Programs\Python\Python310\pythonw.exe"
```
**Notes for Windows users:**
* If you get a nasty popup window each time you are executing an extension, please double check if you really use `pythonw.exe`. Do not use `python.exe`.
* You can download and install Python for Windows from https://www.python.org/downloads/windows
* please review for correct enviroment variable adjustments. `python.exe` has to be in `%PATH%`
2023-05-06 23:10:25 +02:00
## Upgrading MightyScape
2023-05-06 22:46:27 +02:00
There are two ways to upgrade MightyScape. Choose from:
1. if you installed MightyScape using git clone, just go to the git directory and run `git pull` or use the extension "Upgrade MightyScape", which can be found in Extensions → FabLab Chemnitz → Upgrade MightyScape
2023-05-06 22:46:27 +02:00
- There is some special updater extension which allows to update the complete MightyScape package once it was properly pulled by git. You need to install `GitPython` library to use the updater:
<img title="" src="./docs/images/upgrade-extension.png" alt="" data-align="left">
2023-05-06 22:46:27 +02:00
2. if you previously downloaded a bulk zip file from github or gitea, just replace the content of the containing folder with the new files
## Upgrading Python modules
Sometimes it can help to upgrade python modules. This section shows some useful shell lines (**but be warned to use them on your own risk**):
```
#Linux:
~/.config/inkscape/extensions/mightyscape-1.2/venv/bin/pip list --outdated --format=freeze | grep -v '^\-e' | cut -d = -f 1 | xargs -n1 ~/.config/inkscape/extensions/mightyscape-1.2/venv/bin/pip install -U
2023-05-06 22:46:27 +02:00
#Windows:
for /F "delims= " %i in ('pip list --outdated') do ~/.config/inkscape/extensions/mightyscape-1.2/venv/bin/pip install -U %i
2023-05-06 22:46:27 +02:00
```
# Issues, questions, documentation, examples
This repo has two remotes:
2023-02-16 15:14:19 +01:00
* https://gitea.fablabchemnitz.de/FabLab_Chemnitz/mightyscape-1.2 (root repo origin from our organization)
* https://github.com/eridur-de/mightyscape-1.2 (repo for **public collaboration**)
You can create your issues and questions **[here](https://github.com/eridur-de/mightyscape-1.2/issues)**
You find a lot of documentation at the sub pages of https://y.stadtfabrikanten.org/mightyscape-overview. Please have a look there first (make use of the search function).
# Support us by a small donation
2023-02-16 15:14:19 +01:00
<img title="" src="./extensions/fablabchemnitz/000_about_fablabchemnitz.svg" alt="" data-align="left">
We are the Stadtfabrikanten, running the FabLab Chemnitz since 2016. A FabLab is an open workshop that gives people access to machines and digital tools like 3D printers, laser cutters and CNC milling machines.
You like our work and want to support us? You can donate to our non-profit organization by different ways:
[https://y.stadtfabrikanten.org/donate](https://y.stadtfabrikanten.org/donate)
Each penny helps us to keep this project alive.
**Thanks for using our extension and helping us!**