Skip to content

Commit

Permalink
initial skeleton setup
Browse files Browse the repository at this point in the history
  • Loading branch information
chr-hertel committed Dec 3, 2020
0 parents commit 21dee87
Show file tree
Hide file tree
Showing 15 changed files with 2,702 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
vendor
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "fonts"]
path = fonts
url = [email protected]:xero/figlet-fonts.git
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2020 Christopher Hertel

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
17 changes: 17 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# CLI Note Presentation

This is the cli based slide deck powered by [jaem3l/cli-note](https://github.com/jaem3l/cli-note).

## Create your own slide deck

```bash
$ composer create-project jaem3l/cli-note-presentation your-presentation
$ cd your-presentation
$ git submodule init
$ git submodule update
$ vendor/bin/cli-note
```

Customize your slide deck by editing `slides.yaml` and create your sections in `sections/*`

Find a full slide deck example at [chr-hertel/better-console-applications](https://github.com/chr-hertel/better-console-applications)
42 changes: 42 additions & 0 deletions bin/font-test
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
#!/usr/bin/env php
<?php

use Laminas\Text\Figlet\Figlet;
use Stoffel\Console\Headline\HeadlineHelper;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
use Symfony\Component\Console\SingleCommandApplication;
use Symfony\Component\Console\Style\SymfonyStyle;
use Symfony\Component\Finder\Finder;

require dirname(__DIR__).'/vendor/autoload.php';

$cliNote = (new SingleCommandApplication())
->addArgument('text', InputArgument::REQUIRED, 'Text used for the test rendering')
->setCode(function (InputInterface $input, OutputInterface $output) {

$io = new SymfonyStyle($input, $output);
$text = $input->getArgument('text');
$fonts = (new Finder())
->files()
->name('*.flf')
->in(__DIR__.'/../fonts')
->sortByName();
$fonts = iterator_to_array($fonts);

do {
$font = current($fonts);
$io->title(rtrim($font->getFilename(),'.fl'));
HeadlineHelper::create($output)
->setText($text)
->setFigletOptions([
'font' => $font->getRealPath(),
'justification' => Figlet::JUSTIFICATION_LEFT,
])
->write();
$io->newLine(2);

} while (next($fonts) && $io->confirm('Next?'));

})->run();
Empty file added code/.gitignore
Empty file.
21 changes: 21 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"name": "jaem3l/cli-note-presentation",
"description": "Prototype for your CLI note presentation",
"authors": [
{
"name": "Christopher Hertel",
"email": "[email protected]"
}
],
"license": "MIT",
"require": {
"php": "^7.4",
"jaem3l/cli-note": "^0.1",
"symfony/finder": "^5.2"
},
"autoload": {
"psr-4": {
"Slides\\": "slides/"
}
}
}
Loading

0 comments on commit 21dee87

Please sign in to comment.