4 ms·
Nice, I like automation and Inkscape. Always nice to see free software solutions. Suggestions - perhaps you could script with another language rather than usin
by Boothroid 9y ago
Nice, I like automation and Inkscape. Always nice to see free software solutions.
Suggestions - perhaps you could script with another language rather than using a .bat? For example you could use Python to create the commands. With that you might also be able some simple looping instead of successive commands, which would make future changes easier (not that you can't do this with a batch file also, but personally every time I've tried to do anything similar with batch files I've ended up losing the will to live..).
- bizzleDawg 9y agoI've made use of this [1] python script before for running some mail-merging type tasks with inkscape, so that could be a good starting point for anyone looking to do some fancy inkscape automation. Personally I used it to combine generating mail merged print and laser cut patterns for the place cards. So you get a pdf to print out and a laser cutting SVG which can be 'lasered on' after the printing. [1] https://github.com/basak/svg-mail-merge https://github.com/basak/svg-mail-merge
- chris84948 9y agoYeah, I'll admit that batch files aren't exactly ideal. As a c# developer though, I don't ever use Python, so that doesn't come over as easier for me. I think I moved all the important parts into VARs, so you shouldn't have to change too much in the script. If there was an easy cross-platform scripting language that was installed by default, now we'd be talking.
- darklajid 9y agoIf you're a C# guy: There's the csharp interpreter (run .cs files) or, potentially even better, there're F# scripts. Or, you know, write Powershell (depending on what platforms you need to support ofc).
- chris84948 9y agoSure, but what exactly do they get me that a batch script doesn't? Not trying to be difficult, but if the batch script can do it, why would I wade into Powershell? I definitely think Powershell has it's place, but in this case, I don't see it. I definitely don't see using cs files or f# scripts as an easier way of doing this.
- darklajid 9y agoHonestly? If you're good with the current approach, why change it. That said, there's a LOT of repetition in there and while you probably _can_ improve that in this solution, a 'proper' language might be more readable. Again, if you're a C# developer, C#/F# (or even Powershell) scripts are probably ~closer to home~. That whole script is basically - if I understand it correctly - two unrolled loops. Instead of two loops (logo dimensions, scale) you're duplicating a loooot of lines. If this is no problem: Cool. Then again, maybe you want to improve this approach in the future?
- chris84948 9y agoMaybe { crosses fingers tight } Microsoft could package all this up and do it for me. I'd love to just supply an SVG file. Although, since I spend time at work dealing with DXF files supplied by customers, I understand the problem.
- piceas 9y agoHave you tried/considered an asset generator plugin? https://marketplace.visualstudio.com/items?itemName=PeterR.UWPVisualAssetsGenerator https://marketplace.visualstudio.com/items?itemName=PeterR.U... https://github.com/shenchauhan/UWPTileGenerator https://github.com/shenchauhan/UWPTileGenerator