lainchan / λ

iris scan biometrics script (LFH)

lainon · 2024-05-05 09:42
Hi lain I'm working on a diy film and in one scene they use a tool to scan someone's iris I've come up with a very basic bash script that clears the screen then prints the updated image every time if someone could rewrite this so that the screen doesn't flickr to black upon every clear that would be great (actually updates the text instead of replacing it I guess) feel free to update the "mechanics" to make it look even more cyberpunk and futuristic, this is just a rough sketch to show the aesthetic and idea I'm going for please also put contact details in your code so I can reach out to you and properly credit you in the film's credits http://paste.debian.net/1316099/
Donna Hawthorne · 2024-05-05 11:23
>>39037 You can prevent flickering by moving the cursor and overwriting the text instead of clearing. I've removed all but the first clear, and used tput to save the cursor position and jump to it before printing the next frame. Best of luck with your film https://paste.sh/LyToR9k0#7J2Z_OzX2qZF1oza4BMxKRaE
Hitomi · 2024-05-05 11:50
Yeah what the other guy said, using tput is way easier than escape sequences directly. If you're looking to add more graphics a TUI library might get you further, something like ncurses or Tcell. You can get some cool blade runner-y UIs. Take a look at the example on this one: https://github.com/rivo/tview/ Your ascii art looks cool, are you posting about your project anywhere else? It sounds interesting