Skip to content

Instantly share code, notes, and snippets.

View berteh's full-sized avatar

Berteh berteh

View GitHub Profile
<?php
/**
* Convert a comma separated file into an associated array.
* The first row should contain the array keys.
*
* Example:
*
* @param string $filename Path to the CSV file
* @param string $delimiter The separator used in the file
* @return array
@berteh
berteh / svg-objects-export.bat
Last active May 11, 2016 02:30
Export SVG elements to other formats (png, pdf, ps, eps, svg), selecting them based on their ID with regular expressions. Useful for designing multiple icons in single file, sprite sheets, or multi-page documents with Inkscape (or another SVG editor). Easily generate low-resolution and high-resolution renders of some of the objects included in v…
:: In Windows Inkscape is shipped with a Python interpreter, you don't need to install it.
::
:: save both files in same directory as inkscape.exe and call
:: svg-objects-export.bat <svg-objects-export options> infiles+
@"./python/python.exe" svg-objects-export.py %* -i .\inkscape.com