getpelican / pelican

Static site generator that supports Markdown and reST syntax. Powered by Python.
https://getpelican.com
GNU Affero General Public License v3.0
12.58k stars 1.81k forks source link

pelican-quickstart - develop_server script for windows #2308

Closed daverstam closed 6 years ago

daverstam commented 6 years ago

When using pelican-quickstart on Windows and answering Y for the question "Do you want an auto-reload HTTP script to assist with theme and site development?" the file develop_server.sh is created although you can't really use it on a Windows system.

Perhaps a good approach would be to not even show the "develop" question if os.name == 'nt' (or platform.system() == 'Windows')

Another suggestion is that a develop_server.bat script is added with appropriate content if the system is Windows. For starting the server it could for example be this simple:

develop_server.bat: pushd output python -m pelican.server popd

justinmayer commented 6 years ago

@daverstam: We maintainers don't use Windows and are thus ill-equipped to look into this further. Is this something you would like to work on implementing?

daverstam commented 6 years ago

@justinmayer: Gladly. I will investigate this further and get back with a PR.

avaris commented 6 years ago

Technically, there are ways to run shell scripts on Windows.

jorgesumle commented 6 years ago

I'm also against including support for an obscure proprietary software like the one for the CLI from Windows (cmd.exe, correct me if I'm wrong). Bash is a free software command language interpreter that you can install in any operating system (See https://www.gnu.org/software/bash/manual/bash.html#Installing-Bash or check the links provided by @avaris).

ChrisJefferson commented 6 years ago

Calling CMD.exe obscure is stupid -- it is available on every Windows desktop, which is a lot more desktop machines than run Unix.

In my experience, bash on windows tends to be very fragile -- for example I have found it sometimes doesn't work with my windows python / pip install properly.

I just install VirtualBox, run Linux in there, and run pelican in there, but it would be nice if the windows install was smoother.

justinmayer commented 6 years ago

@daverstam: It seems #2351, which will probably be merged soon, may obviate the need for a separate .bat script for Windows. Would you have a look and let us know what you think?

daverstam commented 6 years ago

@justinmayer Sorry for the late response. #2351 seems like a much better solution, simplicity is king!

justinmayer commented 6 years ago

Glad to hear it. In that case, this issue has ostensibly obviated by the aforementioned PR, which has been merged.