mirror of https://github.com/01-edu/public.git
augusto-mantilla
5 years ago
committed by
GitHub
7 changed files with 317 additions and 0 deletions
@ -0,0 +1,42 @@
|
||||
## ascii-art-reverse |
||||
|
||||
### Objectives |
||||
|
||||
Ascii-art-reverse consists on reversing the process, converting the graphic representation into a text. |
||||
|
||||
- You will have to create a text file with a graphic representation of a random phrase. |
||||
- The program will have **one** argument being the name of the file created. |
||||
- The program must print this phrase in **normal text**. |
||||
|
||||
This project will help you learn about : |
||||
|
||||
- Client utilities. |
||||
- The Go file system(**fs**) API. |
||||
- Ways to receive data. |
||||
- Ways to output data. |
||||
- Manipulation of strings. |
||||
- Manipulation of structures. |
||||
|
||||
### Instructions |
||||
|
||||
- Your project must be written in **Go**. |
||||
- The code must respect the [**good practices**](https://github.com/01-edu/public/good-practices.en.md). |
||||
- It is recommended that the code should present a **test file**. |
||||
|
||||
### Usage |
||||
|
||||
```console |
||||
student@ubuntu:~/ascii-art$ go build |
||||
student@ubuntu:~/ascii-art$ cat file.txt |
||||
_ _ _ |
||||
| | | | | | |
||||
| |__ ___ | | | | ___ |
||||
| _ \ / _ \ | | | | / _ \ |
||||
| | | | | __/ | | | | | (_) | |
||||
|_| |_| \___| |_| |_| \___/ |
||||
|
||||
|
||||
student@ubuntu:~/ascii-art$ ./ascii-art file.txt |
||||
hello |
||||
student@ubuntu:~/ascii-art$ |
||||
``` |
@ -0,0 +1,64 @@
|
||||
## ascii-art |
||||
|
||||
### Objectives |
||||
|
||||
Ascii-art consists on receiving a `string` has an argument and outputting the `string` in a graphic representation of ASCII. |
||||
|
||||
This project will help you learn about : |
||||
|
||||
- Client utilities. |
||||
- The Go file system(**fs**) API. |
||||
- Ways to receive data. |
||||
- Ways to output data. |
||||
- Manipulation of strings. |
||||
- Manipulation of structures. |
||||
|
||||
### Instructions |
||||
|
||||
- Your project must be written in **Go**. |
||||
- The code must respect the [**good practices**](https://github.com/01-edu/public/good-practices.en.md). |
||||
- It is recommended that the code should present a **test file**. |
||||
- It will be given a `banner` file with a specific graphical template representation of ASCII. |
||||
|
||||
### Usage |
||||
|
||||
```console |
||||
student@ubuntu:~/ascii-art$ go build |
||||
student@ubuntu:~/ascii-art$ ./ascii-art "hello" |
||||
_ _ _ |
||||
| | | | | | |
||||
| |__ ___ | | | | ___ |
||||
| _ \ / _ \ | | | | / _ \ |
||||
| | | | | __/ | | | | | (_) | |
||||
|_| |_| \___| |_| |_| \___/ |
||||
|
||||
|
||||
student@ubuntu:~/ascii-art$ ./ascii-art "HeLlO" |
||||
_ _ _ _ ____ |
||||
| | | | | | | | / __ \ |
||||
| |__| | ___ | | | | | | | | |
||||
| __ | / _ \ | | | | | | | | |
||||
| | | | | __/ | |____ | | | |__| | |
||||
|_| |_| \___| |______| |_| \____/ |
||||
|
||||
|
||||
student@ubuntu:~/ascii-art$ ./ascii-art "Hello There" |
||||
_ _ _ _ _______ _ |
||||
| | | | | | | | |__ __| | | |
||||
| |__| | ___ | | | | ___ | | | |__ ___ _ __ ___ |
||||
| __ | / _ \ | | | | / _ \ | | | _ \ / _ \ | '__| / _ \ |
||||
| | | | | __/ | | | | | (_) | | | | | | | | __/ | | | __/ |
||||
|_| |_| \___| |_| |_| \___/ |_| |_| |_| \___| |_| \___| |
||||
|
||||
|
||||
student@ubuntu:~/ascii-art$ ./ascii-art "1Hello 2There" |
||||
_ _ _ _ _______ _ |
||||
_ | | | | | | | | ____ |__ __| | | |
||||
/ | | |__| | ___ | | | | ___ |___ \ | | | |__ ___ _ __ ___ |
||||
| | | __ | / _ \ | | | | / _ \ __) | | | | _ \ / _ \ | '__| / _ \ |
||||
| | | | | | | __/ | | | | | (_) | / __/ | | | | | | | __/ | | | __/ |
||||
|_| |_| |_| \___| |_| |_| \___/ |_____| |_| |_| |_| \___| |_| \___| |
||||
|
||||
|
||||
student@ubuntu:~/ascii-art$ |
||||
``` |
@ -0,0 +1,26 @@
|
||||
## ascii-art-color |
||||
|
||||
### Objectives |
||||
|
||||
You must follow the same [instructions](https://github.com/01-edu/public/ascii-art.en.md) as the first subject but with colors. |
||||
|
||||
- The output should manipulate colors using **flags**, `-c=<color>`, in which `-c` is the flag and `<color>` is the color of choice. |
||||
- You should be able to specify which letter you want to be colored (use your imagination for this one). |
||||
- If the letter isn't specified, the whole phrase should be colored. |
||||
|
||||
This project will help you learn about : |
||||
|
||||
- Client utilities. |
||||
- The Go file system(**fs**) API. |
||||
- Ways to receive data. |
||||
- Ways to output data. |
||||
- Manipulation of strings. |
||||
- Manipulation of colors on the terminal. |
||||
- Manipulation of structures. |
||||
|
||||
### Instructions |
||||
|
||||
- Your project must be written in **Go**. |
||||
- The code must respect the [**good practices**](https://github.com/01-edu/public/good-practices.en.md). |
||||
- It is recommended that the code should present a **test file**. |
||||
- You may use the same `banner` file. |
@ -0,0 +1,46 @@
|
||||
## ascii-art-fs |
||||
|
||||
### Objectives |
||||
|
||||
You must follow the same [instructions](https://github.com/01-edu/public/ascii-art.en.md) as the first subject but the second argument must be the name of the template. |
||||
|
||||
This project will help you learn about : |
||||
|
||||
- Client utilities. |
||||
- The Go file system(**fs**) API. |
||||
- Ways to receive data. |
||||
- Ways to output data. |
||||
- Manipulation of strings. |
||||
- Manipulation of structures. |
||||
|
||||
### Instructions |
||||
|
||||
- Your project must be written in **Go**. |
||||
- The code must respect the [**good practices**](https://github.com/01-edu/public/good-practices.en.md). |
||||
- It is recommended that the code should present a **test file**. |
||||
|
||||
### Usage |
||||
|
||||
```console |
||||
student@ubuntu:~/ascii-art$ go build |
||||
student@ubuntu:~/ascii-art$ ./ascii-art "hello" standard |
||||
_ _ _ |
||||
| | | | | | |
||||
| |__ ___ | | | | ___ |
||||
| _ \ / _ \ | | | | / _ \ |
||||
| | | | | __/ | | | | | (_) | |
||||
|_| |_| \___| |_| |_| \___/ |
||||
|
||||
|
||||
student@ubuntu:~/ascii-art$ ./ascii-art "hello" shadow |
||||
oooo oooo oooo |
||||
`888 `888 `888 |
||||
888 .oo. .ooooo. 888 888 .ooooo. |
||||
888P"Y88b d88' `88b 888 888 d88' `88b |
||||
888 888 888ooo888 888 888 888 888 |
||||
888 888 888 .o 888 888 888 888 |
||||
o888o o888o `Y8bod8P' o888o o888o `Y8bod8P' |
||||
|
||||
student@ubuntu:~/ascii-art$ |
||||
student@ubuntu:~/ascii-art$ |
||||
``` |
@ -0,0 +1,60 @@
|
||||
## ascii-art-justify |
||||
|
||||
### Objectives |
||||
|
||||
You must follow the same [instructions](https://github.com/01-edu/public/ascii-art.en.md) as the first subject but the representation should be formatted using the second argument, that can be: |
||||
|
||||
- center |
||||
- justify |
||||
- align-left |
||||
- align-right |
||||
|
||||
This project will help you learn about : |
||||
|
||||
- Client utilities. |
||||
- The Go file system(**fs**) API. |
||||
- Ways to receive data. |
||||
- Ways to output data. |
||||
- Manipulation of strings. |
||||
- Manipulation of structures. |
||||
|
||||
### Instructions |
||||
|
||||
- Your project must be written in **Go**. |
||||
- The code must respect the [**good practices**](https://github.com/01-edu/public/good-practices.en.md). |
||||
- It is recommended that the code should present a **test file**. |
||||
- You should build your one files with the templates you desire. |
||||
|
||||
### Usage |
||||
|
||||
```console |
||||
student@ubuntu:~/ascii-art$ go build |
||||
student@ubuntu:~/ascii-art$ ./ascii-art "hello" standard center |
||||
_ _ _ |
||||
| | | | | | |
||||
| |__ ___ | | | | ___ |
||||
| _ \ / _ \ | | | | / _ \ |
||||
| | | | | __/ | | | | | (_) | |
||||
|_| |_| \___| |_| |_| \___/ |
||||
|
||||
|
||||
student@ubuntu:~/ascii-art$ ./ascii-art "Hello There" standard align-right |
||||
_ _ _ _ _______ _ |
||||
| | | | | | | | |__ __| | | |
||||
| |__| | ___ | | | | ___ | | | |__ ___ _ __ ___ |
||||
| __ | / _ \ | | | | / _ \ | | | _ \ / _ \ | '__| / _ \ |
||||
| | | | | __/ | | | | | (_) | | | | | | | | __/ | | | __/ |
||||
|_| |_| \___| |_| |_| \___/ |_| |_| |_| \___| |_| \___| |
||||
|
||||
|
||||
student@ubuntu:~/ascii-art$ ./ascii-art "hello" shadow center |
||||
oooo oooo oooo |
||||
`888 `888 `888 |
||||
888 .oo. .ooooo. 888 888 .ooooo. |
||||
888P"Y88b d88' `88b 888 888 d88' `88b |
||||
888 888 888ooo888 888 888 888 888 |
||||
888 888 888 .o 888 888 888 888 |
||||
o888o o888o `Y8bod8P' o888o o888o `Y8bod8P' |
||||
|
||||
student@ubuntu:~/ascii-art$ |
||||
``` |
@ -0,0 +1,51 @@
|
||||
## ascii-art-output |
||||
|
||||
### Objectives |
||||
|
||||
Ascii-art-output consists on receiving two strings. The first argument will be converted into a graphic representation of ASCII and written into a file named by using the second argument. |
||||
|
||||
- In case the second argument is not present it should print the graphic representation. |
||||
|
||||
This project will help you learn about : |
||||
|
||||
- Client utilities. |
||||
- The Go file system(**fs**) API. |
||||
- Ways to receive data. |
||||
- Ways to output data. |
||||
- Manipulation of strings. |
||||
- Learning about the choice of outputs. |
||||
- Manipulation of structures. |
||||
|
||||
### Instructions |
||||
|
||||
- Your project must be written in **Go**. |
||||
- The code must respect the [**good practices**](https://github.com/01-edu/public/good-practices.en.md). |
||||
- It is recommended that the code should present a **test file**. |
||||
- You may use the same `banner` file. |
||||
|
||||
### Usage |
||||
|
||||
```console |
||||
student@ubuntu:~/ascii-art$ go build |
||||
student@ubuntu:~/ascii-art$ ./ascii-art "hello" banner.txt |
||||
student@ubuntu:~/ascii-art$ cat banner.txt |
||||
_ _ _ |
||||
| | | | | | |
||||
| |__ ___ | | | | ___ |
||||
| _ \ / _ \ | | | | / _ \ |
||||
| | | | | __/ | | | | | (_) | |
||||
|_| |_| \___| |_| |_| \___/ |
||||
|
||||
|
||||
student@ubuntu:~/ascii-art$ ./ascii-art "Hello There" banner.txt |
||||
student@ubuntu:~/ascii-art$ cat banner.txt |
||||
_ _ _ _ _______ _ |
||||
| | | | | | | | |__ __| | | |
||||
| |__| | ___ | | | | ___ | | | |__ ___ _ __ ___ |
||||
| __ | / _ \ | | | | / _ \ | | | _ \ / _ \ | '__| / _ \ |
||||
| | | | | __/ | | | | | (_) | | | | | | | | __/ | | | __/ |
||||
|_| |_| \___| |_| |_| \___/ |_| |_| |_| \___| |_| \___| |
||||
|
||||
|
||||
student@ubuntu:~/ascii-art$ |
||||
``` |
@ -0,0 +1,28 @@
|
||||
## good practices |
||||
|
||||
### [code](https://code.tutsplus.com/tutorials/top-15-best-practices-for-writing-super-readable-code--net-8118) |
||||
|
||||
- Commenting and Documentation |
||||
- Consistent Indentation |
||||
- Avoid Obvious Comments |
||||
- Code Grouping |
||||
- Consistent Naming Scheme |
||||
- camelCase |
||||
- under_scores |
||||
- [**DRY**](https://thefullstack.xyz/dry-yagni-kiss-tdd-soc-bdfu) (Don't Repeat Yourself) or [**DIE**](https://thefullstack.xyz/dry-yagni-kiss-tdd-soc-bdfu) (Duplication is Evil) principle |
||||
- [**KISS**](https://thefullstack.xyz/dry-yagni-kiss-tdd-soc-bdfu) (Keep It Simple Stupid) |
||||
- [**YAGNI**](https://thefullstack.xyz/dry-yagni-kiss-tdd-soc-bdfu) (You Aren’t Gonna Need It) |
||||
- [**SOC**](https://thefullstack.xyz/dry-yagni-kiss-tdd-soc-bdfu) (Separation of Concerns) |
||||
- Avoid Deep Nesting |
||||
- Limit Line Length |
||||
- File and Folder Organization |
||||
- Consistent Temporary Names |
||||
- Separation of Code and Data |
||||
- Code Refactoring |
||||
|
||||
### Go |
||||
|
||||
- [**Go**](https://golang.org/doc/effective_go.html) |
||||
- [**gofmt**](https://golang.org/cmd/gofmt/) |
||||
- [**goimports**](https://godoc.org/golang.org/x/tools/cmd/goimports) |
||||
- [**foimports vs gofmt**](https://goinbigdata.com/goimports-vs-gofmt/) |
Loading…
Reference in new issue