Package: inkplot
InkplotInkplot makesPDFsand PNGs out ofInkscapeSVG documents
using asimple YAML filethat describes for each image or pdf page page:thesource SVGvisibiilty for each of the SVG's layersthe page's zoom extentsIt's purpose is to make it easy to produce PDFs from SVGs where the workflow
includes turning layers on and off and zooming around to different spots
in the document space.The project's original aim is to enable the creation of a set of planning
documents with title blocks, page numbers, compass rose and scale, etc.
with pages that include various systems like water, septic, and electrical
with labels and line weights appropriate to the scale.I've often wanted a tool like this to exist, but only just embarked
on the project that's involved enough to justify the effort.I hope other folks find it useful. Enjoy!PagesTo keep things brief, inkplot pages can use shared layersets and zoom
rectangles:shared:layersets:-name:hide-allsource:farm.svghidden:-'**'-name:basemap-imagerysource:farm.svgvisible:Truelayers:-"site>>basemap>>**"-name:titleblock-frontpagesource:farm.svgvisible:-"titleblock>>fullextentframe>>boxes"-"titleblock>>fullextentframe>>mask"-"scale>>fullextentscale"zoom-rectangles:-name:whole-site-frameid:residences-site-frame-lg-name:both-residences-frameid:residences-site-frame-smTo define the PDFs that can be generated using inkplot and the render definition
YAML file, A page definition can reference layersets and simply define any additional
layers that need to be turned on or off above and beyond the shared layersets
listed ininclude-layersets:pdfs:-name:example_pdfpages:-name:frontpagesource:farm.svginclude-layersets:-"hide-all"-"basemap-imagery"-"titleblock-frontpage"layersets:-visible:Truelayers:-"titleblock>>fullextentframe>>title>>overview-basemap"include-zoom-rectangle:whole-site-frameAnd, because it's aYAMLfile, we can gain a bit more
brevity yet using YAML aliases:pdfs:-name:example_pdfpages:# this one defines the front page but also makes a template of sorts named# pg-imagery-with-titleblock that can be used later-&pg-imagery-with-titleblockname:frontpagesource:farm.svginclude-layersets:-"hide-all"-"basemap-imagery"-"titleblock-frontpage"layersets:-visible:Truelayers:-"titleblock>>fullextentframe>>title>>overview-basemap"include-zoom-rectangle:whole-site-frame# this defines a page that includes everything in the frontpage def, but# redefines the layersets (keeping the layersets referenced in# include-layersets)-*pg-imagery-with-titleblockname:siteplanlayersets:visible:-"titleblock>>fullextentframe>>title>>site-plan"-"bldgs>>**"-"site/infrastructure/fences/**"To define images, that, like pages, can be generated at the command line, we can include
an images section that is very similar to the pages section:images:-name:site-range-hillsource:farm.svginclude-layersets:-"hide-all"-"titleblock-brewery-site"-"shared-brewery-site"layersets:-visible:-"proposed>>brewery>>sites1>>rangehill"-hidden:[]include-zoom-rectangle:brewery-site-plan-frameUsing the CLITo create all defined PDFs and images, use the simple CLI:inkplotexample.ymland to create individual PDFs and images use:# produce a single PDFinkplotexample.yml--pdfexample_pdf# produce an individual imageinkplotexample.yml--imagesite-range-hillAnd that should do it.InstallingInstalling is as simple as:pipinstallinkplotand you'll need to haveInkscapeinstalled.