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 Tue 27 Jun 2017, 11:53
All times are UTC - 4
 Forum index » Off-Topic Area » Programming
xpupsay Buddhist fun for Easter
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 1 [1 Post]  
Author Message
Lobster
Official Crustacean


Joined: 04 May 2005
Posts: 15231
Location: Paradox Realm

PostPosted: Thu 13 Apr 2017, 04:24    Post subject:  xpupsay Buddhist fun for Easter
Subject description: Don't worry about God dying on Friday, Jesus 'will be back'
 

Hi Guys Happy Easter
(spoiler alert - Don't worry about God dying on Friday, Jesus 'will be back')

As a heretic Buddhist I will be playing with xpupsay ...
I needed the 64bit xpupsay which is here
http://puppylinux.info/topic/xpupsay64-tahrpup606-repackaged-xcowsay

32bit users might find xcowsay works for them . . .

Here is my very simple code (minus the pics) Get transparent png if you can
You can use it to display Christian or other iconography, other languages or positive affirmations. My code uses Tantric Mantra and yidams.

You can see an early version on Youtube
https://youtu.be/UhcSHV5xgxc

You will need:
- xpupsay for your Puppy.
- save the below code as a text file and save it as mantra.sh or similar to run

How it works:
This changes to the xpupsay directory so it will run
Code:
cd /root/my-documents/xpupsay/


The rest of the
function init_vars()
sets the number of times you want recitations to appear on screen, how long, fonts used . . .

function display_message()

is what displays the mantra or other text on screen


Code:
#! /bin/bash
# mantrapup
# --------------------
function init_vars()
# --------------------
{
cd /root/my-documents/xpupsay/   
   NUM=3 # Change the number of default recitations
   sec_quick=9
   sec_long=27
   fnt="DejaVu Sans Bold 15"
}

count_mantras=0
number_of_repetitions="1"

mantra_1="MAY TRE YA OM TRE YA OM
YA OM MAY YA HUM
OM YA HA HUM"
mantra_2="OM MANI PEME HUM HRIH"
mantra_3="OM TARE TUTARE TURE SOHA"
mantra_4="OM BEKANZE BEKANZE MAHA BEKANZE RADZA SAMUDGATE SOHA"
mantra_5="OM AMITABHA HRIH"
mantra_6="OM A RA PA CA NA DHIH"
mantra_7="HUM ORGYEN YUL GYI NUBJANG TSAM
PEMA GE SAR DHONGPO LA
YAM TSAN CHOK GI NGODRUB NYEY
PAD MA JUNG NAY ZHEY SU DRAG
KHOR DU KHA DRO MANG PÖ KOR
KHYED KYI JESU DAG DRUB KYIY
JIN GYIY LOB KHYIR SHEK SU SOL
Om Ha Hum Vagra Guru Pema Siddhi Hum"
mantra_8="NAMAH SAPTANAM SAMYAKSAMBUDDHA KOTINAM TADYATHA
OM CALE CULE CUNDE SOHA"
mantra_9="MIG-MEY TZE-WEY TER-CHEN CHENREZIG
DRI-MEY KHYEN-PI WANG-PO JAMPAL YANG
DU-PUNG MA-LU JOM-DZEY SANG-WEY DAG
GANG-CHEN KE-PEY TSUG-GYEN TSONGKHAPA
LO-SANG TRAG-PEY SHAB-LA SOL-WA DEB"
mantra_10="OM VAJRASATTVA SAMAYA MANUPALAYA VAJRASATTVA
TENOPA TISHTHA DRIDHO ME BHAWA
SUTOKHAYO ME BHAWA
SUPOKHAYO ME BHAWA
ANURAKTO ME BHAWA
SARWA SIDDHI ME PRAYACCHA
SARWA KARMA SU TSA ME
TSITTAM SHREYANG KURU HUNG
HA HA HA HA HO
BHAGAWAN SARWA TATHAGATA
VAJRA MA ME MUNCA
VAJRI BHAWA MAHA SAMAYASATTVA AH"
mantra_11="OM MAITRI MAHA MAITRI MAITREYA SOHA"

# # # # # # # # # # # # # # #
function input_message()
# # # # # # # # # # # # # # #
{
# click on x top right does not cancel but runs - add option to turn off full screen
export DIALOG='
<window title="Mantras" icon-name="gtk-dialog-question">
  <vbox>
    <hbox>
      <text>
        <label>Mantra Recitals:</label>
      </text>
      <entry activates-default="true">
        <default>3</default>
   <variable>NUM</variable>
      </entry>
    </hbox>
   <checkbox use-stock="true" label="gtk-fullscreen" image-position="1"
tooltip-text="checkbox derives from button ...">
</checkbox>
   <hbox>
      <button cancel></button>
      <button can-default="true" has-default="true" use-stock="true" >
        <label>gtk-ok</label>
         </button>
    </hbox>
  </vbox>
</window>
'
CHOICES=`gtkdialog3 --program=DIALOG`
eval $CHOICES
repetitions=$NUM
}

# # # # # # # # # # # # # # #
function display_message()
# # # # # # # # # # # # # # #

{
for i in $(eval echo "{1..$repetitions}")   
do
    ((count_mantras++))
   tput setaf 1; echo $count_mantras; tput setaf 2;
    mplayer −novideo amtb8.wav &
   printf %b "$mantra_1 \n\n" " $g1" | xpupsay --image=buddha.png --time="$sec_quick" "$@"
     clear 
   printf %b "$mantra_2 \n\n" " $g1" | xpupsay --image=chenrezig.png --time="$sec_quick" "$@"
     clear 
   printf %b "$mantra_3 \n\n" " $g1" | xpupsay --image=tara.png --time="$sec_quick" "$@"
     clear 
   printf %b "$mantra_4 \n\n" " $g1" | xpupsay --image=MedicineBuddha.png --time="$sec_quick" "$@"
     clear   
   printf %b "$mantra_5 \n\n" " $g1" | xpupsay --image=Amitabha.png --time="$sec_quick" "$@"
     clear   
   printf %b "$mantra_6 \n\n" " $g1" | xpupsay --image=manjushri.png --time="$sec_quick" "$@"
     clear 
  printf %b "$mantra_7 \n\n" " $g1" | xpupsay --image=gr.png --time="$sec_long" "$@"
     clear 
  printf %b "$mantra_8 \n\n" " $g1" | xpupsay --image=cundi3.png --time="$sec_quick" --font="$fnt" "$@"
     clear
  printf %b "$mantra_9 \n\n" " $g2" | xpupsay --image=Je-Tsongkhapa-small.png --time="$sec_long" --font="$fnt" "$@"   
   clear
   printf %b "$mantra_10 \n\n" " $g3" | xpupsay --image=Vajrasattva.png --time="$sec_long" --font="$fnt" "$@"   
   clear
   printf %b "$mantra_11 \n\n" " $g3" | xpupsay --image=Maitreya.png --time="$sec_quick" --font="$fnt" "$@"   
done
 sleep 2
}

init_vars
input_message
display_message

_________________
YinYana AI Buddhism
Back to top
View user's profile Send private message Visit poster's website 
Display posts from previous:   Sort by:   
Page 1 of 1 [1 Post]  
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Off-Topic Area » Programming
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.0439s ][ Queries: 14 (0.0069s) ][ GZIP on ]