The little things give you away... A collection of various small helper stuff
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.
 
 
 

29 lignes
703 B

  1. #!/bin/bash
  2. if [[ $# -ne 1 || "$1" != http* ]]; then
  3. printf 'Usage: %q FRONT_PAGE_URL\n' "$0" >&2
  4. exit 1
  5. fi
  6. url="$1"
  7. if [[ "${url}" == *\?* ]]; then
  8. printf 'Error: URLs with query strings not supported\n' >&2
  9. exit 1
  10. fi
  11. url="${url%/*}"
  12. curl "${url}/TitleIndex" | \
  13. grep -A 1000000 -F 'href="/TitleIndex?allpages=1"' | \
  14. grep -B 1000000 -F 'id="pagebottom"' | \
  15. grep -Po 'href="\K[^"]+' | \
  16. grep -Fxv '/TitleIndex?allpages=1' | \
  17. sed 's,\?action=AttachFile$,,' | \
  18. perl -ne 'print if ! $a{$_}++' | \
  19. awk -v url="${url}" \
  20. '{
  21. print url $0;
  22. print url $0 "?action=info";
  23. print url $0 "?action=info&general=1";
  24. print url $0 "?action=raw";
  25. print url $0 "?action=AttachFile";
  26. }'