Browse Source

ascii-art subjects

content-update
lee 5 years ago
parent
commit
74cd75c4bc
  1. 42
      subjects/ascii-art-reverse.en.md
  2. 64
      subjects/ascii-art.en.md
  3. 26
      subjects/ascii-color.en.md
  4. 47
      subjects/ascii-fs.en.md
  5. 60
      subjects/ascii-justify.en.md
  6. 51
      subjects/ascii-output.en.md

42
subjects/ascii-art-reverse.en.md

@ -0,0 +1,42 @@
## ascii-art-reverse
### Objectives
Ascii-art-reverse consists on reversing the process, convertin the graphic representation into a text.
- You will have to create a `txt` 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**;
- 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$
```

64
subjects/ascii-art.en.md

@ -0,0 +1,64 @@
## ascii-art
### Objectives
Ascii-art consists on receiving a `string` has an argument and outputing the `string` in a graphic representation of ascii letters and numbers.
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**;
- 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 letters and numbers.
### 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$
```

26
subjects/ascii-color.en.md

@ -0,0 +1,26 @@
## ascii-art-color
### Objectives
Ascii-art-color consists on receiving a `string` has an argument and outputing the `string` in a graphic representation of ascii letters and numbers 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 o the terminal;
- Manipulation of structures.
### Instructions
- Your project must be written in **GO**;
- The code must respect the **good practices**;
- It is recommended that the code should present a **test file**;
- You may use the same `banner` file.

47
subjects/ascii-fs.en.md

@ -0,0 +1,47 @@
## ascii-art-fs
### Objectives
Ascii-art-fs consists on receiving two `strings` has arguments. The first string being a random phrase and the second string being the template for the graphic representation in ascii of the first argument.
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**;
- It is recommended that the code should present a **test file**;
- You should build your own files with the templates you desire.
### 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$
```

60
subjects/ascii-justify.en.md

@ -0,0 +1,60 @@
## ascii-art-justify
### Objectives
Ascii-art-justify consistes one receiving two `string` has arguments and outputing the `string` in a graphic representation of ascii letters and numbers. This representation should be formated 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**;
- 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$
```

51
subjects/ascii-output.en.md

@ -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 letters and numbers 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;
- Learrning about the choice of outputs;
- Manipulation of structures.
### Instructions
- Your project must be written in **GO**;
- The code must respect the **good practices**;
- 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$
```
Loading…
Cancel
Save