Open 1ec5 opened 8 years ago
It might also be possible to distribute the PDFs via a package manager like CocoaPods.
It might also be possible to distribute the PDFs via a package manager like CocoaPods.
I think that would be a better solution. I'd prefer to preserve SVG as the only output of this project. Maki can be used with NPM though – so you could create another project called maki-pdf that pulls in maki and creates PDFs
CocoaPods requires files to be hosted somewhere, ideally a GitHub repo. So maki-pdf (or maki-xcassets, as it were) could work.
@1ec5 How about a maki-mobile
where we combine both iOS' PDFs and Android's vector drawables?
The script provided by @1ec5 is a little bit outdated. This should work:
icons
folder. Create a script file
$ touch export.sh
$ nano export.sh
Paste the following code inside
#!/bin/bash
mkdir $PWD/pdf
for file in $PWD/*-15.svg
do
filename=$(basename $file)
inkscape "$file" --export-pdf $PWD/pdf/"${filename%-15.svg}.pdf"
done
Now make this script executable
$ sudo chmod +x export.sh
Run the script
$ ./export.sh
I'm still interested in a CocoaPods version of Maki 👍
Would it be within the scope of this project to provide bundles of PDFs for use in iOS and Mac applications?
PDF is the vector artwork format of choice on Apple platforms. Developers typically place these assets in an asset catalog, which gets compiled down to a single, compact binary file at build time. On OS X, it’s also common to have standalone PDFs in resource folders in the build product.
Depending on the situation, a developer might represent a single image with different PDFs at different resolutions, a single PDF for all resolutions, or a PDF with overrides for specific resolutions. Silhouette-style images like those in this project are typically rendered in black; the platform’s UI toolkit takes care of colorizing template images.
For an internal testbed application, I’ve been using this shell script to transform Maki icons into PDFs using Inkscape:
/ref #247 /cc @samanpwbb @friedbunny @zugaldia