Vous n'êtes pas identifié(e).
L'icône rouge permet de télécharger chaque page du wiki visitée au format PDF et la grise au format ODT →
Ci-dessous, les différences entre deux révisions de la page.
Prochaine révision | Révision précédente Prochaine révision Les deux révisions suivantes | ||
atelier:arborescence [19/09/2013 15:24] kao créée |
atelier:arborescence [20/09/2013 15:07] captnfab [Mettre un tuto à sa place] |
||
---|---|---|---|
Ligne 1: | Ligne 1: | ||
====== Restructuration du Wiki ====== | ====== Restructuration du Wiki ====== | ||
- | ===== Nouvelle organisation ===== | + | <note info>Ce tuto ne concerne pas les rédacteurs du Wiki, qui doivent eux créer leur tutos dans l'[[:atelier:]] :-)</note> |
- | ==== Grandes lignes ==== | + | Le Wiki est en cours de réorganisation. Voici l'arborescence qui a été retenue et est en train d'être mise en place : |
+ | |||
+ | ===== Grandes lignes ===== | ||
* **Les pages des applications sont triées suivant la section Debian de leur paquet.** | * **Les pages des applications sont triées suivant la section Debian de leur paquet.** | ||
Ligne 9: | Ligne 11: | ||
* **Les noms des sections sont traduits et raccourcis pour ne pas faire des url à rallonge.** | * **Les noms des sections sont traduits et raccourcis pour ne pas faire des url à rallonge.** | ||
- | <note info> | ||
- | Pour identifier de quel paquet vient une application __installée__, on utilise ''dpkg -S //appli//''. | ||
- | Exemple : | + | ===== Arborescence ===== |
- | <code user>dpkg -S ifconfig</code> | + | |
- | ... | + | |
- | net-tools: /sbin/ifconfig | + | |
- | ... | + | |
- | + | ||
- | Nous indique que l'appli ''ifconfig'' est dans le paquet ''net-tools''. | + | |
- | </note> | + | |
- | <note info> | + | |
- | Pour identifier à quelle section appartient un paquet, on utilise ''apt-cache show //paquet// | grep "^Section"''. | + | |
- | + | ||
- | Exemple : | + | |
- | <code user>apt-cache show net-tools | grep "^Section"''</code> | + | |
- | Section: net | + | |
- | La page ''ifconfig'' est donc classée dans '':doc:net:ifconfig''. | + | |
- | </note> | + | |
- | + | ||
- | ==== Arborescence ==== | + | |
<note info>les éléments en gras représentent des dossiers</note> | <note info>les éléments en gras représentent des dossiers</note> | ||
Ligne 59: | Ligne 42: | ||
* Editors //Software to edit files. Programming environments.// | * Editors //Software to edit files. Programming environments.// | ||
* **environnements:** (Environnements de bureau) | * **environnements:** (Environnements de bureau) | ||
- | * Xfce //Xfce, a fast and lightweight Desktop Environment.// | + | * **xfce:** |
- | * KDE //The K Desktop Environment, a powerful, easy to use set of integrated applications.// | + | * Xfce //Xfce, a fast and lightweight Desktop Environment.// |
- | * GNOME //The GNOME desktop environment, a powerful, easy to use set of integrated applications.// | + | * **kde:** |
- | * X Window System software //X servers, libraries, fonts, window managers, terminal emulators and many related applications.// | + | * KDE //The K Desktop Environment, a powerful, easy to use set of integrated applications.// |
+ | * **gnome:** | ||
+ | * GNOME //The GNOME desktop environment, a powerful, easy to use set of integrated applications.// | ||
+ | * **x11:** | ||
+ | * X Window System software //X servers, libraries, fonts, window managers, terminal emulators and many related applications.// | ||
* **electronique:** | * **electronique:** | ||
* Electronics //Electronics utilities.// | * Electronics //Electronics utilities.// | ||
Ligne 139: | Ligne 126: | ||
* **:utilisateurs:** //Dossier contenant les pages créées par les utilisateurs.// | * **:utilisateurs:** //Dossier contenant les pages créées par les utilisateurs.// | ||
* **captnfab:** | * **captnfab:** | ||
+ | |||
+ | ===== Mettre un tuto à sa place ==== | ||
+ | |||
+ | <note info>Ce paragraphe s'adresse principalement aux modérateurs, seuls habilités à déplacer les tutos (et encore, pas encore :-P).</note> | ||
+ | |||
+ | ==== Identifier le paquet ==== | ||
+ | |||
+ | Pour identifier de quel paquet vient une application __installée__, on utilise ''dpkg -S //appli//''. | ||
+ | |||
+ | Exemple : | ||
+ | <code user>dpkg -S ifconfig</code> | ||
+ | ... | ||
+ | net-tools: /sbin/ifconfig | ||
+ | ... | ||
+ | |||
+ | Nous indique que l'appli ''ifconfig'' est dans le paquet ''net-tools''. | ||
+ | |||
+ | Pour une application qui n'est pas installée, il faudra utiliser ''apt-file''. | ||
+ | |||
+ | ==== Identifier la section ==== | ||
+ | |||
+ | Pour identifier à quelle section appartient un paquet, on utilise ''apt-cache show //paquet// | grep "^Section"''. | ||
+ | |||
+ | Exemple : | ||
+ | <code user>apt-cache show net-tools | grep "^Section"''</code> | ||
+ | Section: net | ||
+ | La page ''ifconfig'' est donc classée dans '':doc:net:ifconfig''. | ||
+ | |||
+ | ==== Exemple ==== | ||
+ | |||
+ | Ou pour une application, par exemple ''dvdauthor'' : | ||
+ | <file user> | ||
+ | apt-cache show dvdauthor | grep "^Section"''</file> | ||
+ | Section: video | ||
+ | |||
+ | Où l'on voit que que le tuto : **dvdauthor** sera créé dans la page '':doc:video:dvdauthor'' | ||
+ | |||
+ | ==== Automatisation ==== | ||
+ | |||
+ | Voici un script tentant d'automatiser la détection de la nouvelle adresse en fonction du nom de la page : | ||
+ | <code bash guess-new-path.sh>#!/bin/bash | ||
+ | set -e | ||
+ | set -x | ||
+ | set -u | ||
+ | |||
+ | APP=$1 | ||
+ | |||
+ | PACKAGE=$(apt-cache search -n '^'"$APP"'$' |cut -f1 -d' ') | ||
+ | |||
+ | if [ -z "$PACKAGE" ]; | ||
+ | then | ||
+ | PACKAGE=$(apt-file search -F -l "/usr/bin/$APP") | ||
+ | fi | ||
+ | |||
+ | if [ -z "$PACKAGE" ]; | ||
+ | then | ||
+ | PACKAGE=$(apt-file search -F -l "/bin/$APP") | ||
+ | fi | ||
+ | |||
+ | if [ -z "$PACKAGE" ]; | ||
+ | then | ||
+ | PACKAGE=$(apt-file search -F -l "/sbin/$APP") | ||
+ | fi | ||
+ | |||
+ | if [ -z "$PACKAGE" ]; | ||
+ | then | ||
+ | PACKAGE=$(apt-file search -F -l "/usr/sbin/$APP") | ||
+ | fi | ||
+ | |||
+ | if [ -z "$PACKAGE" ]; | ||
+ | then | ||
+ | echo "Paquet non-trouvé" | ||
+ | exit 1 | ||
+ | fi | ||
+ | |||
+ | SECTION=$(apt-cache show $PACKAGE | sed -n '/^Section/s/^Section: //p') | ||
+ | |||
+ | declare -A paths | ||
+ | |||
+ | paths["unknown"]="doc:autres" | ||
+ | paths["virtual"]="doc:autres" | ||
+ | paths["tasks"]="doc:" | ||
+ | paths["admin"]="doc:systeme" | ||
+ | paths["alien"]="doc:" | ||
+ | paths["base"]="doc:" | ||
+ | paths["cli-mono"]="doc:programmation" | ||
+ | paths["comm"]="doc:" | ||
+ | paths["database"]="doc:programmation" | ||
+ | paths["debug"]="doc:systeme" | ||
+ | paths["devel"]="doc:programmation" | ||
+ | paths["doc"]="doc:" | ||
+ | paths["editors"]="doc:editeurs" | ||
+ | paths["electronics"]="doc:electronique" | ||
+ | paths["embedded"]="doc:electronique" | ||
+ | paths["fonts"]="doc:media" | ||
+ | paths["games"]="doc:jeux" | ||
+ | paths["gnome"]="doc:environnements:gnome" | ||
+ | paths["gnu-r"]="doc:sciences" | ||
+ | paths["gnustep"]="doc:programmation" | ||
+ | paths["graphics"]="doc:media" | ||
+ | paths["hamradio"]="doc:media" | ||
+ | paths["haskell"]="doc:programmation" | ||
+ | paths["httpd"]="doc:reseau" | ||
+ | paths["interpreters"]="doc:programmation" | ||
+ | paths["java"]="doc:programmation" | ||
+ | paths["kernel"]="doc:systeme" | ||
+ | paths["kde"]="doc:environnements:kde" | ||
+ | paths["libdevel"]="doc:programmation" | ||
+ | paths["libs"]="doc:programmation" | ||
+ | paths["lisp"]="doc:programmation" | ||
+ | paths["localization"]="doc:systeme" | ||
+ | paths["mail"]="doc:reseau" | ||
+ | paths["math"]="doc:sciences" | ||
+ | paths["misc"]="doc:autres" | ||
+ | paths["net"]="doc:reseau" | ||
+ | paths["news"]="doc:reseau" | ||
+ | paths["ocaml"]="doc:programmation" | ||
+ | paths["oldlibs"]="doc:systeme" | ||
+ | paths["otherosfs"]="doc:systeme" | ||
+ | paths["perl"]="doc:programmation" | ||
+ | paths["php"]="doc:programmation" | ||
+ | paths["python"]="doc:programmation" | ||
+ | paths["ruby"]="doc:programmation" | ||
+ | paths["science"]="doc:sciences" | ||
+ | paths["shells"]="doc:programmation" | ||
+ | paths["sound"]="doc:media" | ||
+ | paths["tex"]="doc:sciences" | ||
+ | paths["text"]="doc:editeurs" | ||
+ | paths["utils"]="doc:systeme" | ||
+ | paths["video"]="doc:media" | ||
+ | paths["vcs"]="doc:systeme" | ||
+ | paths["web"]="doc:reseau" | ||
+ | paths["x11"]="doc:environnements:x11" | ||
+ | paths["xfce"]="doc:environnements:xfce" | ||
+ | paths["zope"]="doc:programmation" | ||
+ | paths["main"]="doc:" | ||
+ | paths["contrib"]="doc:" | ||
+ | paths["non-free"]="doc:" | ||
+ | paths["non-us"]="doc:" | ||
+ | |||
+ | NEWPATH=${paths[${SECTION}]}":"$APP | ||
+ | |||
+ | echo "Page=$APP Paquet=$PACKAGE Section=$SECTION NouveauNom=$NEWPATH"</code> |