this repo has no description
3
fork

Configure Feed

Select the types of activity you want to include in your feed.

🔥 Cleanup examples/gallery

-83
examples/gallery/cutting-an-egg.png

This is a binary file and will not be displayed.

examples/gallery/designing-a-font.png

This is a binary file and will not be displayed.

examples/gallery/drone-operating-system.png

This is a binary file and will not be displayed.

examples/gallery/gallery.png

This is a binary file and will not be displayed.

examples/gallery/japan-sledding-olympics.png

This is a binary file and will not be displayed.

examples/gallery/measuring-spirits.png

This is a binary file and will not be displayed.

-43
examples/gallery/myriad/generate
··· 1 - #!/usr/bin/env fish 2 - 3 - set wipe " " 4 - 5 - for i in (seq 1 16) 6 - for j in (seq 1 9) 7 - echo -ne Making piece $i:$j 8 - shapemaker image piece-$i-$j.svg --color $argv[1] # --grid-size 2x2 9 - # --render-grid \ 10 - # --canvas-padding 0 \ 11 - # --objects-count 0..1 \ 12 - # --line-width 16 \ 13 - # --empty-shape-stroke 4 \ 14 - # --dot-radius 5 \ 15 - # --small-circle-radius 10 \ 16 - # 2>/dev/null & 17 - end 18 - end 19 - 20 - wait 21 - echo Made pieces$wipe 22 - 23 - for f in piece-*.svg 24 - set dest (echo $f | sd '.svg$' '.png') 25 - echo -ne Converting $f to PNG...\r 26 - rm $dest || true 27 - convert -density 200 $f $dest & 28 - end 29 - 30 - wait 31 - echo Converted all pieces to PNG$wipe 32 - 33 - for j in (seq 1 9) 34 - echo -ne Merging pieces into bar $j...\r 35 - convert +append piece-*-$j.png bar-$j.png & 36 - end 37 - 38 - wait 39 - echo Merged pieces into bars$wipe 40 - 41 - echo Merging bars into myriad... 42 - convert -append bar-*.png myriad.png 43 - echo Done.
-40
examples/gallery/smash.py
··· 1 - #!/usr/bin/env python 2 - from copy import deepcopy 3 - from pathlib import Path 4 - from subprocess import run 5 - 6 - if Path('.').resolve().name != 'gallery': 7 - print("Run this script from the gallery directory") 8 - exit(1) 9 - 10 - for svg in Path('.').glob('*.svg'): 11 - png = svg.with_suffix('.png') 12 - if not png.exists(): 13 - print(f"Converting {svg} to {png}") 14 - run(["convert", "-density", "1200", svg, png]) 15 - 16 - pngs = [ p for p in Path('.').glob('*.png') if p.name != 'gallery.png' ] 17 - 18 - cells_per_row = 6 19 - 20 - grid = [] 21 - for i in range(0, len(pngs), cells_per_row): 22 - grid.append(deepcopy(pngs[i:i+cells_per_row])) 23 - 24 - print(f"Layout is {len(grid)} rows of {cells_per_row} cells:") 25 - for row in grid: 26 - print([p.name for p in row]) 27 - 28 - for i, pngs in enumerate(grid): 29 - print(f"Smashing row {i}") 30 - run(["convert", "+append", *pngs, f"bar-{i}.png"]) 31 - 32 - print(f"Smashing all rows") 33 - run(["convert", "-append", "bar-*.png", "gallery.png"]) 34 - 35 - for bar in Path('.').glob('bar-*.png'): 36 - print(f"Deleting {bar}") 37 - bar.unlink() 38 - for png in pngs: 39 - print(f"Deleting {png}") 40 - png.unlink()
examples/gallery/test.png

This is a binary file and will not be displayed.