Posts

Showing posts with the label text

Text.

Image
Imagine that you do not have a fancy graphics monitor and card, in fact. all you have is a text only old unix terminal. What could you do?  How about a video: (ascii terminals do not have sound but it certainly can be included, but I misplaced that version of the video. Or you could play a neat 2d looks like 3d text adventure game. http://www.instructables.com/id/The-Oracle/step7/Bonus-game-2-Akalabeth-Re-Bourne/ or you could even do lots of other things. http://www.instructables.com/id/Graphics-in-a-text-world/

Text in batch files.

Image
Saw this pic and thought it was an interesting login. Using ., ", d, Y, and P on the corners was certainly inventive; To make it easier to duplicate the printout we split the text into two lines into two lines. 888 888 888 d8888 888 888 888 888 d88888 888 88888888888888 888 d88 888 888 888 888 888 d88 888 8888888 .d8888b 88888b. 888 888 888 d88 888 8888" d88P" 888 "88b 88888888888888 YOP d88 888 888 888 888 888b 888 888 d8888888888 888 Y88b. 888 888b 888 888 888 d888 888 888 "Y8888P 888 888 888 d8b Y88b d88P 888 YOP Y88b d88P 888 Y88u88P 888 888 88888b. 888 888 Y888P ...

Weather pic to ascii

Image
Yet another weather picture grabber and the the picture is converted to ascii. Note: Also see http://www.instructables.com/id/Radar-graphics-in-a-text-world/ #!/bin/bash #Set variables DOWNLOAD_DIR=/tmp/weather/ WEATHER_GIF=http://archive.wfaa.com/weather/images/core/animated-loops/comp/880x495/new_tarrant.gif COUNTER=0 #check for  download directory if [ ! -d "$DOWNLOAD_DIR" ]; then   mkdir -p $DOWNLOAD_DIR fi #remove old files rm  $DOWNLOAD_DIR/*gif rm  $DOWNLOAD_DIR/*.png rm  $DOWNLOAD_DIR/*.txt #get weather gif wget $WEATHER_GIF -O "${DOWNLOAD_DIR}map.gif" #extract gif to png convert -coalesce "${DOWNLOAD_DIR}/map.gif" "${DOWNLOAD_DIR}/map.png" #convert images to text for i in $DOWNLOAD_DIR/map-*; do    img2txt -f utf8 -W 100 -H 30 $i > $i.txt done #display images while [ $COUNTER -lt 5 ] ; do   for i in $DOWNLOAD_DIR/map-*.txt; do      printf '\033[1;1H'   ...

Text clock.

Image
Text clocks seem to be a big thing right now. Here is one written in qbasic. qb64 result: Freebasic result: Source code: [code] 'UNSEEN'S NOT A STANDARD CLOCK DIM SEC AS STRING, MIN AS STRING, HR AS STRING SCREEN 0: COLOR 3, 15: WIDTH 40, 25 CLS DO HR$ = LEFT$(TIME$, 2): MIN$ = MID$(TIME$, 4, 2): SEC$ = RIGHT$(TIME$, 2) LOCATE 1, 1: PRINT HR$; ":"; MIN$; ":"; SEC$ 'MINUTES IF (VAL(MIN$) <  10 and val(min$) >= 5) OR (VAL(MIN$) >= 55 AND VAL(MIN$) < 60) THEN COLOR 12, 15 LOCATE 3, 2: PRINT "FIVE": COLOR 3, 15 IF VAL(MIN$) >= 10 AND VAL(MIN$) < 15 OR VAL(MIN$) >= 50 AND VAL(MIN$) < 55 THEN COLOR 12, 15 LOCATE 3, 8: PRINT "TEN": COLOR 3, 15 IF VAL(MIN$) >= 15 AND VAL(MIN$) < 20 OR VAL(MIN$) >= 45 AND VAL(MIN$) < 50 THEN COLOR 12, 15 LOCATE 3, 13: PRINT "FIFTEEN": COLOR 3, 15 IF VAL(MIN$) >= 20 AND VAL(MIN$) < 25 OR VAL(MIN$) >= 40 AND VAL(MIN$) < 45 THE...

Couple of funny things.

Image

Graphic to text.

Moving text menus to the gui.

Image
Take your standard menu and with a little help it can become gui friendly. Original code: #! /bin/bash echo "************************" echo "* Music programs       *" echo "************************" echo "* [1] Autoharp         *" echo "* [2] Radio            *" echo "*                      *" echo "* [0] Exit/Stop        *" echo "************************" echo echo "Enter your menu choice [1-2, or 0]: " read -n 1 yourch case $yourch in 1) autoharp.sh  ;; 2) radio.sh ;; 0) exit 0 ;; *) echo "Oopps!!! Please select choice 1,2 or 0" echo "Press Enter to continue. . ." ; read ;; esac done Which generates: Or you could go to a mouse friendly gui: #! /bin/bash while selection=$(zenity --lis...

Menu driven.

Image
Whether you prefer a graphical user interface such as: Where all you have to do is just double click a picture is so sexy and seems very easy. Let's consider and alternative where all you have to do is just press a single key to start the program you want: But then you could actually sort of do the same thing with an interface like this: Oh but it is not as sexy some might say. It does exactly the same thing, but without using so many system resources. Not only that but you could get even more choices without having to redo the desktop. So if you pressed 1, you would get: Or if you pressed 2 than you would get: All this was done without any swiping!  Of course that does not prevent you from using your favorite program such as a spreadsheet or whatever: But then you could do sort of the same thing with a text based alternative like homecalc or sc: With all the embedded devices such as the Raspberry Pi and the like, you will want to be as r...

Backup monitor?

Image
If you set up your serial port for communications and have a serial terminal (some systems may require a usb adapter), you will never worry about not having a monitor for emergencies. (Connecting in this case to an nslu2 running linux.)   Notes from an earlier article to set up serial communication, Your system may vary. Now to get the Pda working with the unit. The Palm pda will not work as is as a dumb terminal, so I had to install a program on to it from another computer called ptelnet.prc using a usb to serial interface. The Palm has an interface cable that will plug directly into the 9 pin serial port on the back of the computer. HP Journa has a standard rs232 port. $  pilot-xfer -p /dev/ttyUSB0 -i ptelnet.prc That should be easy. First to test the port. Strange the serial port on what is commonly known as com2:. (com1: =ttyS0) $ sudo /sbin/getty -h -L /dev/ttyS1 9600 vt100 & $ sudo chmod 666 /dev/ttyS1 A prompt did not show up on the Palm pda. ...

Amazing graphics with text.

Image
In the last article, using older computers that does not use the fancy graphics of today. You actually can do quite a bit with text such as movies, radar screens and etc. though the old favorite of using a computer as a clock.  Source for the program is aclock.c ( http://www.tenox.net/out/ ) Another generic clock: vtcclock  ( http://webonastick.com/vtclock/ ) Many command line users really appreciate text graphics to make their terminals more interesting especially at the point of login. Want to see more?  More at:  http://www.instructables.com/id/Graphics-in-a-text-world/

Amazing graphics with text.

Image
In the last article, using older computers that does not use the fancy graphics of today. You actually can do quite a bit with text such as movies, radar screens and etc. though the old favorite of using a computer as a clock.  Source for the program is aclock.c ( http://www.tenox.net/out/ ) Another generic clock: vtcclock  ( http://webonastick.com/vtclock/ ) Many command line users really appreciate text graphics to make their terminals more interesting especially at the point of login. Want to see more?  More at:  http://www.instructables.com/id/Graphics-in-a-text-world/

Weather radar in ascii.

Image
Once in a while I sort of come up with a neat idea. At least it is to me. Just because you have an old system, does not mean you can not teach it new tricks. Done a lot of page scraping to get weather details, but it would be nice to use radar screens from the command line. So details in this case are not so necessary. The overall view of the weather to see what kinds of weather fronts are approaching is. Here we go. We need to collect some historical data (i.e. radar screens). You can get these from the radar.weather.gov using the 3 letter designation for the area you are interested in. For example, I believe the Dallas Fort Worth area is supposed to be FWS. You do not have to collect data just for your area. Collect data for several areas and get an overview of the weather all around. (http://www.leonardsguide.com/us-airport-codes.shtml) You need to collect data. Cron is the perfect tool for the job. We need to create a batch file that will collect the pictures usin...