axitkhurana / buster

Brute force static site generator for Ghost
MIT License
802 stars 139 forks source link

Problems with wget #30

Closed mii9000 closed 10 years ago

mii9000 commented 10 years ago

My instance of Ghost is running latest 0.5. There was no mention of installing wget for Windows. Anyway, I did that and after running buster generate --domain=http://localhost:2368 I get the following error:

SYSTEM_WGETRC = c:/progra~1/wget/etc/wgetrc
syswgetrc = C:\Program Files (x86)\GnuWin32/etc/wgetrc
--2014-08-18 12:49:23--  http://%5C--recursive/
Resolving \--recursive... failed: No data record of requested type.
wget: unable to resolve host address `\--recursive'
--2014-08-18 12:49:25--  http://%5C--convert-links/
Resolving \--convert-links... failed: No data record of requested type.
wget: unable to resolve host address `\--convert-links'
--2014-08-18 12:49:25--  http://%5C--page-requisites/
Resolving \--page-requisites... failed: No data record of requested type.
wget: unable to resolve host address `\--page-requisites'
--2014-08-18 12:49:25--  http://%5C--no-parent/
Resolving \--no-parent... failed: No data record of requested type.
wget: unable to resolve host address `\--no-parent'
--2014-08-18 12:49:27--  http://%5C--directory-prefix/
Resolving \--directory-prefix... failed: No data record of requested type.
wget: unable to resolve host address `\--directory-prefix'
--2014-08-18 12:49:27--  ftp://c/%5Cstatic
           => `%5Cstatic'
Resolving c... failed: No data record of requested type.
wget: unable to resolve host address `c'
--2014-08-18 12:49:30--  http://%5C--no-host-directories/
Resolving \--no-host-directories... failed: No data record of requested type.
wget: unable to resolve host address `\--no-host-directories'
\http://localhost:2368: Unsupported scheme.
mii9000 commented 10 years ago

I have another remote ghost instance running here. Tried with that also on Windows and same error.

zlalanne commented 10 years ago

Maybe buster could be updated to rely on urllib or requests instead of wget

mii9000 commented 10 years ago

@zlalanne wget for Windows should not be any different than wget on Linux IMO.

zlalanne commented 10 years ago

@Ibrahim-Islam Agreed. But you can't guarantee that. You also can't guarantee that wget is going to be in the user's path on windows or that the user even has wget installed. Or that new versions of wget won't break this functionality.

I think a pure python approach using requests/urllib would provide a better solution and would remove the dependency on having wget installed at all.

mii9000 commented 10 years ago

@zlalanne You have a point. Why don't you change this and send a pull request? I know I would benefit from that.

mii9000 commented 10 years ago

Solved the problem by replacing \\ here to just spaces