From 83d040fe4d354578765a5935ce5ad80a7939dd29 Mon Sep 17 00:00:00 2001 From: Erika Heidi Date: Thu, 11 Jan 2024 18:35:04 +0100 Subject: [PATCH] Updating README --- README.md | 69 ++++++++++++++++++++++---- app/Command/Demo/DefaultController.php | 15 ------ app/Command/Demo/TableController.php | 28 ----------- app/Command/Demo/TestController.php | 18 ------- 4 files changed, 60 insertions(+), 70 deletions(-) delete mode 100644 app/Command/Demo/DefaultController.php delete mode 100644 app/Command/Demo/TableController.php delete mode 100644 app/Command/Demo/TestController.php diff --git a/README.md b/README.md index 99c168b..0778d63 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,62 @@ -
-

- Minicli -

Minicli Application Template

-

-
-
+# Autodocs Demo -This repository is an application template for building command-line applications in PHP with [Minicli](https://github.com/minicli/minicli). +This repository contains a demo application implementing [Autodocs](https://github.com/erikaheidi/autodocs). To run this demo, you'll need PHP >= 8.2 and Composer. -Please check [the official documentation](https://docs.minicli.dev) for more information on how to use this application template. +## Running the Demo +Start by cloning this repository: + +```shell +git clone https://github.com/erikaheidi/autodocs-demo.git +``` + +Then, install dependencies with Composer: + +```shell +cd autodocs-demo +composer install +``` +You may want to update the file `storage/cache/profile.json` with your own data: + +```json +{ + "user": "Erika Heidi", + "bio": "Software and Documentation Engineer", + "projects": { + "minicli/minicli": { + "description": "CLI framework for PHP", + "link": "https://docs.minicli.dev" + }, + "erikaheidi/autodocs": { + "description": "Tiny framework for automating documentation", + "link": "https://github.com/erikaheidi/autodocs/wiki" + } + } +} +``` + +Then, run: + +```shell +./autodocs build +``` + +You'll get output similar to this: + +```shell +Starting Build... + +Build finished. Output saved to /home/erika/Projects/autodocs-demo/config/../storage/content +``` + +Check your `storage/content` folder, and you should find a `README.md` file there with your rendered content: + +```markdown +## Erika Heidi + +Software and Documentation Engineer + +## My PHP Projects + +- [minicli/minicli](https://docs.minicli.dev): CLI framework for PHP +- [erikaheidi/autodocs](https://github.com/erikaheidi/autodocs/wiki): Tiny framework for automating documentation +``` diff --git a/app/Command/Demo/DefaultController.php b/app/Command/Demo/DefaultController.php deleted file mode 100644 index 88999ba..0000000 --- a/app/Command/Demo/DefaultController.php +++ /dev/null @@ -1,15 +0,0 @@ -info('Run ./minicli help for usage help.'); - } -} diff --git a/app/Command/Demo/TableController.php b/app/Command/Demo/TableController.php deleted file mode 100644 index f416bee..0000000 --- a/app/Command/Demo/TableController.php +++ /dev/null @@ -1,28 +0,0 @@ -display('Testing Tables'); - - $table = new TableHelper(); - $table->addHeader(['Header 1', 'Header 2', 'Header 3']); - - for($i = 1; $i <= 10; $i++) { - $table->addRow([(string)$i, (string)rand(0, 10), "other string {$i}"]); - } - - $this->newline(); - $this->rawOutput($table->getFormattedTable(new ColorOutputFilter())); - $this->newline(); - } -} diff --git a/app/Command/Demo/TestController.php b/app/Command/Demo/TestController.php deleted file mode 100644 index c2934ec..0000000 --- a/app/Command/Demo/TestController.php +++ /dev/null @@ -1,18 +0,0 @@ -hasParam('user') ? $this->getParam('user') : 'World'; - $this->display(sprintf("Hello, %s!", $name)); - - print_r($this->getParams()); - } -}