I can't understand the 3rd line in these instructions, found here
- Install dependency Ghostscript. On MacOSX:
brew install ghostscript
- Create a symbolic link if you want to run it everywhere in bash
ln -s pdf_creator.py pdfc
- Add in PATH environment variable On MacOSX:
echo export=/absolute/path/of/the/folder/script/:$PATH >> ~/.bash_profile
What path are they talking about? The path where the ghostcript is? I don't know where that would be. When I ran echo export=/absolute/path/of/the/folder/script/:$PATH in terminal, nothing happened to the bash profile.
Update
Placed the folder
pdfc_master
which contains the filepdf_compressor.py
in/users/bobsmith/codes/pdfc_master/pdf_compressor.py
Run
ln -s /users/bobsmith/codes/pdfc_master/pdf_compressor.py pdfc
Run
echo export=/users/bobsmith/codes/pdfc_master/pdf_compressor.py/:$PATH >> ~/.bash_profile
I now have the following syntax on my bash_profile
export=/users/bobsmith/codes/pdfc_master/pdf_compressor.py/:/Users/bobsmith/codes/venv/bin:/usr/local/opt/tcl-tk/bin:/Users/bobsmith/Applications/miniconda3/condabin:/Users/bobsmith/.pyenv/shims:/Library/Frameworks/Python.framework/Versions/3.7/bin:/applications/google-cloud-sdk/bin:/usr/local/opt/openssl/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:~/PycharmProjects/book/superlists/chromedriver:/opt/X11/bin:/Library/Frameworks/Mono.framework/Versions/Current/Commands
That looks wrong to me.
So I then ran in terminal:
pdfc /users/bobsmith/downloads/montale_eng3.pdf 0 /users/bobsmith/downloads/montale_eng2.pdf
And I got the error pdfc not found. I would think that pdfc
would have to be somewhere in my bash_profile but it is not.