File tree Expand file tree Collapse file tree 1 file changed +16
-2
lines changed Expand file tree Collapse file tree 1 file changed +16
-2
lines changed Original file line number Diff line number Diff line change @@ -14,6 +14,11 @@ composer require adhocore/cli-syntax
14
14
```
15
15
16
16
## Usage
17
+
18
+ You can either highlight PHP code in CLI or export to png image.
19
+
20
+ ### Highlight
21
+
17
22
``` php
18
23
use Ahc\CliSyntax\Highlighter;
19
24
@@ -26,9 +31,18 @@ echo (new Highlighter)->highlight('<?php echo "Hello world!";');
26
31
echo Highlighter::for('/path/to/file.php');
27
32
```
28
33
29
- See [ example] ( ./example.php ) . Here's the screenshot too:
34
+ ### Export
35
+
36
+ ``` php
37
+ use Ahc\CliSyntax\Exporter;
38
+
39
+ // PHP file
40
+ Exporter::for('/path/to/file.php')->export('file.png');
41
+ ```
42
+
43
+ See [ example usage] ( ./example.php ) . Here's how the export looks like:
30
44
31
- ![ adhocore/cli-syntax] ( https://imgur.com/wcNp3qJ .png)
45
+ ![ adhocore/cli-syntax] ( ./example .png)
32
46
33
47
## Contributing
34
48
You can’t perform that action at this time.
0 commit comments