GithubHelp home page GithubHelp logo

probe's Introduction

Concurrent Workers in Haskell

CLI

$ stack exec probe -- -h

The URL Checker: Concurrent URL checker
probe
  -o FILE     --output=FILE          Output file
  -f FILE     --files=FILE           Output file
  -a          --auto                 Enable auto seeding
  -e          --errors               Print only error messages
  -x          --external             Print only externals links (naive)
  -v          --verbose              Enable verbose messages
  -n WORKERS  --concurrency=WORKERS  Number of concurrent connections (default 16)
  -V          --version              Print version
  -h          --help                 Show help

Build, test and run all the things

# Build the project.
stack build

# Build the executable
stack build probe:exe:probe

# Run the test suite.
stack test

# Run the benchmarks.
stack bench

# Generate documentation.
stack haddock

# Run the Probe
stack exec probe -- -f ./sample/seeds.txt -n 2

Sample

(clipped for readability)

$ stack build probe:exe:probe &&  stack exec probe -- -f ~/Downloads/simple -n 2

The URL Checker: Concurrent URL checker
[1]:[[https://github.com/][]]
[12]:[[https://help.github.com/terms][terms of service]]
...
[13]:[[https://help.github.com/privacy][privacy policy]]
[40]:[[https://atom.io][Atom]]
[41]:[[http://electron.atom.io/][Electron]]
[43]:[[https://developer.github.com][Developers]]
...
[55]:[[https://shop.github.com][Shop]]
[56]:[[https://github.com/contact][Contact GitHub]]
[57]:[[https://github.community][GitHub Community Forum]]
[58]:[[https://help.github.com][Help]]
[59]:[[https://status.github.com/][Status]]
[60]:[[https://github.com/site/terms][Terms]]
...
[63]:[[https://services.github.com/][Training]]
Found 0 broken links. Checked 1 links (1 unique) in 1 files.
bye

Errors only:

$ stack build probe:exe:probe &&  stack exec probe -- -f ~/Downloads/simple -n 2 -e
...
ERROR: cannot parse [TagOpen "a" [("href","\\\"/features#community-management\\\""),("class","\\\"muted-link"),("alt-text-small\\\"","")],TagText "Community"]
ERROR: cannot parse [TagOpen "a" [("href","\\\"/business\\\""),("class","\\\"js-selected-navigation-item"),("HeaderNavlink",""),("px-0",""),("py-3",""),("py-lg-2",""),("m-0\\\"",""),("data-ga-click","\\\"Header,"),("click,",""),("Nav",""),("menu",""),("-",""),("item:business\\\"",""),("data-selected-links","\\\"/business"),("business",""),("security",""),("business",""),("customers",""),("business\\\"","")],TagText "\\n                  Business\\n"]
ERROR: cannot parse [TagOpen "a" [("href","\\\"/explore\\\""),("class","\\\"js-selected-navigation-item"),("HeaderNavlink",""),("px-0",""),("py-3",""),("py-lg-2",""),("m-0\\\"",""),("data-ga-click","\\\"Header,"),("click,",""),("Nav",""),("menu",""),("-",""),("item:explore\\\"",""),("data-selected-links","\\\"/explore"),("trending",""),("trending",""),("developers",""),("integrations",""),("integrations",""),("feature",""),("code",""),("integrations",""),("feature",""),("collaborate",""),("integrations",""),("feature",""),("ship",""),("showcases",""),("showcases_search",""),("showcases_landing",""),("explore\\\"","")],TagText "\\n                  Explore\\n"]
ERROR: cannot parse [TagOpen "a" [("href","\\\"/marketplace\\\""),("class","\\\"js-selected-navigation-item"),("HeaderNavlink",""),("px-0",""),("py-3",""),("py-lg-2",""),("m-0\\\"",""),("data-ga-click","\\\"Header,"),("click,",""),("Nav",""),("menu",""),("-",""),("item:marketplace\\\"",""),("data-selected-links","\\\""),("marketplace\\\"","")],TagText "\\n                      Marketplace\\n"]
..
ERROR: cannot parse [TagOpen "a" [("href","\\\"/about/careers\\\""),("class","\\\"muted-link"),("alt-text-small\\\"","")],TagText "Careers"]
ERROR: cannot parse [TagOpen "a" [("href","\\\"/about/press\\\""),("class","\\\"muted-link"),("alt-text-small\\\"","")],TagText "Press"]
ERROR: cannot parse [TagOpen "a" [("href","\\\"\\\"")],TagText "Reload"]
$ stack build probe:exe:probe &&  stack exec probe -- -f ~/Downloads/simple -n 2 -x

The URL Checker: Concurrent URL checker

...
[12]:[[https://help.github.com/terms][terms of service]]
[40]:[[https://atom.io][Atom]]
[41]:[[http://electron.atom.io/][Electron]]
[42]:[[https://desktop.github.com/][GitHub Desktop]]
[43]:[[https://developer.github.com][Developers]]
[47]:[[https://education.github.com/][Education]]
[49]:[[https://partner.github.com/][Partners]]
[50]:[[https://community.github.com/][Sponsorships]]
[55]:[[https://shop.github.com][Shop]]
[58]:[[https://help.github.com][Help]]
[59]:[[https://status.github.com/][Status]]
[63]:[[https://services.github.com/][Training]]
Found 0 broken links. Checked 1 links (1 unique) in 1 files.

probe's People

Contributors

zeroed avatar

Watchers

 avatar

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.