Compare commits
No commits in common. 'master' and 'v2.4' have entirely different histories.
@ -0,0 +1,150 @@
|
||||
* text=auto !eol
|
||||
bin/autodoc.php -text
|
||||
bin/autodoc_helper.php -text
|
||||
/composer.json -text
|
||||
/installation.md -text
|
||||
src/autodoc/Application.php -text
|
||||
src/autodoc/Helpers/Command/FromDirectory.php -text
|
||||
src/autodoc/Helpers/Command/FromFile.php -text
|
||||
src/autodoc/Helpers/Command/FromPlugin.php -text
|
||||
src/autodoc/Helpers/Command/FromSpip.php -text
|
||||
src/autodoc/Helpers/Command/FromSvn.php -text
|
||||
src/autodoc/Helpers/Command/FromZone.php -text
|
||||
src/autodoc/Helpers/Generator.php -text
|
||||
src/autodoc/Helpers/Template/index.html -text
|
||||
src/autodoc/Helpers/phpdoc_helper.xml -text
|
||||
src/autodoc/Plugin/Core/Compiler/Pass/ApisCollector.php -text
|
||||
src/autodoc/Plugin/Core/Compiler/Pass/DirectoryTreeBuilder.php -text
|
||||
src/autodoc/Plugin/Core/Compiler/Pass/ErrorsCollector.php -text
|
||||
src/autodoc/Plugin/Core/Compiler/Pass/ExampleTagCorrector.php -text
|
||||
src/autodoc/Plugin/Core/Compiler/Pass/GetTopNav.php -text
|
||||
src/autodoc/Plugin/Core/Compiler/Pass/MarkersCollector.php -text
|
||||
src/autodoc/Plugin/Core/Compiler/Pass/SpipShare.php -text
|
||||
src/autodoc/Plugin/Core/Compiler/Pass/SpipTagsCollector.php -text
|
||||
src/autodoc/Plugin/Core/Compiler/Pass/Statistics.php -text
|
||||
src/autodoc/Plugin/Core/Compiler/Pass/UsedByTagBuilder.php -text
|
||||
src/autodoc/Plugin/Core/Compiler/Pass/VcsInformations/Svn.php -text
|
||||
src/autodoc/Plugin/Core/Compiler/Pass/VcsInformations/VcsInformationsAbstract.php -text
|
||||
src/autodoc/Plugin/Core/Compiler/Pass/VcsLinkBuilder.php -text
|
||||
src/autodoc/Plugin/Core/Compiler/Pass/VcsViewer/DefaultViewer.php -text
|
||||
src/autodoc/Plugin/Core/Compiler/Pass/VcsViewer/Redmine.php -text
|
||||
src/autodoc/Plugin/Core/Compiler/Pass/VcsViewer/Trac.php -text
|
||||
src/autodoc/Plugin/Core/Descriptor/ApiDescriptor.php -text
|
||||
src/autodoc/Plugin/Core/Descriptor/DirectoryDescriptor.php -text
|
||||
src/autodoc/Plugin/Core/Descriptor/Interfaces/DirectoryInterface.php -text
|
||||
src/autodoc/Plugin/Core/Descriptor/PipelineDescriptor.php -text
|
||||
src/autodoc/Plugin/Core/Descriptor/SpipTagDescriptor.php -text
|
||||
src/autodoc/Plugin/Core/Descriptor/UsedByTagDescriptor.php -text
|
||||
src/autodoc/Plugin/Core/Descriptor/Validator/ErrorCollector.php -text
|
||||
src/autodoc/Plugin/Core/ServiceProvider.php -text
|
||||
src/autodoc/Plugin/Core/Transformer/Router/UrlGenerator/Zora/ApiDescriptor.php -text
|
||||
src/autodoc/Plugin/Core/Transformer/Router/UrlGenerator/Zora/ConstantDescriptor.php -text
|
||||
src/autodoc/Plugin/Core/Transformer/Router/UrlGenerator/Zora/DirectoryDescriptor.php -text
|
||||
src/autodoc/Plugin/Core/Transformer/Router/UrlGenerator/Zora/FileDescriptor.php -text
|
||||
src/autodoc/Plugin/Core/Transformer/Router/UrlGenerator/Zora/FunctionDescriptor.php -text
|
||||
src/autodoc/Plugin/Core/Transformer/Router/UrlGenerator/Zora/PackageDescriptor.php -text
|
||||
src/autodoc/Plugin/Core/Transformer/Router/UrlGenerator/Zora/PipelineDescriptor.php -text
|
||||
src/autodoc/Plugin/Core/Transformer/Router/UrlGenerator/Zora/ProjectDescriptor.php -text
|
||||
src/autodoc/Plugin/Core/Transformer/Router/ZoraRouter.php -text
|
||||
src/autodoc/Plugin/Core/Transformer/Writer/FileCleaner.php -text
|
||||
src/autodoc/Plugin/Core/Transformer/Writer/FileConcat.php -text
|
||||
src/autodoc/Plugin/Core/TwigZora.php -text
|
||||
templates/zora/api.twig -text
|
||||
templates/zora/apis.twig -text
|
||||
templates/zora/balises.twig -text
|
||||
templates/zora/body.twig -text
|
||||
templates/zora/bootstrap/css/bootstrap.css -text
|
||||
templates/zora/bootstrap/css/bootstrap.min.css -text
|
||||
templates/zora/bootstrap/img/glyphicons-halflings-white.png -text
|
||||
templates/zora/bootstrap/img/glyphicons-halflings.png -text
|
||||
templates/zora/bootstrap/js/bootstrap.js -text
|
||||
templates/zora/bootstrap/js/bootstrap.min.js -text
|
||||
templates/zora/boucles.twig -text
|
||||
templates/zora/breadcrumb/directory.twig -text
|
||||
templates/zora/breadcrumb/package.twig -text
|
||||
templates/zora/class.twig -text
|
||||
templates/zora/classes.twig -text
|
||||
templates/zora/constantes.twig -text
|
||||
templates/zora/content/api.twig -text
|
||||
templates/zora/content/apis.twig -text
|
||||
templates/zora/content/balises.twig -text
|
||||
templates/zora/content/boucles.twig -text
|
||||
templates/zora/content/class.twig -text
|
||||
templates/zora/content/classes.twig -text
|
||||
templates/zora/content/constantes.twig -text
|
||||
templates/zora/content/criteres.twig -text
|
||||
templates/zora/content/deprecies.twig -text
|
||||
templates/zora/content/directory.twig -text
|
||||
templates/zora/content/dist.twig -text
|
||||
templates/zora/content/erreurs.twig -text
|
||||
templates/zora/content/file.twig -text
|
||||
templates/zora/content/filtres.twig -text
|
||||
templates/zora/content/marqueurs.twig -text
|
||||
templates/zora/content/package.twig -text
|
||||
templates/zora/content/packages.twig -text
|
||||
templates/zora/content/pipeline.twig -text
|
||||
templates/zora/content/pipelines.twig -text
|
||||
templates/zora/content/recherche.twig -text
|
||||
templates/zora/content/sommaire.twig -text
|
||||
templates/zora/content/statistiques.twig -text
|
||||
templates/zora/criteres.twig -text
|
||||
templates/zora/css/perso.css -text
|
||||
templates/zora/debug.twig -text
|
||||
templates/zora/deprecies.twig -text
|
||||
templates/zora/directory.twig -text
|
||||
templates/zora/erreurs.twig -text
|
||||
templates/zora/extra/dist.twig -text
|
||||
templates/zora/favicon.png -text
|
||||
templates/zora/file.twig -text
|
||||
templates/zora/filtres.twig -text
|
||||
templates/zora/footer/dist.twig -text
|
||||
templates/zora/head-js/dist.twig -text
|
||||
templates/zora/head/dist.twig -text
|
||||
templates/zora/header/dist.twig -text
|
||||
templates/zora/htaccess.twig -text
|
||||
templates/zora/images/api-32.png -text
|
||||
templates/zora/images/api-48.png -text
|
||||
templates/zora/images/deprecated-48.png -text
|
||||
templates/zora/images/loader-32.gif -text
|
||||
templates/zora/images/logo.png -text
|
||||
templates/zora/images/logo_mini.png -text
|
||||
templates/zora/images/logo_petit.png -text
|
||||
templates/zora/images/owl.png -text
|
||||
templates/zora/inclure/ariane_et_titre_standard.twig -text
|
||||
templates/zora/inclure/descriptions/argument.twig -text
|
||||
templates/zora/inclure/descriptions/constants.twig -text
|
||||
templates/zora/inclure/descriptions/functions.twig -text
|
||||
templates/zora/inclure/descriptions/group_content.twig -text
|
||||
templates/zora/inclure/descriptions/package.twig -text
|
||||
templates/zora/inclure/descriptions/package_link.twig -text
|
||||
templates/zora/inclure/descriptions/pipeline.twig -text
|
||||
templates/zora/inclure/descriptions/properties.twig -text
|
||||
templates/zora/inclure/descriptions/see.twig -text
|
||||
templates/zora/inclure/descriptions/summary.twig -text
|
||||
templates/zora/inclure/descriptions/tags.twig -text
|
||||
templates/zora/inclure/descriptions/types.twig -text
|
||||
templates/zora/inclure/head.twig -text
|
||||
templates/zora/inclure/liste/packages.twig -text
|
||||
templates/zora/inclure/liste/spiperies.twig -text
|
||||
templates/zora/inclure/liste/spiperies_with_tabs.twig -text
|
||||
templates/zora/inclure/nav-directory.twig -text
|
||||
templates/zora/inclure/nav.twig -text
|
||||
templates/zora/index.twig -text
|
||||
templates/zora/js/dygraph-combined.js -text
|
||||
templates/zora/js/jquery.min.js -text
|
||||
templates/zora/js/perso.js -text
|
||||
templates/zora/last_stat.twig -text
|
||||
templates/zora/marqueurs.twig -text
|
||||
templates/zora/more/dist.twig -text
|
||||
templates/zora/navigation.twig -text
|
||||
templates/zora/package.twig -text
|
||||
templates/zora/packages.twig -text
|
||||
templates/zora/pipeline.twig -text
|
||||
templates/zora/pipelines.twig -text
|
||||
templates/zora/recherche.twig -text
|
||||
templates/zora/recherche_data.twig -text
|
||||
templates/zora/statistiques.twig -text
|
||||
templates/zora/statistiques.txt -text
|
||||
templates/zora/structure.twig -text
|
||||
templates/zora/template.xml -text
|
||||
templates/zora/z_bloc.twig -text
|
@ -1,3 +0,0 @@
|
||||
/vendor
|
||||
/build
|
||||
/cache
|
@ -1,18 +0,0 @@
|
||||
#!/usr/bin/env php
|
||||
<?php
|
||||
/**
|
||||
* Autodoc.
|
||||
*
|
||||
* Usage simplifié pour SPIP de phpDocumentor.
|
||||
*/
|
||||
|
||||
$autoloader = __DIR__ . '/../vendor/autoload.php';
|
||||
|
||||
if (! file_exists($autoloader) || ! is_readable($autoloader)) {
|
||||
throw new \RuntimeException('Unable to find autoloader at ' . $autoloader);
|
||||
}
|
||||
|
||||
require $autoloader;
|
||||
|
||||
$app = new Spip\Autodoc\Application();
|
||||
$app->run();
|
@ -0,0 +1,17 @@
|
||||
#!/usr/bin/env php
|
||||
<?php
|
||||
/**
|
||||
* Autodoc.
|
||||
*
|
||||
* phpDocumentor pour le code source de SPIP
|
||||
*
|
||||
* Cet exécutable charge l'application autodoc (= phpdocumentor + plugins pour SPIP)
|
||||
* et utilise les mêmes arguments d'entrée que l'application phpDocumentor.
|
||||
*
|
||||
* Pour un usage simplifié, utiliser autodoc_helper.php
|
||||
*/
|
||||
|
||||
require_once __DIR__ . '/../src/autodoc/Application.php';
|
||||
|
||||
$app = new autodoc\Application();
|
||||
$app->run();
|
@ -0,0 +1,26 @@
|
||||
#!/usr/bin/env php
|
||||
<?php
|
||||
/**
|
||||
* Script pour simplifier l'usage de la génération de documentation
|
||||
* dans le cadre du code source SPIP
|
||||
*
|
||||
* Ce script crée les répertoires nécessaires à son fonctionnement
|
||||
* et utilise une configuration (phpdoc.xml) adaptée.
|
||||
*
|
||||
* Il nécessite un répertoire `work` accessible en écriture (le programme
|
||||
* tentera de le créer s'il est absent). Toutes les données de travail et
|
||||
* les productions seront mises dedans.
|
||||
*/
|
||||
|
||||
# charger l'autoloader
|
||||
require_once __DIR__ . '/../src/autodoc/Application.php';
|
||||
|
||||
# exécuter l'application
|
||||
$app = new \Cilex\Application('Autodoc Generator Helper', '1.0.0');
|
||||
$app->command(new autodoc\Helpers\Command\FromSpip());
|
||||
$app->command(new autodoc\Helpers\Command\FromPlugin());
|
||||
$app->command(new autodoc\Helpers\Command\FromZone());
|
||||
$app->command(new autodoc\Helpers\Command\FromSvn());
|
||||
$app->command(new autodoc\Helpers\Command\FromDirectory());
|
||||
$app->command(new autodoc\Helpers\Command\FromFile());
|
||||
$app->run();
|
@ -1,20 +1,12 @@
|
||||
{
|
||||
"name": "spip/autodoc",
|
||||
"name": "marcimat/autodoc",
|
||||
"autoload": {
|
||||
"psr-4":{
|
||||
"Spip\\Autodoc\\": "src/"
|
||||
"psr-0":{
|
||||
"autodoc": "src/"
|
||||
}
|
||||
},
|
||||
"require": {
|
||||
"php": "^8.1",
|
||||
"symfony/console": "^6.2",
|
||||
"symfony/filesystem": "^6.2",
|
||||
"psr/log": "^3.0",
|
||||
"league/pipeline": "^1.0",
|
||||
"twig/twig": "^3.5",
|
||||
"twig/string-extra": "^3.5"
|
||||
},
|
||||
"require-dev": {
|
||||
"symfony/var-dumper": "^6.2"
|
||||
"php": ">=5.3.3",
|
||||
"phpdocumentor/phpdocumentor": "2.4.0"
|
||||
}
|
||||
}
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,208 @@
|
||||
INSTALLATION de PHPDocumentor
|
||||
=============================
|
||||
|
||||
Dépendences du serveur :
|
||||
------------------------
|
||||
|
||||
php5-intl graphviz
|
||||
|
||||
Optionnellement (pour anciens templates xsl) : php5-xsl
|
||||
|
||||
|
||||
Installation :
|
||||
--------------
|
||||
|
||||
svn co svn://zone.spip.org/spip-zone/_galaxie_/code.spip.net/autodoc/trunk autodoc && cd autodoc
|
||||
curl -sS https://getcomposer.org/installer | php
|
||||
php composer.phar install
|
||||
cd ..
|
||||
|
||||
En fonction de l'usage et du contenu de phpdoc.xml, il faudra créer un/des répertoires avec accès en écriture.
|
||||
|
||||
* Avec l'application `autodoc/bin/autodoc_helper.php` :
|
||||
|
||||
mkdir work
|
||||
|
||||
* Avec l'executable `autodoc/bin/autodoc.php` (et en fonction du phpdoc.xml) :
|
||||
|
||||
mkdir output && mkdir log
|
||||
|
||||
|
||||
Mises à jour :
|
||||
--------------
|
||||
|
||||
cd autodoc && svn up
|
||||
php composer.phar self-update
|
||||
php composer.phar update
|
||||
cd ..
|
||||
|
||||
Notes sur les mises à jour:
|
||||
---------------------------
|
||||
|
||||
J'ai aperçu que phpDocumentor copie les fichiers du template utilisé
|
||||
dans son propre répertoire de templates. Il arrive que de vieux fichiers
|
||||
trainent. Il faut donc supprimer `autodoc/vendor/phpdocumentor/templates/zora`
|
||||
qui se recréera.
|
||||
|
||||
|
||||
USAGE
|
||||
=====
|
||||
|
||||
Il y a deux exécutables disponibles.
|
||||
|
||||
* L'un `autodoc.php` est l'équivalent de l'exécutable de phpdocumentor
|
||||
mais charge en plus le plugins SPIP pour phpdocumentor.
|
||||
|
||||
* L'autre `autodoc_helper.php` est une application simplifiant l'utilisation
|
||||
en préconfigurant les commandes à transmettre à l'exécutable.
|
||||
Elle gère également le téléchargement des sources PHP à documenter.
|
||||
|
||||
|
||||
Exécutable autodoc.php
|
||||
----------------------
|
||||
|
||||
Appel :
|
||||
|
||||
php autodoc/bin/autodoc.php
|
||||
|
||||
Le fonctionnement est exactement le même que le script `phpdoc.php`
|
||||
https://www.phpdoc.org/docs/latest/for-users/basic-usage.html
|
||||
|
||||
L'exécutable sans paramètre affiche la liste des actions et peut afficher,
|
||||
pour chaque action ses arguments et options possibles.
|
||||
|
||||
|
||||
|
||||
### Appeler le template `zora`
|
||||
|
||||
|
||||
Par commande :
|
||||
|
||||
php autodoc/bin/autodoc.php --template=autodoc/templates/zora
|
||||
|
||||
Par configuration :
|
||||
|
||||
php autodoc/bin/autodoc.php -c phpdoc.xml
|
||||
|
||||
Dans le fichier de configuration :
|
||||
|
||||
<phpdocumentor>
|
||||
[...]
|
||||
<transformations>
|
||||
<template name="autodoc/templates/zora">
|
||||
<!-- template name="responsive-twig"/ -->
|
||||
<!-- template name="clean"/ -->
|
||||
</transformations>
|
||||
</phpdocumentor>
|
||||
|
||||
|
||||
|
||||
### Autres options de configuration
|
||||
|
||||
|
||||
Dans le fichier `phpdoc.xml` il est possible de définir les options suivantes
|
||||
qui agissent uniquement avec le template Zora :
|
||||
|
||||
<options>
|
||||
<site value="https://code.spip.net/" />
|
||||
<chemin value="autodoc/" />
|
||||
<proposer value="oui" />
|
||||
<titre value="Documentation du code de SPIP." />
|
||||
<introduction value="Documentation du code PHP de SPIP." />
|
||||
<presentation value="Cette documentation est extraite du code source PHP de la version en développement de SPIP." />
|
||||
<titre_onglets value="Autodoc" />
|
||||
<topnav value="https://boussole.spip.net/?page=spipnav.js&lang=fr" />
|
||||
</options>
|
||||
|
||||
- site :
|
||||
si présent, le lien clicable du logo et du titre dans l'entête des pages renvoie vers cette URL.
|
||||
sinon, par défaut, cela renvoie vers le sommaire de la documentation automatique générée.
|
||||
- chemin :
|
||||
sert uniquement pour le .htaccess généré dans le cadre d'un site spip avec l'option site déclarée.
|
||||
Permet de rediriger @fonction sur l'url de la fonction
|
||||
- proposer :
|
||||
si présent, des boutons «proposer une amélioration» sont ajoutés sous certaines descriptions
|
||||
d'éléments. Ces liens pointent sur l'URL donnée par le paramètre site, sous entendant que c'est
|
||||
un site SPIP ayant activé le plugin Zora Docblock (préfixe zoradocblock), qui permet de gérer
|
||||
ces demandes d'amélioration.
|
||||
- titre :
|
||||
si présent, définit le titre affiché dans l'entête de page par ce texte.
|
||||
- description :
|
||||
si présent, ajoute cette information sur le sommaire de la documentation automatique générée.
|
||||
- presentation :
|
||||
si présent, ajoute cette information sur le sommaire de la documentation automatique générée.
|
||||
- titre_onglets :
|
||||
si présent, utilise ce titre dans la barre de navigation
|
||||
- topnav :
|
||||
Ajoute le contenu de topnav transmis par le script javascript retourné par l'url indiquée.
|
||||
Le script JS retourné ajoute le HTML de la topnav, sa CSS, ainsi qu'une classe
|
||||
HTML avec_boussole_topnav sur la balise <html>.
|
||||
|
||||
|
||||
|
||||
Exécutable autodoc_helper.php
|
||||
-----------------------------
|
||||
|
||||
Appel :
|
||||
|
||||
php autodoc/bin/autodoc_helper.php
|
||||
|
||||
L'exécutable sans paramètre affiche la liste des actions et peut afficher,
|
||||
pour chaque action ses arguments et options possibles.
|
||||
|
||||
|
||||
### Quelques commandes et exemples
|
||||
|
||||
|
||||
#### from:directory
|
||||
|
||||
Générer la documentation depuis un répertoire quelconque.
|
||||
Par défaut, la sortie est enregistrée dans le répertoire `work/output/default`
|
||||
|
||||
php autodoc/bin/autodoc_helper.php from:directory /home/marcimat/www/spip-dev
|
||||
|
||||
Forcer un préfixe de sortie ici dans `work/output/spip-dev` :
|
||||
|
||||
php autodoc/bin/autodoc_helper.php from:directory /home/marcimat/www/spip-dev --prefixe=spip-dev
|
||||
|
||||
|
||||
#### from:svn
|
||||
|
||||
Générer la documentation depuis une source SVN quelconque.
|
||||
|
||||
php autodoc/bin/autodoc_helper.php from:svn svn://trac.rezo.net/spip/spip
|
||||
|
||||
|
||||
#### from:spip
|
||||
|
||||
Générer la documentation depuis le svn du core
|
||||
|
||||
php autodoc/bin/autodoc_helper.php from:spip spip
|
||||
php autodoc/bin/autodoc_helper.php from:spip branches/spip-3.0
|
||||
|
||||
|
||||
#### from:zone
|
||||
|
||||
Générer la documentation depuis le svn de la zone
|
||||
|
||||
php autodoc/bin/autodoc_helper.php from:zone _plugins_/fabrique/trunk
|
||||
|
||||
|
||||
#### from:plugin
|
||||
|
||||
Générer la documentation depuis le svn _plugins_ de la zone
|
||||
|
||||
php autodoc/bin/autodoc_helper.php from:plugin fabrique/trunk
|
||||
|
||||
|
||||
#### from:file
|
||||
|
||||
Générer des documentations dont les sources sont indiquées dans un fichier.
|
||||
|
||||
Par défaut, utilise le fichier svn de la zone.
|
||||
|
||||
php autodoc/bin/autodoc_helper.php from:file
|
||||
php autodoc/bin/autodoc_helper.php from:file autodoc.txt
|
||||
php autodoc/bin/autodoc_helper.php from:file svn://zone.spip.org/spip-zone/autodoc.txt
|
||||
|
||||
|
@ -1,19 +0,0 @@
|
||||
{% extends 'layout.html.twig' %}
|
||||
|
||||
{% block javascripts %}
|
||||
{{ parent() }}
|
||||
{%- if project.settings.custom['js.topnav'] %}
|
||||
<script type="text/javascript">
|
||||
(function () {
|
||||
var d = document,
|
||||
g = d.createElement('script'),
|
||||
s = d.getElementsByTagName('script')[0];
|
||||
g.type = 'text/javascript';
|
||||
g.defer = true;
|
||||
g.async = true;
|
||||
g.src ="{{ project.settings.custom['js.topnav']|raw }}";
|
||||
s.parentNode.insertBefore(g, s);
|
||||
})();
|
||||
</script>
|
||||
{%- endif -%}
|
||||
{% endblock %}
|
@ -1,17 +0,0 @@
|
||||
<aside class="phpdocumentor-element-found-in">
|
||||
<abbr class="phpdocumentor-element-found-in__file" title="{{ node.file.path }}">{{ node.file|route('file:short') }}</abbr>
|
||||
:
|
||||
<span class="phpdocumentor-element-found-in__line">{{ node.line }}</span>
|
||||
|
||||
{% if project.settings.custom['package.url_repository'] %}
|
||||
{% set custom = project.settings.custom %}
|
||||
{% set url = custom['package.url_repository']|replace({'.git': ''}) %}
|
||||
{% set url = url ~ '/src/branch/%s/%s'|format(custom['package.branch'], node.file.path) %}
|
||||
{% set url = url ~ '#L%s'|format( node.line ) %}
|
||||
<a href="{{ url }}" class="phpdocumentor-element-found-in__repository">Source</a>
|
||||
{% endif %}
|
||||
|
||||
{% if node.file.source %}
|
||||
<a href="{{ target_path }}#source-view.{{ node.line }}" class="phpdocumentor-element-found-in__source" data-line="{{ node.line }}" data-modal="source-view"></a>
|
||||
{% endif %}
|
||||
</aside>
|
@ -1,16 +0,0 @@
|
||||
{% extends 'components/header_origin.html.twig' %}
|
||||
|
||||
{% block before_header %}
|
||||
<header class="autodoc-header">
|
||||
<div class='autodoc-container'>
|
||||
<div class="autodoc-title">
|
||||
<h1><a class="autodoc-url link-in" href="{{ project.settings.custom['header.url'] }}">{{ project.settings.custom['header.title'] }}</a></h1>
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
<div class="autodoc-navbar">
|
||||
<div class="autodoc-container">
|
||||
<strong class="autodoc-subtitle">{{ project.settings.custom['header.subtitle'] }}</strong>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
@ -1,10 +0,0 @@
|
||||
{% block before_header %}{% endblock %}
|
||||
<header class="phpdocumentor-header phpdocumentor-section">
|
||||
{% include 'components/header-title.html.twig' %}
|
||||
<input class="phpdocumentor-header__menu-button" type="checkbox" id="menu-button" name="menu-button" />
|
||||
<label class="phpdocumentor-header__menu-icon" for="menu-button">
|
||||
<i class="fas fa-bars"></i>
|
||||
</label>
|
||||
{{ include('components/search.html.twig') }}
|
||||
{% include 'components/topnav.html.twig' %}
|
||||
</header>
|
@ -1,21 +0,0 @@
|
||||
|
||||
{% if depth == 1 %}
|
||||
<h4 class="phpdocumentor-sidebar__root-namespace">
|
||||
<a href="{{ entry.url }}" class="{{ destinationPath|trim('/', 'left') == entry.url ? '-active' }}">{{ entry.title | shortFQSEN }}</a>
|
||||
{% if entry.children.count == 1 %}
|
||||
{% set entry = entry.children|first %}
|
||||
<span class="phpdocumentor-sidebar__root-separator">/</span>
|
||||
<a href="{{ entry.url }}" class="{{ destinationPath|trim('/', 'left') == entry.url ? '-active' }}">{{ entry.title | shortFQSEN }}</a>
|
||||
{% endif %}
|
||||
</h4>
|
||||
{% endif %}
|
||||
{% if entry.children.count > 0 %}
|
||||
<ul class="phpdocumentor-list">
|
||||
{% for child in entry.children|sort((a, b) => a.title|lower <=> b.title|lower) %}
|
||||
<li>
|
||||
<a href="{{ child.url }}" class="{{ destinationPath|trim('/', 'left') == child.url ? '-active' }}">{{ child.title | shortFQSEN }}</a>
|
||||
{{ toc(child, 'components/menu.html.twig', maxDepth, depth) }}
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endif %}
|
@ -1,71 +0,0 @@
|
||||
{% extends 'components/sidebar_origin.html.twig' %}
|
||||
|
||||
{% block intro %}
|
||||
|
||||
<div class='phpdocumentor-sidebar__intro'>
|
||||
{% if project.settings.custom['package.slogan'] %}
|
||||
<p class='phpdocumentor-sidebar__slogan'>
|
||||
{{- project.settings.custom['package.slogan'] -}}
|
||||
</p>
|
||||
{% endif %}
|
||||
|
||||
{% if project.settings.custom['package.version'] %}
|
||||
<p class='phpdocumentor-sidebar__version'>
|
||||
Version <strong>{{ project.settings.custom['package.version'] }}</strong>
|
||||
{% if project.settings.custom['package.revision'] %}
|
||||
({{ project.settings.custom['package.revision'] }})
|
||||
{% endif %}
|
||||
</p>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
{#
|
||||
{% if project.settings.custom['package.description'] %}
|
||||
<div class='phpdocumentor-sidebar__description'>
|
||||
{{- project.settings.custom['package.description'] -}}
|
||||
</div>
|
||||
{% endif %}
|
||||
#}
|
||||
|
||||
{% if
|
||||
project.settings.custom['package.url_package']
|
||||
or project.settings.custom['package.url_documentation']
|
||||
or project.settings.custom['package.url_development']
|
||||
or project.settings.custom['package.url_repository']
|
||||
%}
|
||||
<section class="phpdocumentor-sidebar__category">
|
||||
<h2 class="phpdocumentor-sidebar__category-header">Links</h2>
|
||||
{% if project.settings.custom['package.url_package'] %}
|
||||
<h3 class="phpdocumentor-sidebar__root-package">
|
||||
<a class="link-out" href="{{ project.settings.custom['package.url_package'] }}">Plugins.spip.net</a>
|
||||
</h3>
|
||||
{% endif %}
|
||||
{% if project.settings.custom['package.url_documentation'] %}
|
||||
<h3 class="phpdocumentor-sidebar__root-package">
|
||||
<a class="link-out" href="{{ project.settings.custom['package.url_documentation'] }}">Documentation</a>
|
||||
</h3>
|
||||
{% endif %}
|
||||
{% if project.settings.custom['package.url_repository'] %}
|
||||
<h3 class="phpdocumentor-sidebar__root-package">
|
||||
<a class="link-out" href="{{ project.settings.custom['package.url_repository'] }}">Forge</a>
|
||||
</h3>
|
||||
{% endif %}
|
||||
{% if
|
||||
project.settings.custom['package.url_development']
|
||||
and (project.settings.custom['package.url_repository'] != project.settings.custom['package.url_development'])
|
||||
%}
|
||||
<h3 class="phpdocumentor-sidebar__root-package">
|
||||
<a class="link-out" href="{{ project.settings.custom['package.url_development'] }}">Développement</a>
|
||||
</h3>
|
||||
{% endif %}
|
||||
</section>
|
||||
{% endif %}
|
||||
|
||||
{% endblock %}
|
||||
|
||||
|
||||
{% block outro %}
|
||||
<div class='phpdocumentor-sidebar__outro'>
|
||||
<p class='phpdocumentor-sidebar__date'>Documentation générée le {{ 'now'|date('d m Y', "Europe/Paris") }} à {{ 'now'|date('H\\hi', "Europe/Paris") }}</p>
|
||||
</div>
|
||||
{% endblock %}
|
@ -1,35 +0,0 @@
|
||||
<input class="phpdocumentor-sidebar__menu-button" type="checkbox" id="sidebar-button" name="sidebar-button" />
|
||||
<label class="phpdocumentor-sidebar__menu-icon" for="sidebar-button">
|
||||
Menu
|
||||
</label>
|
||||
<aside class="phpdocumentor-column -four phpdocumentor-sidebar">
|
||||
{% block intro %}{% endblock %}
|
||||
|
||||
{% for version in project.versions %}
|
||||
{% for toc in version.tableOfContents %}
|
||||
<section class="phpdocumentor-sidebar__category">
|
||||
<h2 class="phpdocumentor-sidebar__category-header">{{ toc.name }}</h2>
|
||||
{% for root in toc.roots|sort((a, b) => a.title|lower <=> b.title|lower) %}
|
||||
{{ toc(root, 'components/menu.html.twig', 1) }}
|
||||
{% endfor %}
|
||||
</section>
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
|
||||
<section class="phpdocumentor-sidebar__category">
|
||||
<h2 class="phpdocumentor-sidebar__category-header">Reports</h2>
|
||||
{% if project.settings.custom['graphs.enabled'] %}
|
||||
<h3 class="phpdocumentor-sidebar__root-package"><a href="graphs/classes.html">Class Diagram</a></h3>
|
||||
{% endif %}
|
||||
<h3 class="phpdocumentor-sidebar__root-package"><a href="reports/deprecated.html">Deprecated</a></h3>
|
||||
<h3 class="phpdocumentor-sidebar__root-package"><a href="reports/errors.html">Errors</a></h3>
|
||||
<h3 class="phpdocumentor-sidebar__root-package"><a href="reports/markers.html">Markers</a></h3>
|
||||
</section>
|
||||
|
||||
<section class="phpdocumentor-sidebar__category">
|
||||
<h2 class="phpdocumentor-sidebar__category-header">Indices</h2>
|
||||
<h3 class="phpdocumentor-sidebar__root-package"><a href="indices/files.html">Files</a></h3>
|
||||
</section>
|
||||
|
||||
{% block outro %}{% endblock %}
|
||||
</aside>
|
File diff suppressed because one or more lines are too long
@ -1,126 +0,0 @@
|
||||
:root {
|
||||
/* Typography */
|
||||
--font-primary: 'Source Sans Pro', Helvetica, Arial, sans-serif;
|
||||
--font-secondary: 'Source Sans Pro', Helvetica, Arial, sans-serif;
|
||||
--font-monospace: 'Source Code Pro', monospace;
|
||||
--line-height--primary: 1.6;
|
||||
--letter-spacing--primary: .05rem;
|
||||
--text-base-size: 1em;
|
||||
--text-scale-ratio: 1.2;
|
||||
|
||||
--text-xxs: calc(var(--text-base-size) / var(--text-scale-ratio) / var(--text-scale-ratio) / var(--text-scale-ratio));
|
||||
--text-xs: calc(var(--text-base-size) / var(--text-scale-ratio) / var(--text-scale-ratio));
|
||||
--text-sm: calc(var(--text-base-size) / var(--text-scale-ratio));
|
||||
--text-md: var(--text-base-size);
|
||||
--text-lg: calc(var(--text-base-size) * var(--text-scale-ratio));
|
||||
--text-xl: calc(var(--text-base-size) * var(--text-scale-ratio) * var(--text-scale-ratio));
|
||||
--text-xxl: calc(var(--text-base-size) * var(--text-scale-ratio) * var(--text-scale-ratio) * var(--text-scale-ratio));
|
||||
--text-xxxl: calc(var(--text-base-size) * var(--text-scale-ratio) * var(--text-scale-ratio) * var(--text-scale-ratio) * var(--text-scale-ratio));
|
||||
--text-xxxxl: calc(var(--text-base-size) * var(--text-scale-ratio) * var(--text-scale-ratio) * var(--text-scale-ratio) * var(--text-scale-ratio) * var(--text-scale-ratio));
|
||||
--text-xxxxxl: calc(var(--text-base-size) * var(--text-scale-ratio) * var(--text-scale-ratio) * var(--text-scale-ratio) * var(--text-scale-ratio) * var(--text-scale-ratio) * var(--text-scale-ratio));
|
||||
|
||||
/* Colors */
|
||||
--primary-color-hue: 96;
|
||||
--primary-color-saturation: 57%;
|
||||
--primary-color: hsl(var(--primary-color-hue), var(--primary-color-saturation), 60%);
|
||||
--primary-color-darken: hsl(var(--primary-color-hue), var(--primary-color-saturation), 40%);
|
||||
--primary-color-darker: hsl(var(--primary-color-hue), var(--primary-color-saturation), 20%);
|
||||
--primary-color-darkest: hsl(var(--primary-color-hue), var(--primary-color-saturation), 10%);
|
||||
--primary-color-lighten: hsl(var(--primary-color-hue), var(--primary-color-saturation), 80%);
|
||||
--primary-color-lighter: hsl(var(--primary-color-hue), var(--primary-color-saturation), 99%);
|
||||
--dark-gray: #d1d1d1;
|
||||
--light-gray: #f0f0f0;
|
||||
|
||||
--text-color: var(--primary-color-darkest);
|
||||
|
||||
--header-height: var(--spacing-xxxxl);
|
||||
--header-bg-color: var(--primary-color);
|
||||
--code-background-color: var(--primary-color-lighter);
|
||||
--code-border-color: --primary-color-lighten;
|
||||
--button-border-color: var(--primary-color-darken);
|
||||
--button-color: transparent;
|
||||
--button-color-primary: var(--primary-color);
|
||||
--button-text-color: #555;
|
||||
--button-text-color-primary: white;
|
||||
--popover-background-color: rgba(255, 255, 255, 0.75);
|
||||
--link-color-primary: var(--primary-color-darken);
|
||||
--link-hover-color-primary: var(--primary-color-darker);
|
||||
--form-field-border-color: var(--dark-gray);
|
||||
--form-field-color: #fff;
|
||||
--admonition-success-color: var(--primary-color);
|
||||
--admonition-border-color: silver;
|
||||
--table-separator-color: var(--primary-color-lighten);
|
||||
--title-text-color: var(--primary-color);
|
||||
|
||||
--sidebar-border-color: var(--primary-color-lighten);
|
||||
|
||||
/* Grid */
|
||||
--container-width: 1400px;
|
||||
|
||||
/* Spacing */
|
||||
--spacing-base-size: 1rem;
|
||||
--spacing-scale-ratio: 1.5;
|
||||
|
||||
--spacing-xxxs: calc(var(--spacing-base-size) / var(--spacing-scale-ratio) / var(--spacing-scale-ratio) / var(--spacing-scale-ratio) / var(--spacing-scale-ratio));
|
||||
--spacing-xxs: calc(var(--spacing-base-size) / var(--spacing-scale-ratio) / var(--spacing-scale-ratio) / var(--spacing-scale-ratio));
|
||||
--spacing-xs: calc(var(--spacing-base-size) / var(--spacing-scale-ratio) / var(--spacing-scale-ratio));
|
||||
--spacing-sm: calc(var(--spacing-base-size) / var(--spacing-scale-ratio));
|
||||
--spacing-md: var(--spacing-base-size);
|
||||
--spacing-lg: calc(var(--spacing-base-size) * var(--spacing-scale-ratio));
|
||||
--spacing-xl: calc(var(--spacing-base-size) * var(--spacing-scale-ratio) * var(--spacing-scale-ratio));
|
||||
--spacing-xxl: calc(var(--spacing-base-size) * var(--spacing-scale-ratio) * var(--spacing-scale-ratio) * var(--spacing-scale-ratio));
|
||||
--spacing-xxxl: calc(var(--spacing-base-size) * var(--spacing-scale-ratio) * var(--spacing-scale-ratio) * var(--spacing-scale-ratio) * var(--spacing-scale-ratio));
|
||||
--spacing-xxxxl: calc(var(--spacing-base-size) * var(--spacing-scale-ratio) * var(--spacing-scale-ratio) * var(--spacing-scale-ratio) * var(--spacing-scale-ratio) * var(--spacing-scale-ratio));
|
||||
|
||||
--border-radius-base-size: 3px;
|
||||
}
|
||||
|
||||
/* Custom vars */
|
||||
:root {
|
||||
/* #7a4482; hsl(292, 31%, 39%); */
|
||||
--spip-primary-color: #7a4482;
|
||||
|
||||
--primary-color-hue: 292;
|
||||
--primary-color-saturation: 31%;
|
||||
--primary-color-lighter: hsl(var(--primary-color-hue), var(--primary-color-saturation), 98%);
|
||||
|
||||
--spip-name-color: #e05a00;
|
||||
--spip-type-color: #5a852a;
|
||||
--spip-visibility-color: #0d73bc;
|
||||
--spip-argument-color: #93347f;
|
||||
--spip-argument-value-color: #637986;
|
||||
|
||||
--spip-dark-color: hsl(var(--primary-color-hue), 20%, 45%);
|
||||
--spip-tag-color: var(--spip-dark-color);
|
||||
|
||||
--spip-padding-x: 1rem;
|
||||
--spip-padding-y: 1rem;
|
||||
--spip-padding-x-neg: calc(-1 * var(--spip-padding-x));
|
||||
--spip-padding-y-neg: calc(-1 * var(--spip-padding-y));
|
||||
|
||||
--spip-border-size: 3px;
|
||||
--spip-border-radius: 10px;
|
||||
|
||||
/* header */
|
||||
--theme-color: #660e5c;
|
||||
--theme-color--light: #a887b8;
|
||||
--theme-gray-light: #d4d4d4;
|
||||
--theme-gray-lighten: #f2f2f2;
|
||||
--theme-gray-lighter: #fafafa;
|
||||
|
||||
--logo-width: 176px;
|
||||
--logo-height: 122px;
|
||||
--logo-top: 0px;
|
||||
--logo-left: -10px;
|
||||
--logo-indent-title: 170px;
|
||||
--logo-indent-slogan: 170px;
|
||||
}
|
||||
@media (max-width: 600px) {
|
||||
:root{
|
||||
--logo-width: 88px;
|
||||
--logo-height: 61px;
|
||||
--logo-top: 15px;
|
||||
--logo-indent-title: 80px;
|
||||
--logo-indent-slogan: 0px;
|
||||
}
|
||||
}
|
@ -1 +0,0 @@
|
||||
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"><rect x="-3.05176e-05" y="9.99998" width="14.1422" height="14.1422" transform="rotate(-45 -3.05176e-05 9.99998)" fill="{{'#'|url_encode}}7a4482"/></svg>
|
Before Width: | Height: | Size: 248 B |
@ -1 +0,0 @@
|
||||
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"><circle cx="10" cy="10" r="10" fill="{{'#'|url_encode}}7a4482"/></svg>
|
Before Width: | Height: | Size: 166 B |
Binary file not shown.
Before Width: | Height: | Size: 15 KiB |
@ -1,28 +0,0 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* autodoc : phpDocumentor pour SPIP
|
||||
*/
|
||||
|
||||
namespace Spip\Autodoc;
|
||||
|
||||
use Symfony\Component\Console\Application as ConsoleApplication;
|
||||
|
||||
class Application extends ConsoleApplication
|
||||
{
|
||||
public const VERSION = '2.0.0';
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct('Autodoc', self::VERSION);
|
||||
|
||||
// liste des commandes
|
||||
$this->add(new Command\FromSpip());
|
||||
$this->add(new Command\FromPlugin());
|
||||
$this->add(new Command\FromZone());
|
||||
$this->add(new Command\FromGit());
|
||||
$this->add(new Command\FromDirectory());
|
||||
$this->add(new Command\FromFile());
|
||||
$this->add(new Command\MakeIndex());
|
||||
}
|
||||
}
|
@ -1,82 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace Spip\Autodoc;
|
||||
|
||||
use Psr\Log\LoggerInterface;
|
||||
use Psr\Log\NullLogger;
|
||||
|
||||
class Checkout
|
||||
{
|
||||
/** Directory name */
|
||||
private string $destination;
|
||||
/** Path where we will run the checkout command */
|
||||
private string $root;
|
||||
/** Path of checkout executable */
|
||||
private string $checkout;
|
||||
|
||||
private LoggerInterface $logger;
|
||||
|
||||
public function __construct(string $dir, ?LoggerInterface $logger = null)
|
||||
{
|
||||
$this->destination = basename($dir);
|
||||
// the checkout command is run from parent directory
|
||||
$this->root = dirname($dir);
|
||||
$this->logger = $logger ?? new NullLogger();
|
||||
$this->checkout = $this->findCommand('checkout') ?? throw new \RuntimeException('Checkout not found.');
|
||||
}
|
||||
|
||||
public function run(string $command)
|
||||
{
|
||||
$cmd = "cd {$this->root} && {$this->checkout} $command {$this->destination} 2> /dev/null";
|
||||
$this->logger->info($cmd);
|
||||
exec($cmd, $res, $error);
|
||||
$this->logger->info(implode("\n", $res));
|
||||
if ($error) {
|
||||
$this->logger->error($error);
|
||||
return false;
|
||||
}
|
||||
return $res;
|
||||
}
|
||||
|
||||
public function read()
|
||||
{
|
||||
return $this->run('--read');
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrouver des infos du git
|
||||
*/
|
||||
public function readGit(): Git
|
||||
{
|
||||
// Ici, on a les bons fichiers Git à jour
|
||||
// on récupère le numéro de dernière révision
|
||||
if ($res = $this->read()) {
|
||||
$res = trim($res[0]);
|
||||
$res = explode(' ', $res);
|
||||
$git = new Git($res[4]);
|
||||
$git->setCommit(substr($res[2], 2)); // -r{commit}
|
||||
$git->setBranch(substr($res[3], 2)); // -b{branch}
|
||||
return $git;
|
||||
}
|
||||
return new Git();
|
||||
}
|
||||
|
||||
/**
|
||||
* Obtient le chemin d'un executable sur le serveur
|
||||
*/
|
||||
private function findCommand(string $command): string
|
||||
{
|
||||
static $commands = [];
|
||||
if (array_key_exists($command, $commands)) {
|
||||
return $commands[$command];
|
||||
}
|
||||
|
||||
exec("command -v $command", $result, $err);
|
||||
if (!$err and count($result) and $cmd = trim($result[0])) {
|
||||
return $commands[$command] = $cmd;
|
||||
}
|
||||
|
||||
$this->logger->error("Command '$command' not found");
|
||||
return $commands[$command] = '';
|
||||
}
|
||||
}
|
@ -1,79 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace Spip\Autodoc;
|
||||
|
||||
use JsonSerializable;
|
||||
|
||||