Skip to content

Commit 7fdb820

Browse files
authored
Merge pull request #6 from davenquinn/recreate-procreate-brushes
Recreate procreate brushes
2 parents c36c506 + e4582d5 commit 7fdb820

8 files changed

Lines changed: 324 additions & 5 deletions

File tree

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,5 @@ doc/dist
44
*.zip
55
procreate-brushes/build
66
assets/png-uncompressed/*.png
7+
.idea
8+
package-lock.json

Makefile

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Making brushes for Procreate requires a ton of different libraries.
2+
3+
brushes:
4+
-brew install cairo
5+
npm install
6+
poetry install
7+
-npm run build-images
8+
poetry run procreate-brushes/create-brushes

build-images

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
#!/usr/bin/env zsh
22

3+
export PATH=.venv/bin:$PATH
4+
# https://github.com/Kozea/CairoSVG/issues/392
5+
# To make CairoSVG work with Homebrew-installed cairo, you need to set the DYLD_LIBRARY_PATH environment variable.
6+
export DYLD_LIBRARY_PATH="/opt/homebrew/opt/cairo/lib:$DYLD_LIBRARY_PATH"
37
# Builds individual svg, uncompressed png, and quantized png images.
48

59
cmds=( 'cairosvg' 'imagemin' 'pngquant' 'xmllint')

package.json

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,13 @@
77
"doc": "doc"
88
},
99
"scripts": {
10-
"test": "echo \"Error: no test specified\" && exit 1"
10+
"test": "echo \"Error: no test specified\" && exit 1",
11+
"build-images": "./build-images"
1112
},
1213
"author": "Daven Quinn",
13-
"license": "CC0"
14+
"license": "CC0",
15+
"dependencies": {
16+
"imagemin-cli": "^8.0.0",
17+
"imagemin-pngquant": "^10.0.0"
18+
}
1419
}

poetry.lock

Lines changed: 278 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

poetry.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[installer]
2+
no-binary = ["cairosvg"]

procreate-brushes/create-brushes

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,11 @@ from shutil import copyfile, make_archive
1010
from tempfile import TemporaryDirectory
1111
# Procreate brushes require an inverted image
1212

13-
indir = Path("../assets/png")
14-
outdir = Path("./build")
15-
template = Path("./template")
13+
here = Path(__file__).parent
14+
15+
indir = Path(here)/"../assets/png-uncompressed"
16+
outdir = Path(here)/"build"
17+
template = Path(here)/"template"
1618

1719
outdir.mkdir(exist_ok=True)
1820

pyproject.toml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
[tool.poetry]
2+
name = "geologic-patterns-brushes"
3+
version = "1.0.0"
4+
description = "Create Procreate brushes from FGDC symbols"
5+
authors = ["Daven Quinn <code@davenquinn.com>"]
6+
license = "MIT"
7+
readme = "README.md"
8+
package-mode = false
9+
10+
[tool.poetry.dependencies]
11+
python = "^3.8"
12+
pillow = "^10.4.0"
13+
cairosvg = "^2.7.1"
14+
15+
16+
[build-system]
17+
requires = ["poetry-core"]
18+
build-backend = "poetry.core.masonry.api"

0 commit comments

Comments
 (0)