I have a couple hundred SVGs that contain text that I'd like to batch convert to stroke font to be plotted using a plotter. Is there anyway to do this in inkscape?
I've figured out that I can run the hershey.py file from command line by passing certain inputs. I'm still trying to figure out exactly what the inputs should be. Then I guess I should be able to write some sort of script to loop through the svgs I have. Any help would be much appreciated!
I get the following warnings. It doesn't look like it finishes.
** (org.inkscape.Inkscape:1612): WARNING **: 15:33:51.978: Invalid value ('') for appearance of parameter 'setupType' in extension 'command.evilmadscientist.wcb.plot_rev_57'
** (org.inkscape.Inkscape:1612): WARNING **: 15:33:51.979: Attempting to translate an empty string in extension 'command.evilmadscientist.wcb.plot_rev_57', which is not supported.
** (org.inkscape.Inkscape:1612): WARNING **: 15:33:51.979: Invalid value ('') for appearance of parameter 'resumeType' in extension 'command.evilmadscientist.wcb.plot_rev_57'
It keeps saying that it can't find the svg_fonts folder so I move the folder to the location it's using and run the command again. It completes, but no document is created.
It should be in the same folder as the input file I think .
I'm using Ubuntu 20.10. I don't have access to a mac, you do have to have used the extension at least once in Inkscape, applied and exited cleanly. Inkscape then saves those last settings for the extension in preferences.xml ( same for windows )
Hmm that link doesn't seem to be working for me but I'll dig around a bit! Thank you so much for helping me. I'm still not getting anywhere just yet, but I know I'm very close.
I was able to use joneuhauser's recommendation to run hershey.py from a separate python file. It completes with no errors, but an svg file is not created. I tried to login to the chat feature, but it wouldn't let me. Also tried sending an password reset to my email and that didn't work either, so that's why I'm back here asking you questions! If I can login to the chat feature I can ask joneuhauser directly!
I was able to use joneuhauser's recommendation to run hershey.py from a separate python file. It completes with no errors, but an svg file is not created. I tried to login to the chat feature, but it wouldn't let me. Also tried sending an password reset to my email and that didn't work either, so that's why I'm back here asking you questions! If I can login to the chat feature I can ask joneuhauser directly!
I have a couple hundred SVGs that contain text that I'd like to batch convert to stroke font to be plotted using a plotter. Is there anyway to do this in inkscape?
OS ?
Mac OS Big Sur 11.4
I've figured out that I can run the hershey.py file from command line by passing certain inputs. I'm still trying to figure out exactly what the inputs should be. Then I guess I should be able to write some sort of script to loop through the svgs I have. Any help would be much appreciated!
If can write a script, this line
inkscape --batch-process --actions="select-all:all;org.evilmad.text.hershey.noprefs;export-filename:hers.svg;export-do;" input_svg
Should execute the hershey extension using the last settings you set in Inkscape after exiting Inkscape.
Where is the file "hers.svg" saved when you run that command?
I get the following warnings. It doesn't look like it finishes.
** (org.inkscape.Inkscape:1612): WARNING **: 15:33:51.978: Invalid value ('') for appearance of parameter 'setupType' in extension 'command.evilmadscientist.wcb.plot_rev_57'
** (org.inkscape.Inkscape:1612): WARNING **: 15:33:51.979: Attempting to translate an empty string in extension 'command.evilmadscientist.wcb.plot_rev_57', which is not supported.
** (org.inkscape.Inkscape:1612): WARNING **: 15:33:51.979: Invalid value ('') for appearance of parameter 'resumeType' in extension 'command.evilmadscientist.wcb.plot_rev_57'
I was trying to run the following command:
python3 /Applications/.../hershey.py --output=doc1.svg --tab=Render --fontface=HersheySans1 --preserve=false doc2.svg
It keeps saying that it can't find the svg_fonts folder so I move the folder to the location it's using and run the command again. It completes, but no document is created.
It should be in the same folder as the input file I think .
I'm using Ubuntu 20.10. I don't have access to a mac, you do have to have used the extension at least once in Inkscape, applied and exited cleanly. Inkscape then saves those last settings for the extension in preferences.xml ( same for windows )
I might be an idea to ask in https://chat.inkscape.org/channel/inkscape_extensions
If you scroll up a bit to 11pm last night GMT, a developer did post a short example of importing hershey.py into a python script.
I might be an idea to ask in https://chat.inkscape.org/channel/inkscape_extensions
If you scroll up a bit to 11pm last night GMT, a developer did post a short example of importing hershey.py into a python script.
Hmm that link doesn't seem to be working for me but I'll dig around a bit! Thank you so much for helping me. I'm still not getting anywhere just yet, but I know I'm very close.
I was able to use joneuhauser's recommendation to run hershey.py from a separate python file. It completes with no errors, but an svg file is not created. I tried to login to the chat feature, but it wouldn't let me. Also tried sending an password reset to my email and that didn't work either, so that's why I'm back here asking you questions! If I can login to the chat feature I can ask joneuhauser directly!
I was able to use joneuhauser's recommendation to run hershey.py from a separate python file. It completes with no errors, but an svg file is not created. I tried to login to the chat feature, but it wouldn't let me. Also tried sending an password reset to my email and that didn't work either, so that's why I'm back here asking you questions! If I can login to the chat feature I can ask joneuhauser directly!