HowTo's
- About Inkscape extensions in general
- Clone and build Inkscape executable for noobs
- Contribute documentation to Inkscape (reStructuredText)
- Lint and validate *.inx files
- SVG Attribute reference
- Where to find more Inkscape extensions?
- Use Inkscape with Flatpak
- Install Inkscape from trunk
About Inkscape extensions in general
Extension calls are possible in different ways. You may find some description at http://wiki.inkscape.org/wiki/index.php/Extension_requirements. Inkscape can run extension from a lot of different interpreters and executors like Python, Ruby, Perl, binary executables, bash scripts and so on.
The "..." dots indicator in Inkscape user interface (menus)
Please note that extensions with "..." indicate the extension will have some GUI / menu to use. Extensions with out will perform action directly on current selection or the whole document!
Clone and build Inkscape executable for noobs
Based on the official building sources of Inkscape on how to compile, this is some extended note on how to clone a specific commit of another branch, for instance when trying to test a developer's feature implementation, which is not yet merged into master branch.
Clone the repository
cd ~/
git clone https://gitlab.com/inkscape/inkscape.git
Install prequisites
https://gitlab.com/inkscape/inkscape-ci-docker/-/raw/master/install_dependencies.sh?inline=false
Get the desired commit / branch
cd ~/inkscape/
git remote add pbs https://gitlab.com/pbs3141/inkscape.git
git fetch pbs
#look for the branch if its available npw
git branch -r | grep "split-nonintersecting"
git checkout pbs/split-nonintersecting
git status
git log
git pull --recurse-submodules && git submodule update
Build
mkdir build
cd build
cmake -S .. -B . -DCMAKE_INSTALL_PREFIX=${PWD}/install_dir -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache
make -j8
make install
Run
~/inkscape/build/bin/inkscape
Contribute documentation to Inkscape (reStructuredText)
This page is also available on https://wiki.inkscape.org/wiki/Contribute_to_Documentation_with_reStructuredText
To contribute to recent Inkscape documentations, we have to write our docs in reStructuredText file format (*.rst
). It's similar to Markdown, but still different.
The Inkscape documentation is built up on Sphinx, which is some kind of special engine. To easily contribut without being a professional developer, we can use VSCodium and some plugin to edit those *.rst
files and preview (render) them.
Install VS Code or VSCodium
With VSCodium we can edit *.rst
files with ease. There's native syntax highlighting. But we cannot render the final result by default (needs a separate extension).
Downloads:
- https://code.visualstudio.com
- https://vscodium.com (same like Visual Studio Code, but fully Open Source!)
Install Esbonia Extension
This extension is required to render *.rst
files. Rendering helps to validate, that the code we wrote is valid before we commit and push to Inkscape repositories. It can show a live HTML preview of the documentation, so the preview contents change whenever the document is updated. Syncronised scrolling between the source and preview is also supported.
Download/Install: https://marketplace.visualstudio.com/items?itemName=swyddfa.esbonio
Install additional requirements
Ubuntu:
We install Sphinx globally to system, that's why we use the python3-*
packages:
sudo apt install python3-sphinx python3-doc8
After this, we have following commands available for CLI also:
sphinx-apidoc
sphinx-autogen
sphinx-build
sphinx-quickstart
See also https://www.sphinx-doc.org/en/master/usage/installation.html
Clone the documentation
cd ~/
git clone https://gitlab.com/inkscape/extensions.git
Open the folder within VSCodium and begin contribute
Troubleshooting
My opened *.rst file is not rendered
Opening a single file without an active workspace is not currently supported and will lead to errors, which might not be communicated to the user visually. Open the folder containing your documentation project in VSCode instead!
Lint and validate *.inx files
For validation purposes of all inx files we can use the following step:
sudo apt-get update && apt-get install libxml2-utils # install require stuff
cd ~/.config/inkscape/extensions/mightyscape-1.2/extensions/fablabchemnitz
./000_validate.sh # does not support linting for deeper folders (no recurse)
# or lint a single file in an extensions' dir:
cd <yourExtension>
xmllint --noout --relaxng ../inkscape.extension.rng *.inx
If there is an error message instead of the export/import dialog, check the file or console log from Inkscape:
#Windows
%AppData%\Roaming\inkscape\extension-errors.log
#Linux
~/.config(inkscape/extension-errors.log
Counting INX files and folders:
cd ~/.config/inkscape/extensions/mightyscape-1.2/extensions/fablabchemnitz
find ./ -type f -name "*.inx" | wc -l
ls -d */ | wc -l
This information was also contributed to https://inkscape.gitlab.io/extensions/documentation/authors/inx-overview.html#relax-ng-xml-schema-and-inx-file-validation
SVG Attribute reference
A very good SVG rerefence to read on → https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute
Where to find more Inkscape extensions?
Inkscape extensions are spread over the net. Some good soures to find new stuff:
- https://inkscape.org/de/gallery/=extension
- https://inkscape.org/gallery/?q=extensio
- https://inkscape.org/de/community
- http://wiki.inkscape.org/wiki/index.php/Extension_repository
- http://wiki.inkscape.org/wiki/index.php/Inkscape_Extensions
- https://github.com/search?o=desc&p=30&q=inkscape&s=stars&type=Repositories
- https://github.com/topics/inkscape
- https://github.com/search?o=desc&p=60&q=%3Cinkscape-extension+xmlns%3D%22http%3A%2F%2Fwww.inkscape.org%2Fnamespace%2Finkscape%2Fextension%22%3E&s=indexed&type=Code
- https://gitlab.com/Moini/ink_extensions
- https://sourceforge.net/directory/?q=inkscape
- https://www.thingiverse.com/search?q=inkscape
- https://pypi.org/search/?q=inkscape
-
Google
- "inkscape extension site:gist.github.com"
- "inkscape plugin site:gist.github.com"
- Gitlab
- https://gitlab.com/explore/projects/starred?name=inkscape&non_archived=true&page=1&search=inkscape&sort=latest_activity_desc
- searching in gitlab does'nt make fun. We cannot browse for more than 50 pages and we see all forks in the search
- Tip: skip all repo's with Inkscape icon in repo because they are forks only).
-
Better search gitlab using google with a filter like:
site:gitlab.com inkscape extension -"Python extensions for Inkscape core" -"issues" -"Inkscape / extensions" -"src/extension/" -"merge" -"contains the stock" -"extension-manager"
Use Inkscape with Flatpak
This is a trick from ZAM Erlangen to run Inkscape with Flatpak and having permissions to USB devices (e.g. to use Inkscape with AxiDraw or EggBot)
flatpak run --device=all org.inkscape.Inkscape
See also https://flathub.org/apps/com.github.tchx84.Flatseal about adjusting permissions
Install Inkscape from trunk
Problem:
Inkscape-trunk-data : Conflicts: inkscape but 1:1.4.2+202505120737+ebf0e940d0~ubuntu24.04.1 is to be installed
Solution:
sudo apt purge inkscape-trunk
sudo apt update
sudo apt upgrade
sudp apt install inkscape