Skip to content

Commit

Permalink
Add something to read
Browse files Browse the repository at this point in the history
  • Loading branch information
billbirchatcoles committed May 13, 2020
1 parent 3493069 commit c47add7
Show file tree
Hide file tree
Showing 3 changed files with 59 additions and 0 deletions.
50 changes: 50 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,52 @@
# frangipanni
Program to convert lines of text into a tree structure.

<img src="frangipanni.jpg" alt="A Tree" width="200">

# Usage

```
cat file.txt | go run frangipanni.go
```

or from binary

```
cat file.txt | frangipanni
```

# Example

Given input:

```
/var
/boot/vmlinuz-4.9.0-11-amd64
/boot/vmlinuz-4.9.0-8-amd64
/boot/vmlinuz-4.9.0-12-amd64
/boot/initrd.img-4.9.0-12-amd64
/boot/System.map-4.9.0-8-amd64
/boot/config-4.9.0-12-amd64
/boot/System.map-4.9.0-11-amd64
/boot/initrd.img-4.9.0-8-amd64
```

Output:

```
$ <example-input.txt ./frangipanni
/boot
/System.map-4.9.0
-11-amd64
-8-amd64
/config-4.9.0-12-amd64
/initrd.img-4.9.0
-12-amd64
-8-amd64
/vmlinuz-4.9.0
-11-amd64
-12-amd64
-8-amd64
/var
```
9 changes: 9 additions & 0 deletions example-input.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
/var
/boot/vmlinuz-4.9.0-11-amd64
/boot/vmlinuz-4.9.0-8-amd64
/boot/vmlinuz-4.9.0-12-amd64
/boot/initrd.img-4.9.0-12-amd64
/boot/System.map-4.9.0-8-amd64
/boot/config-4.9.0-12-amd64
/boot/System.map-4.9.0-11-amd64
/boot/initrd.img-4.9.0-8-amd64
Binary file added frangipanni.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit c47add7

Please sign in to comment.