I am trying to call pelican via subprocess for automated blog posting, however when I tried which pelican
in shell and opened it. I found this
#!/usr/bin/python
# EASY-INSTALL-ENTRY-SCRIPT: 'pelican==3.5.0','console_scripts','pelican'
__requires__ = 'pelican==3.5.0'
import sys
from pkg_resources import load_entry_point
sys.exit(
load_entry_point('pelican==3.5.0', 'console_scripts', 'pelican')()
)
while I was expecting to see a call to main function that gets called when somebody passes argument from shell to pelican.(I am not talking about pelican-quickstart
)
I tried to look into the pelican project I think its the __init__.py
that has main function, but normally I would have a executable wrapper that calls this main function, so can anyone redirect me to which function the above code passes the argument passed by user ?
From pelican's
setup.py
:Thus, the entry point for the
pelican
command is themain()
function in thepelican
module; you could also reach it byimport pelican; pelican.main()
. (Similarly, forpelican-quickstart
:import pelican.tools.pelican_quickstart; pelican.tools.pelican_quickstart.main()
).To find the file:
...or, to get a handle on the
main
function directly: