Files
PhpSpreadsheet/bin/generate-document.php
oleibman 365f9f1995 Compact Function List by Name Document
The entries in the "function list by name" document are very long, and almost all of them require horizontal scrolling, which is not very convenient for the end-user. This PR creates a "function list by name compact" document, in which `CATEGORY_` is stripped from all the category names and `PhpOffice\PhpSpreadsheet\Calculation\` is stripped from all the functions. I believe this eliminates the need to scroll horizontally within the document. I waffled on whether this should replace the existing document, or whether it should be an additional document. I decided there was probably some merit in keeping the old, and hardly any down-side, so, at least for now, we will generate both documents, and they will link to each other.

No changes to source code.
2025-05-23 08:32:52 -07:00

31 lines
832 B
PHP
Executable File

#!/usr/bin/env php
<?php
use PhpOffice\PhpSpreadsheet\Calculation\Calculation;
use PhpOffice\PhpSpreadsheetInfra\DocumentGenerator;
require_once __DIR__ . '/..' . '/vendor/autoload.php';
$phpSpreadsheetFunctions = Calculation::getFunctions();
ksort($phpSpreadsheetFunctions);
file_put_contents(
__DIR__ . '/../docs/references/function-list-by-category.md',
DocumentGenerator::generateFunctionListByCategory(
$phpSpreadsheetFunctions
)
);
file_put_contents(
__DIR__ . '/../docs/references/function-list-by-name.md',
DocumentGenerator::generateFunctionListByName(
$phpSpreadsheetFunctions
)
);
file_put_contents(
__DIR__ . '/../docs/references/function-list-by-name-compact.md',
DocumentGenerator::generateFunctionListByName(
$phpSpreadsheetFunctions,
true
)
);