Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Wed 01 Oct 2014, 04:37
All times are UTC - 4
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Eye Candy
Console ASCII art?
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 1 [8 Posts]  
Author Message
dejan555


Joined: 30 Nov 2008
Posts: 2664
Location: Montenegro

PostPosted: Thu 07 Oct 2010, 17:04    Post subject:  Console ASCII art?
Subject description: puppy logo in terminal
 

Thought this would be cool addition to spice up puppy fun even more Smile
I used one of those image to ascii convertors from web and saved puppy ascii logo to text file. You can put it anywhere, lets say you have it in /usr/share/doc/asciipup.txt

Add line to /root/.bashrc to read that file on startup:

Code:
cat /usr/share/doc/asciipup.txt


Now every time you run console puppy logo will apear

Here I attach the ascii txt file and screenshot, post your ascii art and examples for beautifying and customizing terminal here, like .Xdefaults for different terminals and stuff, look at this post in dpup thread what I did for urxvt to move scrollbar to right and invert fg/bg
http://www.murga-linux.com/puppy/viewtopic.php?p=454271#454271

asciipup.txt.gz
Description  puppy linux ascii logo
gz

 Download 
Filename  asciipup.txt.gz 
Filesize  357 Bytes 
Downloaded  671 Time(s) 

_________________


Back to top
View user's profile Send private message Visit poster's website MSN Messenger 
DM was on fire!


Joined: 12 Sep 2009
Posts: 156
Location: N.E. Georgia Mountains, USA

PostPosted: Thu 14 Oct 2010, 11:28    Post subject:  

This is so cool, Dejan!
Anyway to know if I can get this to work in Konsole, or would it only be (u)rxvt?
Back to top
View user's profile Send private message MSN Messenger 
dejan555


Joined: 30 Nov 2008
Posts: 2664
Location: Montenegro

PostPosted: Thu 14 Oct 2010, 12:06    Post subject:  

It will work in any console as long as it's bash shell when put in .bashrc
_________________


Back to top
View user's profile Send private message Visit poster's website MSN Messenger 
01micko


Joined: 11 Oct 2008
Posts: 7805
Location: qld

PostPosted: Thu 14 Oct 2010, 16:05    Post subject:  

did any one see this one from pizzasgood?

Very festive Wink

Code:
#!/bin/sh
#Draws a pretty picture
#This looks best in a terminal with a black background.  For example:
#    rxvt -bg black -fg white

h=12
tw=4 #even for alignment
th=3
#increasing this dehances the chrome factor
scarcity=9

###################################################
#define a bunch of colors
#the capitalized versions are "bold" or "bright"

 black='\033[0;30m'
 BLACK='\033[1;30m'
 white='\033[0;37m'
 WHITE='\033[1;37m'

   red='\033[0;31m'
   RED='\033[1;31m'
 green='\033[0;32m'
 GREEN='\033[1;32m'
yellow='\033[0;33m'
YELLOW='\033[1;33m'
  blue='\033[0;34m'
  BLUE='\033[1;34m'
purple='\033[0;35m'
PURPLE='\033[1;35m'
  cyan='\033[0;36m'
  CYAN='\033[1;36m'

    NC='\033[0m'
  grey=$BLACK
###################################################

char1="${green}/${NC}"
char2="${green}^${NC}"
char3="${green}\\\\${NC}"
chart1="${yellow}|${NC}"
chart2="${yellow}=${NC}"
chart3="${yellow}|${NC}"

function draw_bulb(){
        char="*"
        color_pool=($RED $YELLOW $BLUE $CYAN $PURPLE)
        let "index=RANDOM%${#color_pool[@]}"
        echo "${color_pool[$index]}${char}${NC}"
}

function draw_item(){
        boring="$1"
        let 'decision=RANDOM%scarcity'
        if [ $decision -eq 0 ]; then
                draw_bulb
        else
                echo "$boring"
        fi
}

#draw_tree
let 'w=h*2'

let 'cx=w/2'
let 'cy=h/2'

for x in $(seq 0 $cx); do
        line_start="${line_start} "
done
echo -e "${line_start}${WHITE} _A_ ${NC}"
echo -e "${line_start}${WHITE} /^\ ${NC}"

for y in $(seq 1 $h); do
        let 'x1=cx-y+1'
        let 'x2=cx+y-1'
        line=''
        for x in $(seq 0 $x1); do
                line="${line} "
        done
        line="${line} $(draw_item "$char1")"
        let 'start=x1+1'
        let 'end=x2-1'
        for x in $(seq $start 2 $end); do
                line="${line} $(draw_item "$char2")"
                #line="${line} ${char2}"
        done
        line="${line} $(draw_item "$char3")"
        echo -e "$line"
        let 'y++'
done
for y in $(seq 1 $th); do
        let 'x1=cx-tw/2'
        line=''
        for x in $(seq 0 $x1); do
                line="${line} "
        done
        line="${line} ${chart1}"
        let 'start=x1+1'
        let 'end=x1+tw'
        for x in $(seq $start 2 $end); do
                line="${line} ${chart2}"
        done
        line="${line} ${chart3}"
        echo -e "$line"
done

_________________
Woof Mailing List | keep the faith Cool |
Back to top
View user's profile Send private message Visit poster's website 
dejan555


Joined: 30 Nov 2008
Posts: 2664
Location: Montenegro

PostPosted: Thu 14 Oct 2010, 16:17    Post subject:  

Cool now I know how to decorate terminal for New Year's Eve Laughing
_________________


Back to top
View user's profile Send private message Visit poster's website MSN Messenger 
upnorth


Joined: 11 Jan 2010
Posts: 262
Location: Wisconsin UTC-6 (-5 DST)

PostPosted: Sat 16 Oct 2010, 12:26    Post subject: urxvt ideas
Subject description: .Xdefaults
 

here is how i configured the prompt in /etc/profile. Find the PS1="# " line and comment it out with a # at the beginning, then create a new one below it:
the "36" determines the color and ">" is the character displayed

PS1=\`pwd\`'\[\033[1;36m\]>\[\033[0m\]'

the pwd above is the linux command for "print working directory"
just replace the "36" above with one of these numbers for a different color for the ">":
    Black 30
    Blue 34
    Green 32
    Cyan 36
    Red 31
    Purple 35
    Yellow 33
    White 37


here is a new one where the current working directory will be diplayed in red and the symbol displayed will be "=>" in cyan. \w is used here instead of the pwd command to display current working directory.
Code:
PS1='\[\033[1;31m\]\w\[\033[1;36m\]=>\[\033[0m\]'


see the bash prompt howto at:http://tldp.org/HOWTO/Bash-Prompt-HOWTO/
--------------------------------------------------

After some trial and error and some ideas from archwiki page, i got the Xdefaults to work- with some odd changes though: had to change all "URxvt" to "urxvt" and change some "*" to "." --see code.

Before i just used command line options stored in pinboard (right click console icon, edit item, Arguments to pass.) For example:
-tr -fg white -tint gray -sh 80 -fn "xft:Bitstream Vera Sans Mono:antialias=true:pixelsize=14"
and then add this to end when useing xcompmgr:
-depth 32 -bg rgba:0000/0000/0000/4444
These days, urxvt seems to need an actual .ttf font to work properly with the xft, though. But VeraMono.ttf is only 49k.

my .Xdefaults - don't try this at home.....
this is with the standard small urxvt (138k) included with woof built pups
! is a comment marker in the .Xdefaults so lines beginning with ! are inactive.
Code:
Rxvt.keysym.0xFF50: \033[1~
Rxvt.keysym.0xFF57: \033[4~

# scrollbar style - rxvt (default), plain, next, or xterm
urxvt*scrollstyle:next
urxvt*scrollBar_right:true

!urxvt.geometry: 400x30
urxvt.buffered: true
urxvt.background: black
urxvt.foreground: green
urxvt.cursorColor: blue
urxvt.underlineColor: green
urxvt.font:xft:Bitstream Vera Sans Mono:pixelsize=14:antialias=true

!------------
!True Transparency
!------------
!set to 32-bit for real transparency (compositing required (see xcompmgr)
urxvt.depth:32
!transparent=0000 opaque=ffff
!urxvt*background: rgba:1111/1111/1111/dddd
urxvt.background:rgba:0000/0000/0000/4444
!urxvt*background: rgba:1111/1111/1111/0000


!------------------
!False tranparency
!------------------
!urxvt.transparent: true
!urxvt.shading: 50

urxvt.secondaryScroll:true    # Enable Shift-PageUp/Down in screen

---------------------------------------------------------------------------
Here is an attatchment of my setup for MRXVT,
this seemingly sidesteps the problem with the *@euro locale, however, i don't know how this plays out on systems where nimbus mono L is the only available monospace xft font.
MRXVT_options.jpg
 Description   
 Filesize   24.7 KB
 Viewed   3103 Time(s)

MRXVT_options.jpg


Last edited by upnorth on Fri 26 Nov 2010, 22:58; edited 3 times in total
Back to top
View user's profile Send private message Visit poster's website 
GustavoYz


Joined: 07 Jul 2010
Posts: 896
Location: .ar

PostPosted: Sun 17 Oct 2010, 05:30    Post subject:  

Hello...
I found a nice ASCII Processing sketch online and make a few -littles- changes on it... Cool
For make an ASCII image, replace the JPG inside the folder for another of your choice and resize the pixel proportions of the sketch according to the pixel size of your file (that's the easy way).
Hope you like it.

//PROCESSING CODE HERE-->
Code:

//picture to ascii generator by Chris Webb
//do whatever you want with this. im sure you can improve it heaps :D
 
char[] chars ={'º','1','3','6','o','#','≡','%','$','@','&'};
String loadPath = "Image.jpg";
PImage picture;
int devisions = 5; // pixels
PFont font;
float xDiv;
float yDiv;
 
void setup(){
  picture = loadImage(loadPath);
  size(450,300);
  font = loadFont("ArialMT-24.vlw");
  xDiv = picture.width/devisions;
  yDiv = picture.height/devisions;
  println(xDiv);
}
 
void draw(){
  background(255);
  textFont(font,devisions+3);
  for(int i = 0; i < height; i+= devisions){
    for(int j = 0; j < width; j+= devisions){
      color filler = picture.get(int(j),int(i));
      fill(filler);
      textAlign(CENTER);
      //gets char depending on brightness
      float value = brightness(filler/4);
      char charac = chars[int(value/25.5)];
      text(charac,(j),(i));
    }
  }
}
 
void keyPressed() {
  if (key == CODED) {
    if (keyCode == UP) {
      devisions++;
    } else if (keyCode == DOWN) {
      devisions--;
    }
  }
  constrain(devisions,1,99);
}
Ascii_Sketch3.tar.gz
Description  Make ASCII-images for normal image files (as png, jpg...)
gz

 Download 
Filename  Ascii_Sketch3.tar.gz 
Filesize  67.94 KB 
Downloaded  582 Time(s) 
Back to top
View user's profile Send private message 
upnorth


Joined: 11 Jan 2010
Posts: 262
Location: Wisconsin UTC-6 (-5 DST)

PostPosted: Mon 18 Oct 2010, 19:48    Post subject: http://www.text-image.com/convert/ascii.html
Subject description: This site works good - even works in dillo (no javascript)
 

image to txt, html, or matrix style .png
(works in dillo too)
http://www.text-image.com/convert/ascii.html


this one is for text to ascii art:
(works in dillo too)
http://www.network-science.de/ascii/
snap_mrxvt_ascii.jpg
 Description   
 Filesize   75.25 KB
 Viewed   2969 Time(s)

snap_mrxvt_ascii.jpg

Back to top
View user's profile Send private message Visit poster's website 
Display posts from previous:   Sort by:   
Page 1 of 1 [8 Posts]  
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Eye Candy
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0860s ][ Queries: 13 (0.0052s) ][ GZIP on ]