#!/bin/bash
# This Is Free Software If I could to to talk like software for it
# It's Licensed Under THe GPL Licence see GPL License for more info
# COPYRIGHT (C) Georgi Dimitrov
# email:root@pcfreak.cc
# site:www.pcfreak.cc
# IRC Chan on -=UNI-BG=- #pcfreak preferred irc server debian.spnet.net
# Greetings Fly To: |Vaso|,|Pro-XeX|,|Krassswr|,|STRASHARO|,|Indjeto|,
# |joEjoE|,|Bomzh|,|dr0p|,|Nomen_Omen|,|PsioN|,|SIC-a| and everyone other
# Who Feels Free and Stays Free... !
# Most Of the Time Writting This I was listening to Pro-XeX's -- Izdunkata
# :]]] Right Now I'm Listening Evereve all fans of gothic like me enjoy
#Simple Bla Bla Function
begin()
{
clear
printf "\t\t--||HTML Bash Generator by hipopodilski||--\n\t"
printf "\t=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-="
printf "\n\n\n"
n=0
z=1
h=0
}
# Help Commands Function -- really Bad Written Right:]]
commands()
{
echo
printf "\t\tAvailable Commands are:\n"
printf "\t\t-----------------------\n"
echo '+_______________________________________________________________+'
echo '|BR=(next line), LINK=(a href to name), P=(new paragraph) |'
echo '|HR=(print line), H1, H2, H3, H4, H5, H6=(headers (1..6)) |'
echo '|H1, H2, H3, H4, H5, H6-=headers (1..6), FS=font size(1..7) |'
echo '|FC=(font color), BODY=(body of the page),LYNX=(view with lynx) |'
echo '|TITLE=(title of the page),CLS=(clear screen) |'
echo '|HTML=(Begin Of The HTML), ENDHTML=(End Of The HTML) |'
echo '|ENDBODY=(End Of HTMLs Body),ENDFONT=(End Of Used Font) |'
echo '|LS=(LIST FILE DIRS), DELL(Deletes One Of The Edited Page) |'
echo '|VIEWSOURCE=(view your html source),QUIT(QUITS) |'
echo '|PLAIN=(Adds Plain Text),CENTER=(Centers text) |'
echo '|ENDCENTER=(CLOSES TAG CENTER),OKOFF=(Turns off The Ok Messages)|'
echo '|OKON=(Turns The OK Messages After Execute of Command again) |'
echo '|OPEN=(opens Different from the now generated HTML) |'
echo '|DELCUR=(deletes Currently opened file) |'
echo '|BODYBG=(Changes Bodys Background Color) |'
echo '\_______________________________________________________________/'
echo ;
echo '-=To Quit type EXIT or Press Ctrl-C=-'
}
#This Traps Interrupts Coming From Ctrl-C And runs The bigfun Function
trap inter INT
inter()
{
clear
bigfunc
exit 0
}
#Works Up To here -- This Is left from the time I was isolating errors:]
#This Reads The Filename and creates The File If it doesn't exist
filename()
{
echo
echo 'File Name To Generato *.html or *.htm'
echo -n 'Enter file name:'
read filen
touch $filen
#cat /dev/null > $filen
}
# This Is The Core Of The Script...Scripters Enjoy:]]
bigfunc()
{
OK='OK'
echo "" >> $filen
echo "" >> $filen
while [ "$h" -lt "$z" ]; do
echo -n 'Command:'
read command
#Works Up To Here
case $command in
BR) echo "
" >> $filen
echo $OK
;;
LINK)
echo -n 'Enter link to:'
read name
echo " $name " >> $filen
echo $OK
;;
P)
echo "
" >> $filen echo $OK ;; HR) echo -n 'Enter width:' read width echo -n 'Enter height:' read height echo "