Giter Site home page Giter Site logo

Bug in batch.sh about website-watcher HOT 7 CLOSED

muety avatar muety commented on September 20, 2024
Bug in batch.sh

from website-watcher.

Comments (7)

muety avatar muety commented on September 20, 2024 1

Thanks for that bug report. I'll take a look.

from website-watcher.

muety avatar muety commented on September 20, 2024 1

I think I fixed it, please check.

Thanks for pointing me in the right direction with your hint. Bash is weird...

from website-watcher.

coveritytest avatar coveritytest commented on September 20, 2024

It seems to be a problem with jq's handling of single quotes.

from website-watcher.

coveritytest avatar coveritytest commented on September 20, 2024

Found the reason, it's in https://github.com/muety/website-watcher/blob/master/batch.sh#L27. The for loop is working with spaces, and if there is a space in the JSON itself, it won't work.

from website-watcher.

coveritytest avatar coveritytest commented on September 20, 2024

Great, thanks for the fix. There is another problem, though. You put double quotes around the variables in line https://github.com/muety/website-watcher/blob/master/batch.sh#L57. Problem with $ignore is, that Python's argparse expects multiple arguments in the form -i arg1 arg2 or -i 'arg1' 'arg2'. Currently it's -i 'arg1 arg2' which results in one single XPath expression instead of a list. It works fine, when you remove the double quotes for $ignore in line 57.

from website-watcher.

muety avatar muety commented on September 20, 2024

I see the problem. Probably those quotes aren't even needed anyway. We can probably remove them again.

from website-watcher.

coveritytest avatar coveritytest commented on September 20, 2024

I guess you can keep the double quotes in line 57, except for $ignore, just checked it, seems to work.

from website-watcher.

Related Issues (17)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.