diff --git a/notes.md b/notes.md index 2734104..b5414f5 100644 --- a/notes.md +++ b/notes.md @@ -1843,10 +1843,59 @@ Hassan Schuldenliste: # 2026-03-05 -LinkedIn-Notizen: TODOLOLLOLOLOL -- [ ] Thomas anrufen? -- [ ] Steam WTF -- [ ] Pandasay deployen +LinkedIn-Notizen: + +Mögliche Ziele von LinkedIn +- Sanity Check / Hygienefaktor +- Unterstützen bei Coldcalling +- Juuunge gar keine Ahnung einfach machen + +Allg. Themen +- Personalvorstellung +- Arbeitsalltag +- Lieblingsgetränke +- Stehschreibtisch +- Büroeinrichtung +- Umzug +- Events, Geschehnisse +- Linux +- Rust +- Demo of the month +- Programming Language Showcases +- Protokoll Showcases +- EU-Software Showcases +- Book Showcases +- DSGVO +- Cybersicherheit / -kriminalität? +- Programming Party Tricks + +Posts (Einzelne bis Handvoll) +- -> +- Caracorder +- Helix +- Pro-User-Pricing +- Scripting > Config +- Pandasay +- Verbotene Primzahl / DeCSS +- Doom +- Dinge die größer sind als SM64 +- Vib Ribbon +- Shader +- Recreational Programming +- cmatrix +- tmux +- Lobeshymne auf Immediate Mode GUI +- r/unixporn-Dinge +- DnD +- The Art of Computer programming +- Lars skript +- Wero + +- [ ] PL Logo fourier epicycles shader (Shadertoy) +- [ ] Games Syndicate Situation? +- [x] Thomas anrufen +- [ ] Steam WTF (warum existiert meine Notes Datei im Steam Ordner) +- [x] Pandasay deployen - [ ] Kino: Extraticket bestellen - [ ] Remagen - [ ] Mindmap Remagen #2? @@ -1872,3 +1921,134 @@ LinkedIn-Notizen: TODOLOLLOLOLOL - [ ] Hold notary appointment for both Anteilskauf and GF-Abberufung - [ ] Change Handelsregister (Notar does this) +# 2026-03-06 + +- [ ] GfM rückmelden +- [ ] terminal shrek movie + - std out lock + - clear character + - einmal pro Frame printen mit writeall +- [ ] Corni Abwesenheit Feuerwehr anmelden +- [x] Cow Hours -> pushen +- [ ] Linphone +- [ ] PL Logo fourier epicycles shader (Shadertoy) +- [ ] Games Syndicate Situation? +- [ ] Steam WTF (warum existiert meine Notes Datei im Steam Ordner) +- [x] Kino: Extraticket bestellen +- [x] Remagen + - [x] Mindmap Remagen #2? + - [x] Rausschicken +- [ ] Ella Media + - [ ] Vertragsentwurf erstellen +- [ ] Rechnung Sholti +- [ ] Übersicht aktiver Verträge? +- [ ] island Hero Frame Vorschläge +- [ ] Mails schreiben für mündliche Prüfungen +- [ ] Ust Eigenbelege +- [ ] Büro nochmal anfragen? +- [ ] Weitere Leads Thomas +- [ ] Physik +- [ ] Führerschein informieren + - [ ] Finanzierung durch GmbH + - [ ] Fink: 65€/h? + - [ ] Theorie üben +- [ ] Bob +- [ ] csv Editor +- [ ] Wojtek & R1 + - [ ] Termin vereinbaren + - [ ] Hold GSV for Wojteks end at PL + - [ ] Hold notary appointment for both Anteilskauf and GF-Abberufung + - [ ] Change Handelsregister (Notar does this) + +# 2026-03-09 + +- [ ] Morello updaten +- [ ] GfM rückmelden +- [ ] Freitagstermin Thomas schicken +- [ ] Thomas antworten +- [ ] terminal shrek movie +- [ ] Corni Abwesenheit Feuerwehr anmelden +- [ ] Linphone +- [ ] PL Logo fourier epicycles shader (Shadertoy) +- [ ] Games Syndicate Situation? +- [ ] Steam WTF (warum existiert meine Notes Datei im Steam Ordner) +- [ ] Ella Media + - [ ] Vertragsentwurf erstellen +- [ ] Rechnung Sholti +- [ ] Übersicht aktiver Verträge? +- [ ] island Hero Frame Vorschläge +- [ ] Mails schreiben für mündliche Prüfungen +- [ ] Ust Eigenbelege +- [ ] Büro nochmal anfragen? +- [ ] Weitere Leads Thomas +- [ ] Physik +- [ ] Führerschein informieren + - [ ] Finanzierung durch GmbH + - [ ] Fink: 65€/h? + - [ ] Theorie üben +- [ ] Bob +- [ ] csv Editor +- [ ] Wojtek & R1 + - [ ] Termin vereinbaren + - [ ] Hold GSV for Wojteks end at PL + - [ ] Hold notary appointment for both Anteilskauf and GF-Abberufung + - [ ] Change Handelsregister (Notar does this) + +# 2026-03-10 + +- [x] termshrek mp4 panic +- [ ] Sarah schreiben +- [ ] Wojtek Geschenk +- [ ] Anh-Tuan schreiben (Schlüssel + Geld) +- [x] Elmar anrufen -> Er meldet sich Donnerstag +- [ ] Flaschenpost +- [ ] P5 rückmelden +- [ ] Noch was bei Uni? +- [x] Morello updaten +- [ ] GfM rückmelden +- [x] Freitagstermin Thomas schicken +- [x] Thomas antworten +- [x] terminal shrek movie +- [ ] Corni Abwesenheit Feuerwehr anmelden +- [ ] Linphone +- [x] PL Logo fourier epicycles shader (Shadertoy) +- [ ] Games Syndicate Situation? +- [ ] Steam WTF (warum existiert meine Notes Datei im Steam Ordner) +- [ ] Ella Media + - [ ] Vertragsentwurf erstellen +- [ ] Rechnung Sholti +- [ ] Übersicht aktiver Verträge? +- [ ] island Hero Frame Vorschläge +- [ ] Mails schreiben für mündliche Prüfungen +- [ ] Ust Eigenbelege +- [ ] Büro nochmal anfragen? +- [ ] Weitere Leads Thomas +- [ ] Physik +- [ ] Führerschein informieren + - [ ] Finanzierung durch GmbH + - [ ] Fink: 65€/h? + - [ ] Theorie üben +- [ ] Bob +- [ ] csv Editor +- [ ] Wojtek & R1 + - [x] Termin vereinbaren + - [x] Hold GSV for Wojteks end at PL + - [x] Hold notary appointment for both Anteilskauf and GF-Abberufung + - [x] Change Handelsregister (Notar does this) + - [ ] Alle Verträge durchschauen nach Verpflichtungen unsererseits + - [ ] Übrige Verträge unterschreiben + - [x] GSV + -> Beim Notar unterzeichnet + - [x] Kaufvertrag + -> Notar hat eigene Version vorgelegt -> Beim Notar unterzeichnet + - [ ] Abfindungsvereinbarung + - [ ] Aufhebungsvereinbarung + - [ ] Wojtek austragen + - [ ] island + - [ ] Mail footer + - [ ] Siehe issue + data_update_checklist.md in soul + - [ ] Geld schicken + - [ ] Mika & Corni -> Wojtek (bis 08.04.) + - [ ] PL -> Wojtek (01.04.) + - [ ] Noch explizite Dinge um Mika und Corni reinzuholen? + - [ ] Schlüssel diff --git a/termshrek/src/main.rs b/termshrek/src/main.rs index edeb236..9b530d1 100644 --- a/termshrek/src/main.rs +++ b/termshrek/src/main.rs @@ -12,8 +12,11 @@ use ffmpeg::software::scaling::{context::Context as ScalingContext, flag::Flags} use ffmpeg::util::format::pixel::Pixel; use ffmpeg_next as ffmpeg; +const ASCII_GRADIENT: &[char] = &[ + ' ', '.', ',', '-', '~', ':', ';', '=', '!', '*', '#', '$', '@', +]; // const ASCII_GRADIENT: &[char] = &[' ', '░', '▒', '▓', '█']; -const ASCII_GRADIENT: &[char] = &[' ', '▁', '▂', '▃', '▄', '▅', '▆', '▇', '█']; +// const ASCII_GRADIENT: &[char] = &[' ', '▁', '▂', '▃', '▄', '▅', '▆', '▇', '█']; #[derive(Copy, Clone, PartialEq, Eq, PartialOrd, Ord, ValueEnum)] enum ArtStyle { @@ -23,6 +26,8 @@ enum ArtStyle { #[derive(Parser)] struct Args { + #[arg(short, long)] + path: String, #[arg(short, long, default_value_t = true)] keep_ar: bool, #[arg(short, long, default_value_t = false)] @@ -34,7 +39,6 @@ struct Args { struct VideoReader { input: ffmpeg::format::context::Input, fps: f32, - aspect_ratio: f32, dims: (u32, u32), decoder: ffmpeg::decoder::Video, scaler: ScalingContext, @@ -65,33 +69,29 @@ impl VideoReader { let decoder = codec_context.decoder().video().unwrap(); - // Find aspect ratio let width = decoder.width(); let height = decoder.height(); - let sar = decoder.aspect_ratio(); + let ar = width as f32 / height as f32; - let sar_f32 = if sar.denominator() != 0 { - sar.numerator() as f32 / sar.denominator() as f32 - } else { - 1.0 - }; - - let dar = (width as f32 / height as f32) * sar_f32; - - // Find target resolution let target_width; let target_height; let prep_term_height = (term_height - 2) * 2; - if dar > term_width as f32 / (prep_term_height) as f32 { - target_height = (term_width as f32 / dar).floor() as u32; + dbg!(&term_width, &term_height, &prep_term_height); + if ar > term_width as f32 / (prep_term_height) as f32 { + target_height = (term_width as f32 / ar).floor() as u32; target_width = term_width as u32; } else { - target_height = (prep_term_height) as u32; - target_width = ((prep_term_height) as f32 * dar).floor() as u32; + target_height = prep_term_height as u32; + target_width = (prep_term_height as f32 * ar).floor() as u32; } + dbg!( + &target_width, + (prep_term_height as f32 * ar).floor(), + &target_height + ); let scaler = ScalingContext::get( decoder.format(), @@ -107,7 +107,6 @@ impl VideoReader { Self { input, fps: framerate_f32, - aspect_ratio: dar, dims: (target_width, target_height.div_euclid(2) * 2), decoder, scaler, @@ -158,10 +157,12 @@ impl VideoReader { if let Ok(_) = self.decoder.receive_frame(&mut self.frame) { return Some(self.extract_frame_data()); } - } else { + } else if self.loop_video { self.decoder.flush(); self.input.seek(0, ..).unwrap(); packets_iter = self.input.packets(); + } else { + return None; } } } @@ -200,10 +201,7 @@ fn render_pixel_art(frame: &Vec<[u8; 2]>, reader: &VideoReader, buf: &mut Vec f32 { - let res = 0.2126 * f32::try_from(r).unwrap_or_else(|e| unreachable!("{e}")) - + 0.7152 * f32::try_from(g).unwrap_or_else(|e| unreachable!("{e}")) - + 0.0722 * f32::try_from(b).unwrap_or_else(|e| unreachable!("{e}")); - res + 0.2126 * f32::from(r) + 0.7152 * f32::from(g) + 0.0722 * f32::from(b) } fn render_ascii_art(frame: &Vec<[u8; 2]>, reader: &VideoReader, buf: &mut Vec) { @@ -216,19 +214,18 @@ fn render_ascii_art(frame: &Vec<[u8; 2]>, reader: &VideoReader, buf: &mut Vec