 So that's it. I'm here at the present. This project I've worked on the last year or so on my spare time So at some times it's all projects at some times I'm more more involved into it and doing things all the time and then sometimes I stop and now there are a couple months I don't touch it at all, but I think it's a fun thing to mess around with So we've had this future on internet of ASCII art and We also have on the other hand an active group of people creating a lot of characters a lot of things to use with Unicode that would allow for a lot of nice art ASCII art. I do not have a way to actually use it We don't have a nice tool that will let you use all the nice Unicode funny characters with ASCII art even older Unicode characters Like we have we have had character blocks that are Unicode characters that are to be divided into blocks that could be used as pixels like since forever and There is no tool that would allow you To use these pixels to draw unless you type them by hand So these these characters should be divided into four parts that you can use to draw As far as I know, I've met them first time in Sinclair computers back in the 80s and back then you could actually draw because you were very limited So you'd actually type that into the source code of the program and have your drawings come closer there And this product brings back a little bit of this my idea is to To allow anyone to write code To draw with ASCII art as if you were drawing on an image So I'm switching now to To share my screen just a second. It's here So the screen sharing here Okay There it is Here here, and I'm working at this terminal Let me check on the IRC if someone has So anything you have I guess you have to type on the IRC LGM workshop channel I'll be watching it from time to time, but I may forget so Timothy you may warn me There is something popping up there in red Okay So here on my new next terminal The project is called to me need you maybe should okay, it's on IRC. Oh, sorry on github Hosted as a Python project I had last made a release so you could install it easily over in a year ago. I made a new release yesterday night and Now it should be good to go with All bells and whistles so for anyone following us I can I will start with an empty Unix directory. So let's see Here Here yes, okay. I did this show. I was hoping it wouldn't show Okay, so I'm starting with a new new Directory just because I'm starting a new Python project. So if you are a hard time Python coder, you know how to do this. Otherwise, you can install it for you as an user. Just type in a single comment Okay, so I'm creating a new Python virtual in We can have a separate project where I can use it Stermini the project. Otherwise, I'll show you the comment to install it directly user-wide So I'm creating a new virtual in Python How to put Python free here. Well, this creates a local installation of Python this directory and I activate it using this comment And now Once it's installed, it's activated. I can type install me need you just like this Seconds So it's a pure Python file The only dependency it has is this click library for common line things And it comes up with a few examples of what it can do. But before going to do the examples So it's usage So The idea with this project is to allow people who wants to draw just to sit down and And make the drawing as easy as it's possible without having to think about without have to do to deal around documentation and Documentation is a major fault of it actually. So the more I advance the aspects I'll be teaching on this workshop and Aren't easy to find around unless you you check the code yourself But this single first part so if I start Python here I'm starting up by hundred seven on these your toys and Here I can import the project just like this It's correctly installed And The easiest way to use it is that I have made a print function. That's analog to Python's all print I don't know. I don't know if this font size is good on this on this streaming. Maybe I can So the resolution is low. So just put it a little higher Call there for some focusing on this Okay Okay So, hello GM, this is analogous to Python print except that he Sides normal parameters for print you can also put things like a scholar Oh And background the spring It however doesn't doesn't preoccupate about set resetting the terminal So the idea is that okay. I just want to use all these Not only unicode Power for ASCII art, but also the the terminal for coding has had a lot of features And we don't have an easy way to access it if you want to print a color it it's Common for you to check it by the source code of programs not only Python but others where people have to type in the the Scape sequences for changing color by hand if they want to print some text in red or something Okay So This is the low-level or a very high-level user The feature you can just print it I think you have here some German media for just reset the background or I have some default value somewhere That is yes. Ah, so the auto-computer won't work Should be reacquired. So my my idea is to expose so I This should come back at least for the default background here to reset the terminals Let's check your see I guess no one Yeah, so people suggested I Python actually I Python is how I use it I just wanted to give the less information possible for people to start with so of course this Python thing This is the traditional Python Interpreter and I Python had the advantage of it that it resets the screen settings after each each thing printed So let's install a Python as well people install. So this is how I actually use it There is Um Well, this is a fraction fraction experiment. There's just the people install terminated people install a Python Oh, yeah, and actually I use it does this port the media There's a lot of functions and colors and on stuff are already present in the the main module I just did this in the way of No P and pandas So we can have access to each other good things Oh Besides changing color you can set up some effect is on Effects are here tn dot effects And on all the completely show you a lot of off So these effects blink for examples for having blinking text and since we are all up high Python it reset the stream back But these terminal effects are not easy to to use although they've been present in unix terminals like for 30 years maybe now and You just couldn't sit down and write a short script that would make use of then unless you'd research all over the internet On how to turn this on and have to print complicated sequences to turn this on turn this off So one of the purposes of terminated library is to make this easy. Okay, you can use this There are other effects there that are not as known under normally Around in all terminals Some of them double the we default the characters so they don't show well in the print thing, but I guess The circled thing So for example, or maybe it's in circles Yeah And I actually combine the two things I have the activate terminal effect and some of the effects instead do a translation of the characters To use unicode equivalent so you can so this is one thing you have had four years Unicode characters for all characters that have a circle around them, but unless you are Copy and pasting these from from a character table. You didn't have an easy way to use them The idea is the ideas of terminated to make it easy problem of this Using these like this is that these characters the hello LGM. They have a double we if Undetermined program I use in Kent Cove with that So always solve this kind of thing So to me it has another level of usage where this instantiate and screen object The screen object to then allow you to paint Or not text the area like a canvas and you cannot be able to terminate with it if you want That is more interesting for for most sophisticated stuff Okay, just Let me check Yeah, we can I can show the screen right now So instantiate the screen like this false to the terminal size and if I type in See the update it just raises screen It does feature a draw Name space here where we have an drawing IP API you can just type things like okay from your line Then you put two coordinates X first Y second so the only line is starting on column 5 line 5 and go to column 30 line and it passes the colors and stuff and But if I do this it should draw the line there And move the cursor just behind a bush below it to update sleeve and If I want to just see things drawn up Dipper part of the screen the best thing to do is to call an update whenever I type a comment And this thing is kept on a memory area and An image that's not not unlike a layer of an image when we are using a traditional painting software and I can control the colors and stuff by doing the context So I don't have to test the colors every time Here Link doesn't work like that. Let's draw a second line the following row Okay, so this is a side effect as I told you I have a couple months using here Without using the thing it shouldn't have made the first line to blink Okay, I have to think what why did it affect affect the red line as well, okay and clear So I have a couple things here The drawing API those feature a few functions on my plan to enrich it in the future But you can actually do busy lines lines ellipses you have the context thing so you can can change the colors in there And you have a busy lines Rectangular ellipses and the fun thing starts when we draw with the block characters. I thought I've told earlier So before we do that When we installed Terminidia, there are a couple example programs I opted to make them make available on the on the screen itself. Sorry on the shell itself In here Python terminal On Yeah, so I'll go down that That it also works with normal Python. I Python is normal Python. It's just enriches the shell But yes, and just by selling Python itself. You're ready to go and Can So it's your time in India here and terminal itself You have on he told complete you have these These programs most of them are just noisy things. I wrote quickly just to check check some feature everything so lines But some of them are actually easy for And some of them I made for for having Whoa, this this can look vintage you can look fancy effect Rather than been right away useful, but can they can be more useful than that? But I mean the text by itself won't erase the screen if you do it saying without raising the screen what it does is using An 8-bit font that is embedded into the project to draw larger side text using the drawing characters So just like this So What happened here? It didn't use if you check the text height of one letter It's it's pixel on the terminated text there. It uses half height because If you check the media text of options here And I can I can use different sizes text so I can do it can be media the color to read Right Yeah, there it is a full character block each one using eight by eight space And if I want to clear the screen, I just pass the switch you can do this So this is what did you get normally when trying to do this sort of thing? Okay, so each pixel is a full character on Okay, there are other ways to do that what The media has a few is that it can do the half size of that so here Each pixel is one quarter character in size and you can do that On the drawing API, it's a simple simple thing to do the other examples are Minidia image it loads an image and displays it on the terminal just like that Okay, by default when I installed it the package without specifying an image it has a moon for the group I would just change the size of the terminal because I'm not sure what happens when there's a peeking There it is So so this is another thing we usually don't know we use it to think of these terminals as Having just eight colors and actually for a long time now Linux virtual terminals can have any color you want you can set any of the 24-bit address of the colors for any character on the terminal and you can translate that factor there So maybe this starts getting interesting when you When you not only can output the image by using terminator image, but you can also output this this image to a text file Until we need your image can do that Okay, so I should I should have made available some some small size images around here this this movie mage It's all save it in the ASCII image type that PBM file And terminator can read it on its own it can decode the file itself if I want to display JPG images or PNG mates. I also need to install Python image library. So I have to be install Now I can get any image on internet Terminita. I haven't a perfect some Some butterfly images I'll use one of that because it's ready here. I just copy it here CP should be a time Yeah Some of those butterfly Here so let's check if it's a nice size Is the original image? It's Killed down, but I mean you can scale it all on its own and itself Um, and I can do that we need you Image butterfly the PG. We are the butterfly What I can do this thing We need yeah, I can designate an output file On a backend thing so I can do this that we need your image So it ran and now I have 40 kilobyte, but they're not a texting which embeds the the control sequences for changing colors of text and the text file and I have Text file that went displayed inside UNIX a single comment like this just in major near terminal So this is one one way that UNIX hackers can can play around with this thing you can Just create the image you want unhappy display like this Okay The Image drawing thing can't directly use the high resolution Resolution blocks yet. It can be coded. Yes by using the library for whatever programs in Python But if you don't code at all, you can just install to me need you if peep install like I did in the beginning of the tutorial You can convert your image to ask a text that can be shown the terminal So if you see the flash which won't render The control characters directly it actually will show you the you can see the contents of the file So here are the escape sequences that made the color changing and the only character is actually a blocky character That's the one you can see here time to check texting put Yeah, so about the low res low res actually make it so you can And Actually one thing Sorry, oh, yeah. Yeah. Yeah. Yeah, we're not about the streaming. Okay. So one thing is that these terminals nowadays they can get so You can actually get like 200 columns of text like here and if you double it when that with the highest thing you can have 400 pixels across which is more than you would have a resolution 8 bit computers where some of us started drawing and Doing things like how my first computer had 256 pixels wide on the screen So, yes, the idea is that you should be able to write small games with an h-ish feeling and have playing there and straight to the terminal and And actually one of the first things I did when I started writing this thing. It was right such a game One of the other demonstrations we have here is I mean it is like Have a full snake game here Using the unicode things you have to nowadays For the one Apple character there. It's an ET town. I have points This was written over in the near ago when with the first capabilities of the library and All the things I've been postponing to write a full space invaders game here could even start it now This comes tall it comes with it Ah, what I didn't say is that if you're not a regular price and user you have Python or UNX machine You can install it with both the virtual and thing by writing this comment Third term in Egypt three So if you are in an Ubuntu or Fedora or Linux distro and are not a Python person You can just do this on the terminal and just use it right away Let's go back to the programming part I'm gonna show some of the capabilities of the thing and then We could start doing something cause Most of the time I spent hacking on this I spent hacking on new features But I didn't spend any time using these features to actually make drawings So one of my my objectives with this workshop is Having a few of you engaged in trying to use this thing for real and then you can start to me asking me for features That are people will be using I have a lot of features that But no users So one other one other demonstration that's worth seeing is that So we mentioned that have the blink effect and other effects that it can turn on is to You can just use them along with the print statement or it can use on the screen But then one of the demos is that we need you So here we have some something So we have both so the first few effects are embedded into the terminal To the faint thing the concealed thing as well and Some others are documented, but that didn't get any terminal program that would actually use them like the Double underline or frame it thing none of them would work From in-circuit on below But we're overlined, but it's not in order Overline and I think it's terminal effect But some of the other effects there negative squared Paranthas is it are actually translations of the characters into unicode characters And you can have all of these easily inside the terminities a Python script using terminator just by passing the effects Parameter to the print The upside down I Sourced across the internet a lot of hacks that would translate so it's not One-to-one thing you don't have actually upside down unicode characters for some of the characters you have to hack around so like this D of hello world is probably just a P. There is a translation table inside terminator That I sourced how I could from the internet crossing up some of the best translation tables for that on the other hand and Some of these I actually check it later are not Guaranteed to work on any terminal or any combination the super bold effect, which looks super nice here Maybe can get you a few bad surprises. It's mean it actually does use some unicode characters meant for Location presentation or something and then some letters pairs all of a sudden can translate themselves into the flag of a Country like if you use us you could have instead of the letters you and s on use when us flag emoji So it's not the quantity to work other ones Do not look nice here because I have the thing that the terminal program doesn't know how to deal with the character we leave but then When green back to their Python environment And Minigame screen When you use the print inside the screen it just tried to guess actually It used it it constitutes the character Table to check if the character is wide and it tries to put it there Using two characters cells. So this should work better As you see row zero line five And we append some update here. Oh, it's still still Not working and your mileage we vary with the terminal programming. I'm using I'm using here Katie terminal We've been on terminal. We have Some some difference for example the the Apple Unicode thing you had for the snake It's an actually full-color MOG or on the you know terminal and This variation get here is cause of the font. So we have for some reason and we might set up We have some font that has the two in circle two in one font and the encircled zero in another font that use it on the site and So anyway Now I've demonstrated demos. We had an idea. I Showed I've shown the drawing API API in its basics when you control full connector block, but you can also draw with The one quarter block, which is an interesting thing to do So if I do here That thing is to here. Hey, I mean writing over the screen, but it's kept in a frame there So I want to get rid of these I better hear it And then if I draw On the life ellipses like this Doesn't look nice at all, but just for us to compare it so up to Call on 30 raw 15 Like this and then Otherwise it moved the cursor for the half of the Lipsy. Okay Why did I do this because you have other name spaces here that allow you to draw in the higher resolutions? Let's say There's actually a very interesting Python project as well Because unlike what we have to do when we were working professionally when all you do we code in is processing commercial data My names and values and things and everything you get of fun for programming is already done by the people who wrote to the frameworks you are using Here I could actually Write everything from from start. So I came up with this namespace that we use code So a nice surprise for me when coding this is that when I made after I made a draw API and made the high resolution mode work I could adapt the drawing API to use the high resolution with less than 30 lines of code So inside the high you have also a draw and you're drawing high resolution. So but here I start on 60 and will come up with colon You'll have the same ellipsis drawn with one quarter corrector blocks Okay, I made this so I went down research and stuff and I found out that are actually Defined some unicode briley characters that allow you to have For for all by two columns Pixar arrangement inside each block of each character block and It actually so I actually implemented that but the problem is that You'll have to find the right font to display the briley characters as pixels. Otherwise, they don't look nice at all and They don't look nice here if I do but Just to show it working. I have also the briley resolution here. So it has the same number of columns as the high resolution would have to twice the twice the vertical density Yes So there it is. So the particular character set I'm using for briley here does show the empty dots from Riley, which is not nice, but and also They do have a vertical spacing from one character to the next so they actually don't plot well But you can have an idea of what you can get if you have the right setup for this and There is also an intermediate resolution that gives you square square aspect ratio because all of these have a Tall aspect ratio, I mean the pixels are twice as tall as they're all I what are white Okay Then so the text API this one thing that should get some improvements but That is that we need a text demo there And I made it available in Python just like this. You do is see you have a screen. You have a text name space here Then when doing text, I thought about okay, but then I should write instead of having Name space like this. It's like this. You select the size here But that is for is the text using the fonts that are for characters high using An 8 by 8 resolution for each character. Oh, then I have the Function there. Ordinates here on a text here And any color or anything everyone here is I don't put the update thing. It works. So it moves my cursor up there Okay And so you can work from Python and compose your image inside your screen And then you can render it to a text file like the one we had seen before and It is as simple as So this thing is new You have this screen object here the representation of it have some data on all the context other things But inside it you have a data thing is that the thing is some Shape object shape object is the name I chose to to handle images actually the ask your teammates are shaping objects And you can just it has a render method And it's a simple as pass in a file name for it. Oh I'm thinking a Think I broke it on the last couple months. I had not use it, but should you work like this one I tested yesterday. So, okay the text Dex backend is failing, but I have a tel surrender ASCII RQ ATML So you can now do this It doesn't complete the same in it text or it might complain actually so it does complain because it's text Just rename it. Oh stupid crumb. So there it is. Okay. We didn't fill the background. So it puts the each character block have Did it show parts that is yellow then and then the background is black And you have to set and fuel fuel the background actually if a black thing if you want to block text But this work this way just I can compose your art in the Python terminal by using a lot of comments and then just calling render to create you a Text file or an ATML file ready to display your ASCII art and of course And then show one other thing Of course a cat you close the door. They want to come insane if you have to stop and open the door Yeah, I'm back to the very same screen And This thing so I can also Show the context And I set up the color background color, but you can also change the character use it to draw. So instead of full block There you can just put whatever you want there and then if you write So if I do text 8 Use as risks because I set that on the context What's the high resolution? We always have to use the same same characters But you can change it Whatever character you want I'm gonna have an API to allowing you following to draw on actually use These shapes of image more or less like you we use layers on a painting program But I don't know if you're interested in seeing that maybe maybe a few more demos I'll need some feedback to know where we go from here So I don't have a single cat I have a single cat that's trying to come inside the room actually No, she'll just stay there Okay, um I'll show you some of the other demos Or maybe we do some code because I think coding we'd get close to one of the demos that is this one So besides playing things if I want to do games like I did with this next game One thing that's hard to do in the terminal as well is to get Keyboard input because by the four you have to By the four you have to wait for the person to type a whole phrase and press enter So your program can can process that and When some of us started back then and the 8-bit computers was much easier than that you have a function column basic That to just tell you if a key was pressed at that very moment or not Uh, what I made is to recreate that function so you can use it in python so, uh I have to turn on special mode for it to work But anyway, as we had the demo Can do this delminidia shape Size more demo that doesn't raise the screen for a full effect And because most ship I can move around if there are keys nice thing is what I have to type to draw this this motion around is that I actually Uh, what's worried about easy ways to define the shapes you want to use as ask your art inside your code So if we if you see the code for the exterminator shape code thing I dig into some code here So these are the example files And you have the image here So the ship I don't know the image is one of the doors the moon its shape Yeah, so that ship is actually reading like this And I have another ship That's written like this I put the dots here So that the programmer editor want To strip down the space here. I need the spaces to define the ship And I have this more sophisticated ship here that use more than on character type And I have a color map So I can use this second shape with this color map And we have Unless I made some some shapes here I made everything available by command line So Okay, just shape it to you If you want to create the screen just see I have the big ship On High it does the same ship in high resolution Um Have it and without See you can walk around your ship At this time without artifacts don't ask me why Not without clearing the screen. We don't have the artifacts unfortunately I can't have Anything in the code to interact with what was already on the screen You can't read what is on the screen back to your code because it would be be some nice thing to do But I can of course write new things while it's running and then it knows about what's there But I can't I've made it the ship shoot and Score points called it hit an e letter from here, for example Well these um Okay So next thing maybe Is that the the api as I said getting quite fancy And I Built up some transformers things that allow you to actually code anything you want when displaying Explain an image there As we are talking about code that that means for example, you can you can say that um On on even rows the character is an asterisk on on an odd rows the character is another thing You can do and you have um gradient So you can have gradients in text I think that one of the easiest ways to to show gradients working is to have some text Back uh, but now the other time I just drew the text directly on screen For these uh gradients and effects to work transforming effects to work I actually have to create separate in-memory images for them then I'll apply separate elite transformers for these these Separate images when they are being bleep So I actually have uh like I said before DD The same thing you have in a drawing program and you have layers for an image You have here you have Or as I was Thinking in a gaming context uh, I have for the screen or Any image as a db it can have a sprites thing And these sprites can contain other images that are just from it as they are set So let's let's take a look at this um So I create a screen so uh But yeah, so how long is this workshop we have one hour or one hour I have I have some time. Okay. If it's up to two hours, so um, Uh, I want some feedback of what we can do because if we have a full hour now We can even code some some really nice thing here a nice program using this from restart Yeah, okay. So I show this Um, because this is harder to get by the documentation And then on this video can can access the documentation as well So I've shouldn't have the data name space Which is a shape and it has some some functions on something there but it has sprites in sprite container And in two sprite containers, I add other shapes and to create a new shape. I do this in shape This is a factory function This is smart if I pass it a file name to try to read the file name as an image And if I pass it a size it will create a layer of this size. So I want something with 80 columns eight ten rows This right here And I can draw text there So I can just uh So how do I draw text there? It also features a draw name space And I can do the the same things I did there. So I can fuel it Basically, I have a rectangle And I can stamp it on the screen. So this s c object to my screen It's how it is shaped For the position I want Like 10 10 And what I want to be there There we have we have super super low resolution. So the 80 rows maybe is hitting the end of the screen I'll do a smaller one Put your feet on this terminal size For this But if I stamp it this it actually copied the image data To the the screen data under this template there it's uh Overwrote whatever was there If I don't want to override things I do the sprite thing So I do it like this Screen Spates add My shaping I can say it's active And I can say it started position Uh first row Sorry First row sorry Ah, okay, but this shape is now empty So I can do I still have a drawer that I have a text Text there For the same year during api you have for the screen you have for any sub image you create There it is And difference now I can relocate this so even if I if I do draw something on the screen I can relocate that And that that this holds separately like like a layer on an image editing program The I can do So if I do screen This writes it's at the position zero. This works like a listing python for whoever's a python instant I'm just on the position here And so there are quite a few magic around here. So you see I have a victor a vector object instance for the position But I don't have to worry about instantiating that I can just locate it by putting it um, okay Put it at column zero Like this just a tuple It automatically converts To that vector object It's a quite neat software project using pythons for back inspection stuff as well. I need to draw here It is Move it here And if I had a background ascii art on this on the screen it'd be entouched. It's just uh I can move things around without having to worry about the background And Them uh, so to recapitulate we have A few object categories there. We have the shape category. It's like an image And the shape this hold a sprites container Which can have other shapes And these can be placed arbitrarily anywhere on the first shape just like layers on an image and uh these sprites They can have that transformer thing the transformer can Can be a python function That you get any of a number of parameters Unconverted I can I can do leave conversion of Of the color the character being displayed background color uh So it's like a A non-destructive drawing thing You have on this you have to set up on this api you can have like So I have the c sprites Position zero is not the same as the d s h object I had It uh, it's sprites. It's not the same as the this contain this. This is the thing where I wrote the lgm text in These also have a transformers container And So this is a bit more complicated But just to know to show the possibility of it So I can add a new transformer that have a gradient That you made the change the color change So, um It's quite a nice effect to see in text when I first made this work and I saw in the terminal I just okay. Well Because we usually have just this eight colors in terminal few applications. They use the full color thing and So we'll make a gradient for a light blue to a darker blue And there's some gradient And that is to a transformer Great gradients it goes like this Is it a list of pairs? And each pair has a stop location which goes from zero to one So zero is the start of the gradient One is the full length of the gradient I can even put more than one And the second component of the pair Is a color listed as a triple Or I can put the color name as well Just to this or least the color is a triple So if I do a gradient from zero, uh To one it is red, but that's not good. Let's put some some light blue here So zero four four one So from white to light blue It made all the parentheses right. This should work. No mixing parentheses or extra parentheses there I think it's right Should work That's right. No, it's definitely missing Let's check It's excluded there Ah, this one is missing This is a gradient thing And for whoever code in python The nice thing is this work with the syntax of It yields a color And you just put the point you want the color at In the index here. So at zero it does have that color It wants to have that color and have intermediate colors as you put it here And also internally it holds integer colors from zero to 255 But you can you pass the colors in floating point if you want when you create them It's quite smart on that So an intermediate point you want you get the value of the color there And the transformer object then takes this gradient thing and applies it to She'll taste bright So I do sp1.transformers It I think it does have an edge. No, it's just a normal python list Almost normal because you can only add a transformer object there Gradient transformers are not in the main model Transformers gradient transformer, okay And then I pass it My gradient is parameter here. So I guess should all that is sweet. Oh, it is there um But maybe it's not clear enough Because it's just subtle I will make it move all the way down to red. So create a gradient End of this sub the color. Let's just put full blue here Then after going full blue Up cause actually the gradient is Applied to the full width of the shape. So it's 60 column. So maybe it get that the full light blue around here So I put 60 columns Anyway Go to full blue or Almost there and then another color here We can pass the colors Thank you to convert internally for a python to a color object Okay And I have to pop the transformer. So this work is just like a python list. I don't want to transform it anymore. Just throw it away So this gr is my new gradient It is I need So I'm getting blue here probably to come come red here So this allows one to to draw a lot of stuff now. I need to know if I have questions or requests or we do something Okay, so we've been close to the image there Check what is So what is this thing? Yes, so there's a pattern there. I I didn't do the detail anything yet, but there is space for it actually So if you see If you see the project structure The only sub folder I have In there I have some flat python files here with all the logic thing but for the transformer strings, which the Coolest part of this one. I can really play So it does have a folder And I intend to fill this up. We have So some some convolution transformations here, which can transform single lines Into complex ascii tables And So I showed this one some ideas was I I didn't come back to stop Sorry My idea is to have a way to draw Fancy unicode tables with all the corner characters and stuff By just applying a transformer. So you draw a blocky rectangle around your your your subject text And then you apply a transformer that will make Full blocks appear as lines And I have it working here With a basic basic ass yard But this work So if you create another shape right here shape you and Yeah, I'm not 40 20 I draw some rectangle on it inside it so I started one one go to Just avoid the corners because um Like peeping knows the abyss thing can can complicate things the edges when you do convolutions. That's always a problem So let's just do the 39 19 is quite good for me. But this draws a rectangle there In memory I want to stamp it. I added to my my my image. It's just like It can be made by default the entire scene is black to me. I should pass this one Let's throw it on the So if I add a transformer to it, I thought I want the last insert that the image here just Minus one index I actually forgot the name of this transformer But I guess it is readily available there Otherwise, I have to check the course code Formers, so I have the kernel transformer there have a delay, but I think I have the table Search code for the name of it So this one and the this file should import it So the example I have is the delay team block here. I guess I have to I have it in an example, but I don't have it readily available I have to import the kernel. I have to pass it as the kernel here So I have to import. Let me see if I don't have it Made this one night and never carried to you made it more readily available, but it's in there Kernel transformer And I need to pass it. I hope it's imported Transformers I think I have to import this thing this line I added a transformer, but actually This sounds a bit complicated, but it makes quite a lot of sense when you have the parts on your mind. So, uh Just showing the possibilities here Nothing Not to pretend anyone would have this on top of the mind when they use it So, okay, pass the transformer the kernel which imported there this Um, the image is just a block If I if I speak up the char is just a block char But what I have here in this very code is a python dictionary Where the key Is a Nine character string which I write like this. So I have a three by three character block And I say, okay when you see this configuration of empty space and one character here You put the plus character When you see this configuration Of one character here empty space around you use the pipe character So these uh So these things will translate to two pipes plus signs and underlying signs So you can uh, actually The nice thing here is that uh, I have the shape still as in memory If I draw a line from here to here and from here to here, it's automatically updated there So I have the shape to think And just have a draw api and I can do line And I can do main line from one All in one Roll 10 Roll 19 And then Update the same exactly unknown this to the editing That can be transformed and uh, and you can you can pile up transformers as well, of course if I Just add the gradient transformer right ahead here So I have the sp2 thing sp2 Another gradient transformer using the same gradient And I ran out of this So I have the gradient applied over the character transformation Let's see that Yeah So so yes Uh, I'm accepting poor requests for that Because it's ready to work with that And I just kept my mind, okay So next time I sit down to hack and I'm just write the channel And actually there is even a scripting tool that Um Easy the work of creating this file Because these of course that would be a pain to to tighten But I have a script here in tools That generate an empty dictionary for you to to fill up with your kernel It uh So it comes up with the project And of course I'll use it for kernels There are not only the fancy unicode squared thing But there are also round corners the idea is to you have that those I'll have them available readily on the transformer's name space not having to create them like we did here Okay So maybe we have some 20 minutes This thing is open on the project itself on the very folder we are working or I mean So like we had the Shape project you can you can just start doing something something here It's a very simple for you to the idea is to have it working simply and what's not simple Is mean to have uh shortcuts in the future so it becomes simple I think it's when we start to adding features Have a lot of ideas and you never have time to implement it now. So, um Before I show you the next example, I'll show you my tutu file here basically Any single line in this file could be expanded to uh an issue or a future request And it's this size Checking here and there is also a dawn file every single line here is a new feature in this thing Uh I'm checking here. It is currently did the one way to to know what's done there or not And a lot of it has bugs of course So that there are things that are amazing amazing for whoever already codes in python like, uh, so I haven't shown here, but uh So if you do the context So this thing Yeah, I'm a context scholar Okay here, but I string here and It does have components Let's see this at least And I can I don't remember I can change that yes, so okay Ah again. Oh, okay. Now I want this to be And I've changed it a bit the same for whoever knows the language. It's it's it's Whitey fancy things that the dude keep doing. Okay. This is quite nice To do and Then I'd make some some small program from scratch. Yes, uh, so we can see it's not hard to do I just put this thing to sleep now Very good at this editor though. I start to get myself in trouble in this editor. I was just switched to the It's the mouse enabled one and I can have um So my shape Right now you can use multi line strings like this. So it's the sign is so you can do like this This is solid, isn't it? We don't have to to initiate the library or anything When you start entering the screens, so we have have to create a screen It works as a context manager I'm not like this like this and The other time when we use the shape constructor I pass it a size like this This work But if I pass it a multi-line string, it will recognize that thing and have a function name and data name here I'll have a screen object Well, this works as a list But if I had a list and I used the append method I couldn't pass extra parameters to it. So I had the add where I can pass not only the shape but Easy as well. So with this And then just let's just check if this works It's active screen 8 and using the in-case thing of also a convenient pause function that just Wait until some key Punch it on the keyboard. It should be a very minimal program to Don't need to be there the corner. So funny thing because The example does work. I have a surprise method in shape here So if I have shape So this shape things that there are there are piloted shapes so I can work with indexed mode One thing I didn't say actually when I started the project and when I started the project I thought okay. I present this at LGM one day Is that a characteristic of these images? Is that you don't have a single color per pixel? You you actually have for each pixel have a background color a foreground color a character and a text effect There are four different at least four different attributes for each pixel and Then I complicated myself and the project because I actually have Different shapes to be classes to dealing with the presence of one or other of these attributes or not And when you create a shape like this by passing a multiline image It creates another class not the one we were drawing with Which this other class is as I stopped writing code for them They bit rotted bit rotted a bit, but I have this promote thing But I think I have to pass the same size So I think a shape has size So this is not working I know it the sprites mechanism just Just works with the full shapes the full shape is the one where each pixel has all the four attributes The shape that's created by multiline things Multiline text here is a palleted shape Which doesn't know about characters. It's just each pixel is just set or not set and it does have a color map So I have to do shape and pass it another shape It's the size of the first one It's a full shape So that have all four characteristics for each pixel color background character and and effect Always sheet a little bit and see how it's done in the example Then both shapes does that okay Ah, okay. It's uh Sorry for it. It's a method on the class of the full shape like this An instance method that transforms one shape to another just pass the class The lesser shape and it Creates the higher one This it's gonna sprite So, um Here have the keyboard Have some constants for the key codes One thing I didn't mention this is meant to work multi-plotter form So I got basically working on windows one day In december if you go to windows and use a decent terminal program It will work there. It does use different functions for reading the keyboard and stuff Keyboard is an empty Do sheet a little bit more call keyboard like this I saw the key codes are like in here this k name space Ah, here it is Let me need a key code And keyboard have to be initialized in the the wave statement Um, this other window is another terminal program. It's called kitty It's a mint for asky art as well And of course a future partner of them in the projects. I didn't quite take Full advantage of it yet But even on it I did select A beryly font that doesn't have the empty dots It also came beryly but have a lot of spacing between characters and the height So you get this thing. So you don't get a nice nice drawing as well I was planning this before the workshop started, but it didn't work at all Okay, let's go back to the code. That's a dd code if we do Have an instant gd keyboard So it is um Let's go into no waiting mode I'll have to wait for my name to enter and then I can use the And I can add an import for that Then I can have these This equal Oh, oh, can you write this We're reaching a clever way in that example, but we can always go for the old way here I'm not sure if this is a lowercase So, sorry So it is No Ah caps lock on Split from right left right right now What ah forgot a while loop of course Just check the case precede and go away the pause the edited thing stop here Actually did real thing, but this is not a while loop. I have to do it here Now it comes uh my lack of functionality with the vi text editor I'm not quite sure how do I I think I Yeah, it did work Oh, sorry the vector thing is not mutable because then it can be used as addition keys and stuff Change the the old position output It should be possible to do same we know so Let's work a little bit Just one one block in each direction Also, I've been hacking new foot features without using the existing ones makes it hard to remember right now Um Funny thing it should It adds one But then it doesn't add the second key the second thing here. It is why The thing is must not be in the loop. It recreates this right at every every step here So, uh, let's do this Oh, there it is and if I had more text here it would just float over this text here Okay, thanks, but maybe that's more. So that's it corrects there. Um, I just asked the github that github repository It's like right here. I'm sure if the string So it's github it's bueno that media And just so that it's visible on the low resolution streaming. I just paste it here as well So this is the trial for the project Whoever wants to come up ideas and research there is welcome Thank you for watching