new notes, termshrek ascii mode
This commit is contained in:
188
notes.md
188
notes.md
@@ -1843,10 +1843,59 @@ Hassan Schuldenliste:
|
|||||||
|
|
||||||
# 2026-03-05
|
# 2026-03-05
|
||||||
|
|
||||||
LinkedIn-Notizen: TODOLOLLOLOLOL
|
LinkedIn-Notizen:
|
||||||
- [ ] Thomas anrufen?
|
|
||||||
- [ ] Steam WTF
|
Mögliche Ziele von LinkedIn
|
||||||
- [ ] Pandasay deployen
|
- 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)
|
||||||
|
- <QUERY> -> <QUERY><QUERY>
|
||||||
|
- 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
|
- [ ] Kino: Extraticket bestellen
|
||||||
- [ ] Remagen
|
- [ ] Remagen
|
||||||
- [ ] Mindmap Remagen #2?
|
- [ ] Mindmap Remagen #2?
|
||||||
@@ -1872,3 +1921,134 @@ LinkedIn-Notizen: TODOLOLLOLOLOL
|
|||||||
- [ ] Hold notary appointment for both Anteilskauf and GF-Abberufung
|
- [ ] Hold notary appointment for both Anteilskauf and GF-Abberufung
|
||||||
- [ ] Change Handelsregister (Notar does this)
|
- [ ] 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
|
||||||
|
|||||||
@@ -12,8 +12,11 @@ use ffmpeg::software::scaling::{context::Context as ScalingContext, flag::Flags}
|
|||||||
use ffmpeg::util::format::pixel::Pixel;
|
use ffmpeg::util::format::pixel::Pixel;
|
||||||
use ffmpeg_next as ffmpeg;
|
use ffmpeg_next as ffmpeg;
|
||||||
|
|
||||||
|
const ASCII_GRADIENT: &[char] = &[
|
||||||
|
' ', '.', ',', '-', '~', ':', ';', '=', '!', '*', '#', '$', '@',
|
||||||
|
];
|
||||||
// const ASCII_GRADIENT: &[char] = &[' ', '░', '▒', '▓', '█'];
|
// const ASCII_GRADIENT: &[char] = &[' ', '░', '▒', '▓', '█'];
|
||||||
const ASCII_GRADIENT: &[char] = &[' ', '▁', '▂', '▃', '▄', '▅', '▆', '▇', '█'];
|
// const ASCII_GRADIENT: &[char] = &[' ', '▁', '▂', '▃', '▄', '▅', '▆', '▇', '█'];
|
||||||
|
|
||||||
#[derive(Copy, Clone, PartialEq, Eq, PartialOrd, Ord, ValueEnum)]
|
#[derive(Copy, Clone, PartialEq, Eq, PartialOrd, Ord, ValueEnum)]
|
||||||
enum ArtStyle {
|
enum ArtStyle {
|
||||||
@@ -23,6 +26,8 @@ enum ArtStyle {
|
|||||||
|
|
||||||
#[derive(Parser)]
|
#[derive(Parser)]
|
||||||
struct Args {
|
struct Args {
|
||||||
|
#[arg(short, long)]
|
||||||
|
path: String,
|
||||||
#[arg(short, long, default_value_t = true)]
|
#[arg(short, long, default_value_t = true)]
|
||||||
keep_ar: bool,
|
keep_ar: bool,
|
||||||
#[arg(short, long, default_value_t = false)]
|
#[arg(short, long, default_value_t = false)]
|
||||||
@@ -34,7 +39,6 @@ struct Args {
|
|||||||
struct VideoReader {
|
struct VideoReader {
|
||||||
input: ffmpeg::format::context::Input,
|
input: ffmpeg::format::context::Input,
|
||||||
fps: f32,
|
fps: f32,
|
||||||
aspect_ratio: f32,
|
|
||||||
dims: (u32, u32),
|
dims: (u32, u32),
|
||||||
decoder: ffmpeg::decoder::Video,
|
decoder: ffmpeg::decoder::Video,
|
||||||
scaler: ScalingContext,
|
scaler: ScalingContext,
|
||||||
@@ -65,33 +69,29 @@ impl VideoReader {
|
|||||||
|
|
||||||
let decoder = codec_context.decoder().video().unwrap();
|
let decoder = codec_context.decoder().video().unwrap();
|
||||||
|
|
||||||
// Find aspect ratio
|
|
||||||
let width = decoder.width();
|
let width = decoder.width();
|
||||||
let height = decoder.height();
|
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_width;
|
||||||
let target_height;
|
let target_height;
|
||||||
|
|
||||||
let prep_term_height = (term_height - 2) * 2;
|
let prep_term_height = (term_height - 2) * 2;
|
||||||
|
|
||||||
if dar > term_width as f32 / (prep_term_height) as f32 {
|
dbg!(&term_width, &term_height, &prep_term_height);
|
||||||
target_height = (term_width as f32 / dar).floor() as u32;
|
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;
|
target_width = term_width as u32;
|
||||||
} else {
|
} else {
|
||||||
target_height = (prep_term_height) as u32;
|
target_height = prep_term_height as u32;
|
||||||
target_width = ((prep_term_height) as f32 * dar).floor() 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(
|
let scaler = ScalingContext::get(
|
||||||
decoder.format(),
|
decoder.format(),
|
||||||
@@ -107,7 +107,6 @@ impl VideoReader {
|
|||||||
Self {
|
Self {
|
||||||
input,
|
input,
|
||||||
fps: framerate_f32,
|
fps: framerate_f32,
|
||||||
aspect_ratio: dar,
|
|
||||||
dims: (target_width, target_height.div_euclid(2) * 2),
|
dims: (target_width, target_height.div_euclid(2) * 2),
|
||||||
decoder,
|
decoder,
|
||||||
scaler,
|
scaler,
|
||||||
@@ -158,10 +157,12 @@ impl VideoReader {
|
|||||||
if let Ok(_) = self.decoder.receive_frame(&mut self.frame) {
|
if let Ok(_) = self.decoder.receive_frame(&mut self.frame) {
|
||||||
return Some(self.extract_frame_data());
|
return Some(self.extract_frame_data());
|
||||||
}
|
}
|
||||||
} else {
|
} else if self.loop_video {
|
||||||
self.decoder.flush();
|
self.decoder.flush();
|
||||||
self.input.seek(0, ..).unwrap();
|
self.input.seek(0, ..).unwrap();
|
||||||
packets_iter = self.input.packets();
|
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<u8
|
|||||||
}
|
}
|
||||||
|
|
||||||
fn luminance(r: u8, g: u8, b: u8) -> f32 {
|
fn luminance(r: u8, g: u8, b: u8) -> f32 {
|
||||||
let res = 0.2126 * f32::try_from(r).unwrap_or_else(|e| unreachable!("{e}"))
|
0.2126 * f32::from(r) + 0.7152 * f32::from(g) + 0.0722 * f32::from(b)
|
||||||
+ 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
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fn render_ascii_art(frame: &Vec<[u8; 2]>, reader: &VideoReader, buf: &mut Vec<u8>) {
|
fn render_ascii_art(frame: &Vec<[u8; 2]>, reader: &VideoReader, buf: &mut Vec<u8>) {
|
||||||
@@ -216,19 +214,18 @@ fn render_ascii_art(frame: &Vec<[u8; 2]>, reader: &VideoReader, buf: &mut Vec<u8
|
|||||||
let greens = frame.get((idx + 1) as usize).unwrap();
|
let greens = frame.get((idx + 1) as usize).unwrap();
|
||||||
let blues = frame.get((idx + 2) as usize).unwrap();
|
let blues = frame.get((idx + 2) as usize).unwrap();
|
||||||
|
|
||||||
// color
|
buf.extend_from_slice(
|
||||||
// buf.extend_from_slice(
|
format!(
|
||||||
// format!(
|
"\x1b[38;2;{tr};{tg};{tb}m",
|
||||||
// "\x1b[38;2;{tr};{tg};{tb}m",
|
tr = reds[0],
|
||||||
// tr = reds[0],
|
tg = greens[0],
|
||||||
// tg = greens[0],
|
tb = blues[0],
|
||||||
// tb = blues[0],
|
)
|
||||||
// )
|
.as_bytes(),
|
||||||
// .as_bytes(),
|
);
|
||||||
// );
|
|
||||||
let mut extend = [0u8; 4];
|
let mut extend = [0u8; 4];
|
||||||
buf.extend_from_slice(
|
buf.extend_from_slice(
|
||||||
ASCII_GRADIENT[(luminance(reds[0], greens[0], blues[0])) as usize
|
ASCII_GRADIENT[luminance(reds[0], greens[0], blues[0]) as usize
|
||||||
* (ASCII_GRADIENT.len() - 1)
|
* (ASCII_GRADIENT.len() - 1)
|
||||||
/ 255]
|
/ 255]
|
||||||
.encode_utf8(&mut extend)
|
.encode_utf8(&mut extend)
|
||||||
@@ -246,7 +243,7 @@ fn main() {
|
|||||||
term_size::dimensions().unwrap_or_else(|| panic!("Could not find terminal dimensions"));
|
term_size::dimensions().unwrap_or_else(|| panic!("Could not find terminal dimensions"));
|
||||||
|
|
||||||
let mut reader = VideoReader::new(
|
let mut reader = VideoReader::new(
|
||||||
Path::new("/home/jan/Videos/rotating_panda.mkv"),
|
Path::new(&args.path),
|
||||||
args.loop_video,
|
args.loop_video,
|
||||||
term_dims.0,
|
term_dims.0,
|
||||||
term_dims.1,
|
term_dims.1,
|
||||||
|
|||||||
Reference in New Issue
Block a user