Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

some fix #8

Closed
wants to merge 10 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 52 additions & 0 deletions .github/workflows/md-link-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: Check Markdown links

on: push

jobs:
markdown-link-check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- uses: gaurav-nelson/github-action-markdown-link-check@v1

# name: Markdown Link Check

# on:
# push:
# pull_request:
# branches:
# - dev

# jobs:
# link-check:
# runs-on: ubuntu-22.04
# env:
# CI: true
# steps:
# - name: Setup Action
# uses: actions/checkout@master
# # - name: Setup Node
# # uses: actions/setup-node@v4
# # with:
# # node-version: 12.x
# - name: Install dependencies
# run: npm install
# - name: Run link check
# run: npm run link-check
# - name: Show broken links
# if: failure()
# run: |
# cat log | awk -v RS="FILE:" 'match($0, /(\S*\.md).*\[✖\].*(\d*\slinks\schecked\.)(.*)/, arr ) { print "FILE:"arr[1] arr[3] > "brokenlinks"}'
# rm -f err log
# cat brokenlinks
# links=`cat brokenlinks`
# links="${links//'%'/'%25'}"
# links="${links//$'\n'/'%0A'}"
# links="${links//$'\r'/'%0D'}"
# echo ::set-output name=links::**Following links are broken:** %0A$links
# - name: Send comment to PR with broken links
# if: failure() && github.event_name == 'pull_request'
# uses: thollander/actions-comment-pull-request@main
# with:
# message: ${{ steps.brokenlinks.outputs.links }}
# # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
10 changes: 10 additions & 0 deletions .linkcheck.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"default": true,
"MD004": { "style": "dash"},
"MD007": {"indent": 4},
"MD013": false,
"MD024": { "siblings_only": true},
"MD029": false,
"MD033": { "allowed_elements": [ "details" , "summary" ]},
"MD040": false
}
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ Data Leak, scam, username
- [WhatsMyName](https://whatsmyname.app/) - This tool allow to enumerate usernames across many websites.
<br>

[⇧ Top](#index)
## AI
AI tools/Site
- [Decktopus](https://www.decktopus.com/) - Create beautiful & professional presentations in just minutes.
Expand All @@ -56,7 +55,7 @@ Tools for Image/Audio/Video/Doc reconnaissance
[⇧ Top](#index)
## PRODUCTIVITY

- [unfurl](https://dfir.blog/unfurl/) - Unflurl url
- [unfurl](https://dfir.blog/unfurl/) - Break down url into pieces and find out what each thing do.
- [Wolfram|Alpha](https://www.wolframalpha.com/) - solve mathematical Equations
- [Cryptpad.fr](https://cryptpad.fr/) - Flagship instance of CryptPad, the end-to-end encrypted and open-source collaboration suite. Administered by the CryptPad development team.
- [Recontool.org](https://recontool.org/) - Recon tools
Expand Down Expand Up @@ -99,7 +98,7 @@ It takes a 'snapshot' of a webpage that will always be online even if the origin
- [Multi Translate](https://translate.mix.pink/)
- [Yandex.Translate](https://translate.yandex.com/) - translator from yandex
- [Bing Microsoft Translator](https://www.bing.com/translator) - translator from microsoft
- [Reverso](https://www.reverso.net/text_translation.aspx?lang=EN) - Enjoy cutting-edge AI-powered translation from Reverso in 15+ languages
- [Reverso](https://www.reverso.net/text_translation.aspx?lang=EN) - Enjoy cutting-edge AI-powered translation from Reverso in 25+ languages
including Arabic, Chinese, Italian, Portuguese, Dutch, Hebrew, Turkish, and Polish
- [Translate](https://www.translatedict.com/) -
- [text to speech online](https://www.naturalreaders.com/online/) - text to speech translator online
Expand Down
18 changes: 18 additions & 0 deletions markdown-link-check-config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"ignorePatterns": [
{
"pattern": "^bundle.zip"
},
{
"pattern": "^/"
}
],
"httpHeaders": [
{
"urls": ["https://", "http://"],
"headers": {
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:64.0) Gecko/20100101 Firefox/64.0"
}
}
]
}
16 changes: 16 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"devDependencies": {
"markdownlint-cli": "^0.26.0",
"textlint": "^11.6.3",
"textlint-filter-rule-comments": "^1.2.2",
"textlint-filter-rule-whitelist": "^2.0.0",
"textlint-rule-terminology": "^2.1.4"
},
"scripts": {
"test": "npm run lint-markdown && npm run lint-terminology",
"lint-terminology": "textlint ./README.md",
"lint-markdown": "markdownlint ./README.md --ignore node_modules",
"link-check": find . -name README.md -exec markdown-link-check -c markdown-link-check-config.json 1> log 2> err {} \\;
// "link-check": "find README -name \\*.md -exec markdown-link-check -c markdown-link-check-config.json 1> log 2> err {} \\; && if [ -e err ] && grep -q \"ERROR:\" err ; then exit 113 ; else echo -e \"All good\"; fi"
}
}
30 changes: 30 additions & 0 deletions scripts/apply_link_check.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
#!/bin/bash
# Script in charge of auditing the released cheatsheets MD files
# in order to detect dead links
# cd ../
# find . -name \*.md -exec markdown-link-check -c ../.linkcheck.json {} \; 1>../link-check-result.out 2>&1
# errors=`grep -c "ERROR:" ../link-check-result.out`
# content=`cat ../link-check-result.out`
# if [[ $errors != "0" ]]
# then
# echo "[!] Error(s) found by the Links validator: $errors CS have dead links !"
# exit $errors
# else
# echo "[+] No error found by the Links validator."
# fi

# Only check the specific README.md file
target_file="../README.md"

# Run link check with specific file and redirect output
markdown-link-check -c ../.linkcheck.json "$target_file" 1>../link-check-result.out 2>&1

# Check for errors and handle appropriately
errors=$(grep -c "ERROR:" ../link-check-result.out)

if [[ $errors != "0" ]]; then
echo "[!] Error(s) found in 'README.md': $errors broken links!"
exit $errors
else
echo "[+] No errors found in 'README.md'."
fi