feat: 🎸 Pony fetch

This commit is contained in:
Atsukoro1 2022-12-01 16:08:46 +01:00
parent 6709022e6d
commit cdff610377
7 changed files with 64 additions and 39 deletions

View file

@ -1,31 +0,0 @@
,'/
. / ___
___/\ / /'`_ `'.
__ _ .-' :v :u/ /-'` \ )
.-'`` \` \ .'.') ) /\ / / : |
.'` .--. ) .)/ / /-'__\// / | |
.'` .-'` .| .'.|: @_-'`` \ \/\..--. | ( _.-._
,' .'` |' | |'| ( /. '-.__\ ) ( `''.-'` `.
.'.-` | .| | | \ ) \__. | | `---`` )
.' (_.' | |'.| | ('` ,_ `. : .--. /
.' / . | | |' ( \ `\-.-' \ .-'` | \
- . (_.-' | | | \ |\ \ __ `` | `''--.,
.` .' . / / | | : \| `-._ \.'` '. .--. `-..-'``'. )
'-'/ / ( / | : ( |'-, `-.)\ \ .' ) __ ) )
/ / /``( .' ( ( '..-':' `-, A ) \_.' (_ .---: )| /
/ / / '`' . \ '---''` \ V )`-. .-` '.((( |
' / / / `'`(_. `'' .'` )-' `-..___..-'` \ ``.' |
( / / / / / / / ,'-` | | \ ''` |
'`/ / / / / /.''`.' | : \ |
/ / / / /`-' / ..---. | '. \ |
( // / /(_/ _ /. . , )/|. '. \ |
`-'( / / .-'` ( -(_)- / '| '. (\ |
`-'`--' /` \' ' ` .' |. ('.` \ ,.---. |
(_ `--''`````\ '| .-` \.-'`_ \ |
/ ___ / '..''``''`` `\ . |
(``''''`` \ `--'` \ | ..--. |
\ (__,..-'` ___ ( '\ .-`__\ \ .--. |
'-..----.., ,.-'`` `-. \__.'''` ,' ``--`` '.' |
\ .-'` __ .--.-''. .-'``''` |
\.-'` .-' `\`'`.'` \_.-' |
'.__________.-'` `'`

12
ponies/fluttershy.txt Normal file
View file

@ -0,0 +1,12 @@
⠀⠀⠀⠀⣀⣀⣀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⢀⠔⣉⡀⠂⠀⠌⢁⢲⢐⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⢠⢁⠂⠀⠤⠤⠔⠁⡀⠀⠀⢰⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠈⢸⡌⢀⣷⠆⠀⣌⣟⢢⣀⣶⠱⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠸⠸⡅⠺⣿⣶⠀⠉⢿⡿⡏⢱⢀⡇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠂⢣⠀⠻⠁⢀⡰⠀⠀⢁⠆⢬⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⡀⠀⡄⢠⠉⢠⡪⢂⠂⣿⡛⢳⠦⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⣤⠙⠀⠸⢆⣰⠕⢠⠂⡘⠀⣱⠞⠀⡁⠀⠀⠀⠀⣀⣀⣀⠀⠀⠀⠀⠀
⠀⠀⠀⠓⢚⠀⠐⢸⡍⢀⠃⢸⡙⠏⠁⠀⢴⢍⡙⠃⠐⠒⠂⠀⠈⠢⠉⠰⡠⡀
⠀⠀⠀⠀⠀⠑⠤⠼⣧⡘⢄⠈⠂⠤⢄⠒⠈⠀⠀⠀⠀⠀⢈⡆⠀⣠⠀⠀⠃⢡
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠉⠻⠿⠷⠶⠤⠄⡲⠶⡤⢉⡉⠑⠂⠅⣊⠩⠍⢀⠤⠃
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠂⠉⠛⠁⠀⠀⠈⠉⠁⠉⠉⠉⠀⠀⠀

13
ponies/rainbowdash.txt Normal file
View file

@ -0,0 +1,13 @@
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⡤⣼⡸⢶⡡⢇⡠⠔⡊⠩⢉⠶⡦⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢣⠈⡇⠸⠁⠀⠂⠤⡈⠢⠀⠈⠮⣆
⠀⠀⠀⠀⠀⠀⠀⠀⠀⢠⠨⡄⠰⣐⣇⠃⡀⠀⠈⢺⢣⣄⠘⡈
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⢆⠸⣰⢸⢏⢄⠋⠀⣬⡿⠉⠾⡈⠉
⠀⠀⠀⢀⠔⣲⡿⢇⢶⢄⢨⠣⡈⢸⡈⢲⡇⢄⡀⠻⠴⠋⠁⠀
⠀⠀⣰⣵⡞⢊⠀⠀⠐⢻⣿⠓⢍⡘⡕⡠⣵⡘⠀⠀⠀⠀⠀⠀
⠀⠀⢡⠏⠀⠄⢠⠃⢀⣡⠙⢄⠀⠀⣇⠇⠽⠡⠒⡄⠀⠀⠀⠀
⠀⠀⠘⡁⠀⡗⣼⠀⢰⠈⢀⢼⠒⠀⠓⢀⠔⠀⡇⢠⠀⠀⠀⠀
⠀⠀⣀⡇⠀⡀⡿⠀⡜⠀⠀⣼⠀⠀⠀⢊⠀⢠⢁⠆⠀⠀⠀⠀
⠀⢀⠟⠃⣼⣧⠃⠀⠑⠄⡠⠋⠀⠀⠀⠈⠒⠁⠀⠀⠀⠀⠀⠀
⠀⠀⣜⡴⠃⠏⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠐⠊⠉⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀

12
ponies/rarity.txt Normal file
View file

@ -0,0 +1,12 @@
⠀⠀⢠⣼⢙⡖⠲⣲⠤⣄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⢀⡴⡋⠀⡺⠤⠽⣟⣯⠞⢳⡄⣀⢀⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⡼⠁⠀⣼⠁⢀⣴⣾⠙⡤⠚⡷⢜⡎⢸⣀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⢳⠀⠆⡼⠀⠁⠪⡿⡎⠀⠀⣷⢿⢥⡜⡸⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠈⢷⠀⠙⠦⠶⣶⠀⢻⡀⢠⡿⢢⢾⣴⣏⣀⣀⣀⣀⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠈⢣⠀⠀⠄⡇⣟⠸⠟⠛⠚⠛⣯⣟⢣⡀⠀⠀⠀⠈⢳⡀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠈⣇⠀⠀⣧⠀⠀⠀⠀⠀⠀⡀⠀⠀⡏⢳⠀⠀⢸⢀⡇⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⡿⣠⠞⠈⡧⣆⠀⢠⣀⣀⡹⣄⠀⠓⢎⠀⠀⡘⡼⠀⠀⠀⠀⠀⠀⠀⠀
⣤⡤⠾⠻⡃⢀⣼⢅⡼⡆⠈⡏⠙⡆⠈⢦⠀⠈⡇⠐⢸⠁⠀⠀⠀⠀⠀⠀⠀⠀
⠘⢦⣀⠠⢿⣗⠞⠋⡧⡇⠀⢸⡀⢸⡀⠨⣇⠀⢼⣁⠸⣄⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠉⠉⠹⣅⣀⠴⠳⡟⠟⠦⡷⢹⠤⠐⡯⠫⠼⡆⠈⢆⡉⠉⠉⠉⠙⠫⠑⢦
⠀⠀⠀⠀⠀⠀⠀⠀⢸⣉⣉⣀⡼⠛⠒⠒⠧⠤⠤⠟⠒⠒⠚⠓⢫⣽⡧⠤⠥⠊

11
ponies/twilight.txt Normal file
View file

@ -0,0 +1,11 @@
⠀⠀⢀⣀⣀⣀⠀⠐⣄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⢈⢿⡟⡓⠌⠋⠀⡁⠠⠇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⡎⣎⣅⠓⠉⢟⣿⣟⠀⠇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠷⠉⠹⣵⠀⢋⡿⣙⣰⠀⠀⠀⠀⡀⠄⠒⠒⠢⢄⠀⠀⠀
⠀⠀⠀⠪⢠⡀⣰⣟⠏⣇⠀⠀⣀⣀⣀⡀⠀⠀⠊⠣⡀⠀
⠀⠀⠀⠀⠀⡰⠁⡈⠀⢦⠀⠠⢿⠁⠈⠙⢅⠀⠁⡄⣷⠀
⠀⠀⠀⠀⠀⢠⡀⠙⠦⠊⠁⠟⠚⠀⠀⠀⠈⣴⠀⠀⡇⡆
⠀⠀⠀⠀⠀⠀⢂⠃⡒⠒⢗⢄⠐⢆⠀⠀⠀⣿⠆⢠⡠⠃
⠀⠀⠀⠀⠀⢀⠂⢀⠐⠀⠀⢡⠀⠈⢂⠀⢀⣿⣠⠞⠁⠀
⠀⠀⠀⠀⢠⠃⠀⠀⠀⠇⠀⠰⠀⠀⠈⡆⠸⠋⠀⠀⠀⠀
⠀⠀⠀⠀⠓⠀⠒⠈⠈⠁⠀⠈⠓⠐⠂⠁⠀⠀⠀⠀⠀⠀

View file

@ -1,5 +1,7 @@
use crate::{helpers, system};
use super::file::file_open;
pub fn print_detail(title: &str, value: String) {
helpers::colors::print_cyan_bold(&title, true);
for _ in 0..(8 - title.len()) {
@ -10,4 +12,14 @@ pub fn print_detail(title: &str, value: String) {
print!("{}", &value);
println!();
}
pub fn print_ponyline(line: u16, pony: &str) {
file_open(&format!("ponies/{}.txt", pony).to_string())
.lines()
.skip(line as usize)
.take(1)
.for_each(|line| {
print!("{}", line);
});
}

View file

@ -2,12 +2,8 @@ mod helpers;
mod system;
fn main() {
helpers::print::print_detail("User", system::host::get_user());
helpers::print::print_detail("Hostname", system::host::get_hostname());
helpers::print::print_detail("IP", system::net::get_ipaddr());
helpers::print::print_detail("Kernel", system::specs::get_kernel());
helpers::print::print_detail("RAM", system::specs::get_ram_used());
helpers::print::print_detail("CPU", system::specs::get_cpu());
helpers::print::print_detail("Distro", system::host::get_distro());
helpers::print::print_detail("Shell", system::host::get_shell());
for i in 0..31 {
helpers::print::print_ponyline(i, "celestia");
helpers::print::print_detail("User", system::host::get_user());
}
}