info:linkchecker

Différences

Ci-dessous, les différences entre deux révisions de la page.

Lien vers cette vue comparative

Les deux révisions précédentes Révision précédente
Prochaine révision
Révision précédente
info:linkchecker [2024/09/23 17:35] radeffinfo:linkchecker [2025/11/06 09:38] (Version actuelle) radeff
Ligne 7: Ligne 7:
 https://github.com/wummel/linkchecker https://github.com/wummel/linkchecker
  
-**Exemple** +===== Exemple ===== 
-   #rendu html +==== rendu html ==== 
-   linkchecker https://radeff.red/blog --output=html > ~/checklinks.html +<code bash> 
-   #rendu csv+linkchecker https://radeff.red/blog --output=html > ~/checklinks.html 
 +</code> 
 +==== rendu csv ==== 
 +<code bash>
    linkchecker https://radeff.red/blog --output=csv > ~/checklinks.csv    linkchecker https://radeff.red/blog --output=csv > ~/checklinks.csv
-    +</code> 
-   -oTYPE[/ENCODING], --output=TYPE[/ENCODING]+==== autres options ==== 
 +<code bash>    
 +   -o TYPE[/ENCODING], --output=TYPE[/ENCODING]
     Specify output type as text, html, sql, csv, gml, dot, xml, sitemap, none or blacklist. Default type is text. The various output types are documented below.     Specify output type as text, html, sql, csv, gml, dot, xml, sitemap, none or blacklist. Default type is text. The various output types are documented below.
     The ENCODING specifies the output encoding, the default is that of your locale. Valid encodings are listed at http://docs.python.org/library/codecs.html#standard-encodings.      The ENCODING specifies the output encoding, the default is that of your locale. Valid encodings are listed at http://docs.python.org/library/codecs.html#standard-encodings. 
          
     use --check-extern to check extern URLs.     use --check-extern to check extern URLs.
 +</code>
            
-<note warning>ATTENTION!</note> +<note warning>ATTENTION! récursion</note> 
-Par défaut, linkchecker lance une récursion infinie... Si votre site est gros, cela peut vite devenir une sacrée usine à gaz:+Par défaut, linkchecker lance une récursion infinie... Si votre site est gros, cela peut vite devenir une sacrée usine à gaz et méchamment charger votre serveur:
  
-<code>+<code bash>
 -rNUMBER, --recursion-level=NUMBER -rNUMBER, --recursion-level=NUMBER
     Check recursively all links up to given depth. A negative depth will enable infinite recursion. Default depth is infinite.      Check recursively all links up to given depth. A negative depth will enable infinite recursion. Default depth is infinite. 
 </code> </code>
  
-Pour limiter à un seul namespaceutiliser l'option **-r1** :+==== Pour limiter à un seul namespace (liens internes) ==== 
 + 
 +=== solution 1 === 
 +on va ici vérifier uniquement les liens de type www.monsite.ch/monrepertoire 
 + 
 +<code bash> 
 +linkchecker \ 
 +  --check-extern \ 
 +  --ignore-url="^https://www\.monsite\.ch/(?!monrepertoire/)"
 +  --ignore-url="^https://www\.monsite\.ch/monrepertoire/#"
 +  --no-status \ 
 +  --verbose \ 
 +  https://www.monsite.ch/monrepertoire/ 
 +</code> 
 +=== solution 2 === 
 +utiliser l'option **-r1** :
  
    linkchecker -r1 https://radeff.red/recettes/restaurants --output=html > ~/checklinks.html    linkchecker -r1 https://radeff.red/recettes/restaurants --output=html > ~/checklinks.html
  
  • info/linkchecker.1727105712.txt.gz
  • Dernière modification : 2024/09/23 17:35
  • de radeff