[odt2spip ↪ refactoring] 13 commits

spip-contrib-extensions/odt2spip | 13 commits

Par bricebou, le 3 septembre 2025 à 21h53min :

docs: ajout d’un README

Ajouté
README.md

Détails : docs: ajout d'un README (268f3866) · Validations · spip-contrib-extensions / odt2spip · GitLab

==============================
Par bricebou, le 3 septembre 2025 à 21h50min :

test: ménage et mise au propre des tests

Ajouté
tests/data/conversion.docx
tests/data/parser/image_cropped.odt
tests/data/parser/image_cropped/META-INF/manifest.xml
tests/data/parser/image_cropped/Pictures/10000000000000FA000000FAE3324FA5.jpg
tests/data/parser/image_cropped/Thumbnails/thumbnail.png
tests/data/parser/image_cropped/content.xml
tests/data/parser/image_cropped/manifest.rdf
tests/data/parser/image_cropped/meta.xml
tests/data/parser/image_cropped/mimetype
tests/data/parser/image_cropped/settings.xml
tests/data/parser/image_cropped/styles.xml
Supprimé
phpunit.depending.xml.dist
tests/content_math_objet1.xml
tests/content_math_objet2.xml
tests/content_math_objet3.xml
tests/content_test_complet.xml
tests/content_test_complet_indente.xml
tests/test_complet.odt
Modifié
composer.json
tests/Integration/Parser/ParserTest.php
tests/Integration/Parser/Processors/ImageProcessorTest.php
tests/data/parser/global.odt
tests/data/parser/global.spip.txt
tests/data/parser/global/META-INF/manifest.xml
tests/data/parser/global/Thumbnails/thumbnail.png
tests/data/parser/global/content.xml
tests/data/parser/global/meta.xml
tests/data/parser/global/settings.xml
tests/data/parser/global/styles.xml

Détails : test: ménage et mise au propre des tests (d96302b0) · Validations · spip-contrib-extensions / odt2spip · GitLab

==============================
Par bricebou, le 3 septembre 2025 à 21h47min :

feat: gérer a minima les images recadrées dans libreoffice

Modifié
src/Parser/OdtParser.php
src/Parser/Processors/ImageProcessor.php

Détails : feat: gérer a minima les images recadrées dans libreoffice (2dd95820) · Validations · spip-contrib-extensions / odt2spip · GitLab

==============================
Par bricebou, le 3 septembre 2025 à 21h44min :

remove: un peu de ménage…

Supprimé
inc/convertir_avec_libreoffice.php
inc/libreoffice.php
inc/odt2spip.php
inc/odt2spip.xsl
inc/odt2spip_generer_sortie.php
inc/xsltml/README
inc/xsltml/cmarkup.xsl
inc/xsltml/entities.xsl
inc/xsltml/glayout.xsl
inc/xsltml/mmltex.xsl
inc/xsltml/scripts.xsl
inc/xsltml/tables.xsl
inc/xsltml/tokens.xsl
Modifié
formulaires/configurer_odt2spip.php

Détails : remove: un peu de ménage... (675e3948) · Validations · spip-contrib-extensions / odt2spip · GitLab

==============================
Par bricebou, le 1er septembre 2025 à 21h57min :

refactor: conversion via Libreoffice localement ou via API

Ajouté
lang/odt2spip_fr.php
src/Converters/ApiConverter.php
src/Converters/ConverterFactory.php
src/Converters/LibreofficeConverter.php
src/Enums/ConverterEnum.php
src/Exceptions/ConverterException.php
src/Interfaces/ConverterInterface.php
src/Utils/ConverterUtils.php
src/Utils/FileUtils.php
tests/Integration/Utils/FileUtilsTest.php
Modifié
action/api_convert_to.php
formulaires/document2spip.php
phpstan-baseline.neon
src/Odt2Spip.php
src/Parser/OdtParser.php
src/Parser/Processors/DrawProcessor.php
tests/Integration/Parser/ParserTest.php
tests/Integration/Parser/Processors/DrawProcessorTest.php
tests/Integration/Parser/Processors/ImageProcessorTest.php
tests/Integration/Parser/Processors/TableProcessorTest.php
tests/Integration/Parser/Processors/TextProcessorTest.php

Détails : refactor: conversion via Libreoffice localement ou via API (cbd5e6c7) · Validations · spip-contrib-extensions / odt2spip · GitLab

==============================
Par bricebou, le 31 août 2025 à 14h09min :

chore: mise à jour de la baseline de phpstan

Modifié
phpstan-baseline.neon

Détails : chore: mise à jour de la baseline de phpstan (4fd62e3d) · Validations · spip-contrib-extensions / odt2spip · GitLab

==============================
Par bricebou, le 31 août 2025 à 00h03min :

test: un bon début avec des tests unitaire, fonctionnels et prochainement d’intégration…

Ajouté
tests/Integration/Parser/ParserTest.php
tests/Integration/Parser/Processors/DrawProcessorTest.php
tests/Integration/Parser/Processors/ImageProcessorTest.php
tests/Integration/Parser/Processors/TableProcessorTest.php
tests/Integration/Parser/Processors/TextProcessorTest.php
tests/Integration/Utils/OdtFileUtilsTest.php
tests/Unit/Transcribers/MarkdownTranscriberTest.php
tests/Unit/Transcribers/SpipTranscriberTest.php
tests/Unit/Transcribers/TranscriberFactoryTest.php
tests/data/parser/blockquote.odt
tests/data/parser/blockquote/Configurations2/accelerator/current.xml
tests/data/parser/blockquote/META-INF/manifest.xml
tests/data/parser/blockquote/Thumbnails/thumbnail.png
tests/data/parser/blockquote/content.xml
tests/data/parser/blockquote/manifest.rdf
tests/data/parser/blockquote/meta.xml
tests/data/parser/blockquote/mimetype
tests/data/parser/blockquote/settings.xml
tests/data/parser/blockquote/styles.xml
tests/data/parser/externalLink.odt
tests/data/parser/externalLink/Configurations2/accelerator/current.xml
tests/data/parser/externalLink/META-INF/manifest.xml
tests/data/parser/externalLink/Thumbnails/thumbnail.png
tests/data/parser/externalLink/content.xml
tests/data/parser/externalLink/manifest.rdf
tests/data/parser/externalLink/meta.xml
tests/data/parser/externalLink/mimetype
tests/data/parser/externalLink/settings.xml
tests/data/parser/externalLink/styles.xml
tests/data/parser/footnote.odt
tests/data/parser/footnote/Configurations2/accelerator/current.xml
tests/data/parser/footnote/META-INF/manifest.xml
tests/data/parser/footnote/Thumbnails/thumbnail.png
tests/data/parser/footnote/content.xml
tests/data/parser/footnote/manifest.rdf
tests/data/parser/footnote/meta.xml
tests/data/parser/footnote/mimetype
tests/data/parser/footnote/settings.xml
tests/data/parser/footnote/styles.xml
tests/data/parser/formula.odt
tests/data/parser/formula.spip.txt
tests/data/parser/formula/Configurations2/accelerator/current.xml
tests/data/parser/formula/META-INF/manifest.xml
tests/data/parser/formula/Object 1/Configurations2/accelerator/current.xml
tests/data/parser/formula/Object 1/content.xml
tests/data/parser/formula/Object 1/settings.xml
tests/data/parser/formula/Object 2/Configurations2/accelerator/current.xml
tests/data/parser/formula/Object 2/content.xml
tests/data/parser/formula/Object 2/settings.xml
tests/data/parser/formula/ObjectReplacements/Object 1
tests/data/parser/formula/ObjectReplacements/Object 2
tests/data/parser/formula/Thumbnails/thumbnail.png
tests/data/parser/formula/content.xml
tests/data/parser/formula/manifest.rdf
tests/data/parser/formula/meta.xml
tests/data/parser/formula/mimetype
tests/data/parser/formula/settings.xml
tests/data/parser/formula/styles.xml
tests/data/parser/formula_missing.odt
tests/data/parser/formula_missing.spip.txt
tests/data/parser/formula_missing/Configurations2/accelerator/current.xml
tests/data/parser/formula_missing/META-INF/manifest.xml
tests/data/parser/formula_missing/Object 1/Configurations2/accelerator/current.xml
tests/data/parser/formula_missing/Object 1/settings.xml
tests/data/parser/formula_missing/Object 2/Configurations2/accelerator/current.xml
tests/data/parser/formula_missing/Object 2/settings.xml
tests/data/parser/formula_missing/ObjectReplacements/Object 1
tests/data/parser/formula_missing/ObjectReplacements/Object 2
tests/data/parser/formula_missing/Thumbnails/thumbnail.png
tests/data/parser/formula_missing/content.xml
tests/data/parser/formula_missing/manifest.rdf
tests/data/parser/formula_missing/meta.xml
tests/data/parser/formula_missing/mimetype
tests/data/parser/formula_missing/settings.xml
tests/data/parser/formula_missing/styles.xml
tests/data/parser/global.odt
tests/data/parser/global.spip.txt
tests/data/parser/global/META-INF/manifest.xml
tests/data/parser/global/Object 1/content.xml
tests/data/parser/global/Object 1/settings.xml
tests/data/parser/global/ObjectReplacements/Object 1
tests/data/parser/global/Pictures/1000000100000200000002002826B8A5.png
tests/data/parser/global/Thumbnails/thumbnail.png
tests/data/parser/global/content.xml
tests/data/parser/global/manifest.rdf
tests/data/parser/global/meta.xml
tests/data/parser/global/mimetype
tests/data/parser/global/settings.xml
tests/data/parser/global/styles.xml
tests/data/parser/headers.odt
tests/data/parser/headers/Configurations2/accelerator/current.xml
tests/data/parser/headers/META-INF/manifest.xml
tests/data/parser/headers/Thumbnails/thumbnail.png
tests/data/parser/headers/content.xml
tests/data/parser/headers/manifest.rdf
tests/data/parser/headers/meta.xml
tests/data/parser/headers/mimetype
tests/data/parser/headers/settings.xml
tests/data/parser/headers/styles.xml
tests/data/parser/horizontalRule.odt
tests/data/parser/horizontalRule/Configurations2/accelerator/current.xml
tests/data/parser/horizontalRule/META-INF/manifest.xml
tests/data/parser/horizontalRule/Thumbnails/thumbnail.png
tests/data/parser/horizontalRule/content.xml
tests/data/parser/horizontalRule/manifest.rdf
tests/data/parser/horizontalRule/meta.xml
tests/data/parser/horizontalRule/mimetype
tests/data/parser/horizontalRule/settings.xml
tests/data/parser/horizontalRule/styles.xml
tests/data/parser/image_noweb.odt
tests/data/parser/image_noweb/META-INF/manifest.xml
tests/data/parser/image_noweb/Pictures/100000010000028A000001B2BEB076EA.tif
tests/data/parser/image_noweb/Thumbnails/thumbnail.png
tests/data/parser/image_noweb/content.xml
tests/data/parser/image_noweb/manifest.rdf
tests/data/parser/image_noweb/meta.xml
tests/data/parser/image_noweb/mimetype
tests/data/parser/image_noweb/settings.xml
tests/data/parser/image_noweb/styles.xml
tests/data/parser/image_with_caption_and_accessibility.odt
tests/data/parser/image_with_caption_and_accessibility/META-INF/manifest.xml
tests/data/parser/image_with_caption_and_accessibility/Pictures/1000000100000200000002002826B8A5.png
tests/data/parser/image_with_caption_and_accessibility/Thumbnails/thumbnail.png
tests/data/parser/image_with_caption_and_accessibility/content.xml
tests/data/parser/image_with_caption_and_accessibility/manifest.rdf
tests/data/parser/image_with_caption_and_accessibility/meta.xml
tests/data/parser/image_with_caption_and_accessibility/mimetype
tests/data/parser/image_with_caption_and_accessibility/settings.xml
tests/data/parser/image_with_caption_and_accessibility/styles.xml
tests/data/parser/image_with_position.odt
tests/data/parser/image_with_position/META-INF/manifest.xml
tests/data/parser/image_with_position/Pictures/1000000100000200000002002826B8A5.png
tests/data/parser/image_with_position/Thumbnails/thumbnail.png
tests/data/parser/image_with_position/content.xml
tests/data/parser/image_with_position/manifest.rdf
tests/data/parser/image_with_position/meta.xml
tests/data/parser/image_with_position/mimetype
tests/data/parser/image_with_position/settings.xml
tests/data/parser/image_with_position/styles.xml
tests/data/parser/inlinedCode.odt
tests/data/parser/inlinedCode/Configurations2/accelerator/current.xml
tests/data/parser/inlinedCode/META-INF/manifest.xml
tests/data/parser/inlinedCode/Thumbnails/thumbnail.png
tests/data/parser/inlinedCode/content.xml
tests/data/parser/inlinedCode/manifest.rdf
tests/data/parser/inlinedCode/meta.xml
tests/data/parser/inlinedCode/mimetype
tests/data/parser/inlinedCode/settings.xml
tests/data/parser/inlinedCode/styles.xml
tests/data/parser/orderedListSimple.odt
tests/data/parser/orderedListSimple/Configurations2/accelerator/current.xml
tests/data/parser/orderedListSimple/META-INF/manifest.xml
tests/data/parser/orderedListSimple/Thumbnails/thumbnail.png
tests/data/parser/orderedListSimple/content.xml
tests/data/parser/orderedListSimple/manifest.rdf
tests/data/parser/orderedListSimple/meta.xml
tests/data/parser/orderedListSimple/mimetype
tests/data/parser/orderedListSimple/settings.xml
tests/data/parser/orderedListSimple/styles.xml
tests/data/parser/table.odt
tests/data/parser/table.spip.txt
tests/data/parser/table/Configurations2/accelerator/current.xml
tests/data/parser/table/META-INF/manifest.xml
tests/data/parser/table/Thumbnails/thumbnail.png
tests/data/parser/table/content.xml
tests/data/parser/table/manifest.rdf
tests/data/parser/table/meta.xml
tests/data/parser/table/mimetype
tests/data/parser/table/settings.xml
tests/data/parser/table/styles.xml
tests/data/parser/table_with_caption.odt
tests/data/parser/table_with_caption.spip.txt
tests/data/parser/table_with_caption/Configurations2/accelerator/current.xml
tests/data/parser/table_with_caption/META-INF/manifest.xml
tests/data/parser/table_with_caption/Thumbnails/thumbnail.png
tests/data/parser/table_with_caption/content.xml
tests/data/parser/table_with_caption/manifest.rdf
tests/data/parser/table_with_caption/meta.xml
tests/data/parser/table_with_caption/mimetype
tests/data/parser/table_with_caption/settings.xml
tests/data/parser/table_with_caption/styles.xml
tests/data/parser/unorderedList.odt
tests/data/parser/unorderedList/Configurations2/accelerator/current.xml
tests/data/parser/unorderedList/META-INF/manifest.xml
tests/data/parser/unorderedList/Thumbnails/thumbnail.png
tests/data/parser/unorderedList/content.xml
tests/data/parser/unorderedList/manifest.rdf
tests/data/parser/unorderedList/meta.xml
tests/data/parser/unorderedList/mimetype
tests/data/parser/unorderedList/settings.xml
tests/data/parser/unorderedList/styles.xml
tests/data/xml/content.xml
tests/data/xml/styles.xml
Modifié
formulaires/document2spip.php
src/Odt2Spip.php
src/Utils/OdtFileUtils.php

Détails : test: un bon début avec des tests unitaire, fonctionnels et prochainement d'intégration... (3d084ebb) · Validations · spip-contrib-extensions / odt2spip · GitLab

==============================
Par bricebou, le 30 août 2025 à 23h59min :

chore: installation et configuration de phpunit

Ajouté
phpunit.depending.xml.dist
phpunit.xml.dist
Modifié
.gitignore
composer.json

Détails : chore: installation et configuration de phpunit (eacefcae) · Validations · spip-contrib-extensions / odt2spip · GitLab

==============================
Par bricebou, le 30 août 2025 à 23h02min :

styles: une nouvelle passe de rector et une passe d’ecs

Modifié
src/Odt2Spip.php
src/Parser/Processors/DrawProcessor.php
src/Parser/Processors/ImageProcessor.php
src/Parser/Processors/TextProcessor.php
src/Repositories/DocumentRepository.php
src/Transcribers/MarkdownTranscriber.php
src/Transcribers/SpipTranscriber.php

Détails : styles: une nouvelle passe de rector et une passe d'ecs (e51d1949) · Validations · spip-contrib-extensions / odt2spip · GitLab

==============================
Par bricebou, le 30 août 2025 à 23h01min :

refactor: on s’essaie à l’analyse statique avec phpstan, jusqu’au niveau 8

Ajouté
phpstan-baseline.neon
phpstan.neon.dist
Modifié
composer.json
src/DTO/ArticleDTO.php
src/Odt2Spip.php
src/Parser/OdtParser.php
src/Parser/Processors/DrawProcessor.php
src/Parser/Processors/ImageProcessor.php
src/Parser/Processors/TextProcessor.php
src/Repositories/AbstractRepository.php
src/Repositories/ArticleRepository.php
src/Repositories/DocumentRepository.php
src/Transcribers/MarkdownTranscriber.php
src/Transcribers/SpipTranscriber.php
src/Utils/OdtFileUtils.php

Détails : refactor: on s'essaie à l'analyse statique avec phpstan, jusqu'au niveau 8 (2cd22253) · Validations · spip-contrib-extensions / odt2spip · GitLab

==============================
Par bricebou, le 30 août 2025 à 21h29min :

styles: une passe de rector et une passe d’ecs

Modifié
src/DTO/ArticleDTO.php
src/DTO/ImageDTO.php
src/Exceptions/FileException.php
src/Exceptions/ParserException.php
src/Exceptions/RepositoryException.php
src/Exceptions/UploadException.php
src/Exceptions/XmlReaderServiceException.php
src/Odt2Spip.php
src/Parser/OdtParser.php
src/Parser/Processors/DrawProcessor.php
src/Parser/Processors/ImageProcessor.php
src/Parser/Processors/TableProcessor.php
src/Parser/Processors/TextProcessor.php
src/Repositories/AbstractRepository.php
src/Repositories/ArticleRepository.php
src/Repositories/DocumentRepository.php
src/Utils/OdtFileUtils.php

Détails : styles: une passe de rector et une passe d'ecs (6b733209) · Validations · spip-contrib-extensions / odt2spip · GitLab

==============================
Par bricebou, le 30 août 2025 à 21h29min :

chore: installation et configuration des outils Rector et ECS

Ajouté
ecs.php
rector.php
Modifié
.gitignore
composer.json

Détails : chore: installation et configuration des outils Rector et ECS (5144fa6a) · Validations · spip-contrib-extensions / odt2spip · GitLab

==============================
Par bricebou, le 30 août 2025 à 21h20min :

[WIP]refactor: prise en charge des seuls fichiers .odt, avec parsing en PHP, et possibilité d’avoir en sortie du SPIP ou du Markdown

Ajouté
.gitignore
composer.json
src/DTO/ArticleDTO.php
src/DTO/ImageDTO.php
src/Enums/OutputSyntaxEnum.php
src/Exceptions/FileException.php
src/Exceptions/ParserException.php
src/Exceptions/RepositoryException.php
src/Exceptions/UploadException.php
src/Exceptions/XmlReaderServiceException.php
src/Interfaces/TranscriberInterface.php
src/Odt2Spip.php
src/Parser/OdtParser.php
src/Parser/Processors/DrawProcessor.php
src/Parser/Processors/ImageProcessor.php
src/Parser/Processors/TableProcessor.php
src/Parser/Processors/TextProcessor.php
src/Repositories/AbstractRepository.php
src/Repositories/ArticleRepository.php
src/Repositories/DocumentRepository.php
src/Transcribers/MarkdownTranscriber.php
src/Transcribers/SpipTranscriber.php
src/Transcribers/TranscriberFactory.php
src/Utils/OdtFileUtils.php
Modifié
formulaires/document2spip.php

Détails : [WIP]refactor: prise en charge des seuls fichiers .odt, avec parsing en PHP,... (6a53a768) · Validations · spip-contrib-extensions / odt2spip · GitLab