Closed adir-ux closed 2 years ago
Not familiar with MacOS, but I think the code as is should work if your path is setup correctly, so I'm hesitant to change it right now. What are your thoughts @pierreglaser?
inkscape
is not so straightfoward to install on MacOS
, and I may have symlink
-ed inkscape to some place in my $PATH
at some point in the process when developing inkscape-figures
MacOS
suppport. Apologies if this ended up breaking your setup @adir-ux.
/Applications/Inkscape.app/Contents/MacOS/inkscape
sounds like a reasonable place for an Inkscape
executable to be on MacOS
. But so is $PATH
. So if we want to support the two, we will need some form of fallback mechanism. Is there any guidelines from the inkscape
folks on how to launch inkscape
from the command line in MacOS
? If not, I would be slightly in favor of supporting @adir-ux 's situation.
if set to /Applications/Inkscape , would it check the PATH as well?
on Inkscape wiki I found this link to /usr/local/bin
sudo ln -s /Applications/Inkscape.app/Contents/Resources/bin/inkscape /usr/local/bin
but running
/Applications/Inkscape.app/Contents/Resources/bin/inkscape
returns "no such file or directory", so I assume it applies only to the older xquartz versions.
someone on StackOverflow suggested the location I pointed. https://stackoverflow.com/a/60068607
Thanks for your input! Relevant Inkscape (outdated?) docs: MacOSX#Inkscape command line. A bit confusing to be honest. I think we should probably
inkscape
is in the path (checkout return code of which inkscape
)/Applications/Inkscape.app/Contents/Resources/bin/inkscape
exists/Applications/Inkscape.app/Contents/MacOS/inkscape
exists,and depending on that execute the right file. Sounds good?
sounds great.
Moved off-topic conversation to issue #23.
Ctrl+f doesn't launch Inkscape, although it does create the file in the right position and with the right name (at least for the 1.0beta, the only version which is not dependent on xquartz yet).
Solution: in 'inkscapefigures' folder in 'main.py' file, inside 'def Inkscape(path):'
subprocess.Popen path is set to "/Applications/Inkscape,set(path)" while this would not work, as its not an executable file (at least that's the reason I found for), and must be changed to:
"/Applications/Inkscape.app/Contents/MacOS/inkscape",str(path)
works like a charm.
thanks a lot for all of your work and sharing. you made me learn ViM from scratch, and build an amazing notes taking machine. your articles and repository are pure gold!