Git Product home page Git Product logo

Comments (3)

friggingee avatar friggingee commented on August 16, 2024

Can confirm that the exclude setting does not work properly.
Excluding URLs via RegEx should be straightforward but RegEx's tested valid with rubular.com don't seem to match with sitediff when crawling.

e.g. a URL with a path of "/de-en/products/" is still crawled even with an exclude value of \/de-en\/.*?$

from sitediff.

kirk-brown-ew avatar kirk-brown-ew commented on August 16, 2024

When you first run init, you can include the exclude command line parameter. Then, when you crawl, it will exclude the paths represented in the RegEx.

@mmunz You'll want to use a regex of .*\.pdf

@friggingee You'll want to use a regex of ^\/de\-en\/.*?$

from sitediff.

friggingee avatar friggingee commented on August 16, 2024

@kirk-brown-ew I tried that. Using your suggested regex as a yaml file setting:

settings:
  exclude: "^\/de\-en\/.*?$"

yields the same result, namely that sites starting with "/de-en/..." are still being visited/cached/processed.

The actual solution lies in the syntax of the exclude setting, namely that it needs to be written like it's being generated by sitediff init instead of what the documentation suggests.

Using an exclude value of !ruby/regexp /^\/de\-en\/.*?$/ yields the desired result of all links starting with "de-en" being excluded.
On this note, the regex I used, \/de-en\/.*?$ works just fine, as expected, as well, if used with the prefixed syntax.

from sitediff.

Related Issues (20)

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.