GithubHelp home page GithubHelp logo

Comments (6)

owenvoke avatar owenvoke commented on May 10, 2024 2

I think that this shouldn't really be part of the linter. 🤔 Especially as the linter runs every time a new page is added (or a PR is merged), we might be spamming a lot of sites. 😬

from tldr-lint.

gutjuri avatar gutjuri commented on May 10, 2024 1

This issue may be closed by tldr-pages/tldr#12506

from tldr-lint.

kbdharun avatar kbdharun commented on May 10, 2024

Can you explain a bit about how we could implement it in Linter?

Would you ping the page's links to check if it is reachable? Or is there something we can use natively?

from tldr-lint.

sebastiaanspeck avatar sebastiaanspeck commented on May 10, 2024

We could use wget to do something like this:

LINK_OF_INTEREST=$(awk 'NR==3{print $3}' file.md)
TOTAL_TIME=$(wget --page-requisites --output-document /dev/null "$LINK_OF_INTEREST" 2>&1 | grep -oE 'Total wall clock time: [0-9.]+s' | grep -oE '[0-9.]+')

if [ "$(echo "$TOTAL_TIME < 1" | bc -l)" -eq 1 ]; then
    echo "Total time is below 1 second"
else
    echo "Total time is 1 second or more"
fi

from tldr-lint.

sebastiaanspeck avatar sebastiaanspeck commented on May 10, 2024

I get that! Maybe we can create a script that run's once a month to report any broken links?

from tldr-lint.

kbdharun avatar kbdharun commented on May 10, 2024

I think that this shouldn't really be part of the linter. 🤔 Especially as the linter runs every time a new page is added (or a PR is merged), we might be spamming a lot of sites. 😬

This is exactly what I thought too as we document lesser-known tools too, we might be stressing their servers by sending multiple requests at a time if it got included in the linter.

from tldr-lint.

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.