stefanjudis / grunt-photobox

Grunt plugin for creating screenshots of any site and compare them
MIT License
277 stars 22 forks source link

Problem with pipe char on windows #17

Closed a-ursino closed 10 years ago

a-ursino commented 10 years ago

Hi when i try to launch grunt-photobox on win7 machine with this configuration

    photobox : {
        waisenkinder : {
          options : {
            indexPath      : 'photobox/',
            highlightColor : '#0000ff',
            template       : 'canvas',
            urls           : [ 'http://4waisenkinder.de' ]
          }
        }
    },

i got the following error

started photo session for http://4waisenkinder.de|800 Command: phantomjs ..\node_modules\grunt-photobox\tasks\lib\photoboxScript.js http://4waisenkinder.de|800 photobox/ photobox/options.json

'800' is not recognized as an internal or external command, operable program or batch file. Takin' picture of http://4waisenkinder.de|800did not work correclty...

Error PhotoSessionCallback: Result for http://4waisenkinder.de|800 was PhotoSessionCallback: Code for http://4waisenkinder.de|800 was 255

i think that the problem is with pipe char on windows

any suggestion?

thanks

stefanjudis commented 10 years ago

Related to #10.

stefanjudis commented 10 years ago

Hey sorry for that,

I investigated already a bit of time to make it run on windows. But I don't have a windows machine available. If you would help with remote debugging, I'd push a "windows"-branch today after work?

Thanks.

a-ursino commented 10 years ago

my temporary fix was to change the | char with # as separator between size due the problem with | on win machine

on row 18 of photoboxScript.js split = picture.split( '#' )

on row 122 of photobox.js var split = picture.split('#');

on row 308 of photobox.js pictures.push( url + '#' + size );

and it works ;-)

stefanjudis commented 10 years ago

Nice! :+1:

Do you mind making a PR?

stefanjudis commented 10 years ago

You're my current windows tester and when you say it works, you're closing two issues right away. ;)

stefanjudis commented 10 years ago

Feel free if to close if daefea113bd15fa08fa112747c5127e1b8b8945e finally solved the issue. ;)

a-ursino commented 10 years ago

sure the only disadvantage of this workaround is if the user want to capture an url with an hash (something like one page app es: http://www.site.com/index.html#contactus)

stefanjudis commented 10 years ago

Well, it think it's fine for now. A big rewrite is planned anyway to get rid of that kind of hacky solution.