SlideShare ist ein Scribd-Unternehmen logo
1 von 6
Downloaden Sie, um offline zu lesen
Automatic Birthday Remainder Program


Hi , This Program runs works as Birthday Remainder in our local system . Just try this !

It will display our friends name and photo in desktop like notifier whenever u switch on ur system
on.

It will remaind u on,

1) Today's B Day
2) Tomorrow's B Day


Installation :
---------------

To Notify :

$ sudo apt-get install libnotify-bin

To Ruby :

$ sudo apt-get install ruby
$ sudo apt-get install rubygems
$ sudo gem install activesupport


Datebase :
----------

In this “database" file which having friends name, dob , image_path.


You can edit and add new line in order of name , dob , image_path with separated by comma.

database file:
Arulalan,01-01,~/birthday_remainder/Arulalan.jpg
Dhastha,31-12,default

Conditions:

1) first field must have name
2) second filed have dob. It is date and month order only. date ( from 01 to 31 ) & month ( from 01
to 12 ).
The date and month are separeted by minus symbol(-).
eg: 09-05 ( 9th day , May month )

3) third field have the image location path. This image will be displayed on monitor ( notify )
create ond directory “ birthday_remainder” in ur home folder.

U can set path like this. eg : ~/birthday_remainder/Arulalan.jpg ( If u stored the image in this
folder ) or u can set any image path

If u dont have image then set the third field as "default" eg: Dhastha,31-12,default

This "default" option will invoke inbuild image path. this inbuild image is stored in
"birthday_remainder" folder itself. path is : ~/birthday_remainder/cake.jpeg


you may add any no of lines in this database file.



bday.rb:

#!/usr/bin/env ruby
require "rubygems"
require "active_support"

sleep(10)

file=File.open("database","r")
file.each do |bday|
bday=bday.chomp!

bday=bday.split(/,/)
name=bday[0].to_s
dob=bday[1].to_s
image_path=bday[2].to_s

if image_path=="default" then
image_path="~/birthday_remainder/cake.jpeg"
end

dob=dob.split(/-/)

current_time=Time.now
month=current_time.month.to_s
day=current_time.day.to_s

if month.to_i <10 then
month="0"+month
end


tomorrow=1.day.from_now.to_s
tomorrow=tomorrow.split(/ /)
p tomorrow
if dob[1]==month then
        if dob[0]==day then
                system("notify-send 'BirthDay Remainder' 'Today #{name} Birthday' -i
#{image_path} -t 3000")

sleep(10)
               system("notify-send 'BirthDay Remainder' 'Did U wished #{name} Birthday ?'       -t
0")

       end

      if dob[0]==(tomorrow[2]) then
              system("notify-send 'BirthDay Remainder' 'Tomorrow #{name} Birthday' -i
#{image_path} -t 3000")

sleep(10)
                system("notify-send 'BirthDay Remainder' 'Did U Purchased Gift For #{name}
Birthday ?'   -t 0")

       end
end


mon=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]

today=Time.now.to_s
today=today.split(/ /)
today[1].to_s

x=mon.index(today[1]).to_i
y=mon.index(tomorrow[1]).to_i



      if (x+1==y or tomorrow[1]=="Jan" ) and dob[0]=="01" then
             system("notify-send 'BirthDay Remainder' 'Tomorrow #{name} Birthday' -i
#{image_path} -t 3000")

sleep(10)
                system("notify-send 'BirthDay Remainder' 'Did U Purchased Gift For #{name}
Birthday ?'   -t 0")

       end


end

Change Permission :
-------------------

here , you must make "birthday_remainder" folder in ur home folder and paste this bday.rb and
database file and corresponding images .
$ sudo chmod -R 777 ~/ birthday_remainder/



Adding into Start Up Application :
----------------------------------

In ubuntu 9.10 version :

1) Go to "System" -> "Preferences" -> "Startup Applications"
2) Click "Add" button
3) Now click "Browse" button and comes to home folder-> birthday_remainder folder-> bday.rb
( select bday.rb )
4) In Name field , type as " Birthday Remainder"
5) Then click "Add" button

* u can enable (check box )or edit or remove whatever u add in startup application


Logout or Restart :
-------------------

Now u can see the bday remainder in ur desktop.


How to check :
--------------

If u wanna to check this program , then u change the dob of database file into curent date.

this prog will remaind u today's and tomorrow's b day....

* It will remaind u in all calender days like 28,29,30,31 & leap year.
Have a fun !
------------------------------------------------------------------------------------------------------------------------

Regads ,

Arulalan.T

Enjoy with Ruby !

Weitere ähnliche Inhalte

Was ist angesagt?

ggplot2 extensions-ggtree.
ggplot2 extensions-ggtree.ggplot2 extensions-ggtree.
ggplot2 extensions-ggtree.Dr. Volkan OBAN
 
Php Data Objects
Php Data ObjectsPhp Data Objects
Php Data Objectshiren.joshi
 
Cuda cluster
Cuda clusterCuda cluster
Cuda clusterRajesh
 
Patterns in Terraform 12+13: Data, Transformations and Resources
Patterns in Terraform 12+13: Data, Transformations and ResourcesPatterns in Terraform 12+13: Data, Transformations and Resources
Patterns in Terraform 12+13: Data, Transformations and ResourcesKatie Reese
 
Debugging Memory Problems in Rails
Debugging Memory Problems in RailsDebugging Memory Problems in Rails
Debugging Memory Problems in RailsNasos Psarrakos
 

Was ist angesagt? (7)

ggplot2 extensions-ggtree.
ggplot2 extensions-ggtree.ggplot2 extensions-ggtree.
ggplot2 extensions-ggtree.
 
Php Data Objects
Php Data ObjectsPhp Data Objects
Php Data Objects
 
Migrating Legacy Data
Migrating Legacy DataMigrating Legacy Data
Migrating Legacy Data
 
Cojuntos
CojuntosCojuntos
Cojuntos
 
Cuda cluster
Cuda clusterCuda cluster
Cuda cluster
 
Patterns in Terraform 12+13: Data, Transformations and Resources
Patterns in Terraform 12+13: Data, Transformations and ResourcesPatterns in Terraform 12+13: Data, Transformations and Resources
Patterns in Terraform 12+13: Data, Transformations and Resources
 
Debugging Memory Problems in Rails
Debugging Memory Problems in RailsDebugging Memory Problems in Rails
Debugging Memory Problems in Rails
 

Andere mochten auch

comboboxentry - glade - ruby - guide
comboboxentry - glade - ruby - guidecomboboxentry - glade - ruby - guide
comboboxentry - glade - ruby - guideArulalan T
 
How To Use Open Office. Impress
How To Use Open Office. ImpressHow To Use Open Office. Impress
How To Use Open Office. ImpressArulalan T
 
presmarked
presmarkedpresmarked
presmarkedeswa
 
Python an-intro - odp
Python an-intro - odpPython an-intro - odp
Python an-intro - odpArulalan T
 
"contour.py" module
"contour.py" module"contour.py" module
"contour.py" moduleArulalan T
 
contour analysis and visulaization documetation -1
contour analysis and visulaization documetation -1contour analysis and visulaization documetation -1
contour analysis and visulaization documetation -1Arulalan T
 

Andere mochten auch (7)

Cv Gaby
Cv GabyCv Gaby
Cv Gaby
 
comboboxentry - glade - ruby - guide
comboboxentry - glade - ruby - guidecomboboxentry - glade - ruby - guide
comboboxentry - glade - ruby - guide
 
How To Use Open Office. Impress
How To Use Open Office. ImpressHow To Use Open Office. Impress
How To Use Open Office. Impress
 
presmarked
presmarkedpresmarked
presmarked
 
Python an-intro - odp
Python an-intro - odpPython an-intro - odp
Python an-intro - odp
 
"contour.py" module
"contour.py" module"contour.py" module
"contour.py" module
 
contour analysis and visulaization documetation -1
contour analysis and visulaization documetation -1contour analysis and visulaization documetation -1
contour analysis and visulaization documetation -1
 

Ähnlich wie Automatic B Day Remainder Program

DSpace Manual for BALID Trainee
DSpace Manual for BALID Trainee DSpace Manual for BALID Trainee
DSpace Manual for BALID Trainee Nur Ahammad
 
could you draw uml diagram for this code from PIL import Image, Im.pdf
could you draw uml diagram for this code from PIL import Image, Im.pdfcould you draw uml diagram for this code from PIL import Image, Im.pdf
could you draw uml diagram for this code from PIL import Image, Im.pdfmurtuzadahadwala3
 
agri inventory - nouka data collector / yaoya data convertor
agri inventory - nouka data collector / yaoya data convertoragri inventory - nouka data collector / yaoya data convertor
agri inventory - nouka data collector / yaoya data convertorToshiaki Baba
 
Puppet at Opera Sofware - PuppetCamp Oslo 2013
Puppet at Opera Sofware - PuppetCamp Oslo 2013Puppet at Opera Sofware - PuppetCamp Oslo 2013
Puppet at Opera Sofware - PuppetCamp Oslo 2013Cosimo Streppone
 
IR Journal (itscholar.codegency.co.in).pdf
IR Journal (itscholar.codegency.co.in).pdfIR Journal (itscholar.codegency.co.in).pdf
IR Journal (itscholar.codegency.co.in).pdfRahulRoy130127
 
Simple Photo Processing and Web Display with Perl
Simple Photo Processing and Web Display with PerlSimple Photo Processing and Web Display with Perl
Simple Photo Processing and Web Display with PerlKent Cowgill
 
Using docker for data science - part 2
Using docker for data science - part 2Using docker for data science - part 2
Using docker for data science - part 2Calvin Giles
 
st_launcher: Tonel-based Smalltalk shell Scripts
 st_launcher: Tonel-based Smalltalk shell Scripts st_launcher: Tonel-based Smalltalk shell Scripts
st_launcher: Tonel-based Smalltalk shell ScriptsESUG
 
Hello click click boom
Hello click click boomHello click click boom
Hello click click boomsymbian_mgl
 
Web development - technologies and tools
Web development - technologies and toolsWeb development - technologies and tools
Web development - technologies and toolsYoann Gotthilf
 

Ähnlich wie Automatic B Day Remainder Program (20)

Backups
BackupsBackups
Backups
 
C Assignment Help
C Assignment HelpC Assignment Help
C Assignment Help
 
issue35 zh-CN
issue35 zh-CNissue35 zh-CN
issue35 zh-CN
 
DSpace Manual for BALID Trainee
DSpace Manual for BALID Trainee DSpace Manual for BALID Trainee
DSpace Manual for BALID Trainee
 
could you draw uml diagram for this code from PIL import Image, Im.pdf
could you draw uml diagram for this code from PIL import Image, Im.pdfcould you draw uml diagram for this code from PIL import Image, Im.pdf
could you draw uml diagram for this code from PIL import Image, Im.pdf
 
test
testtest
test
 
agri inventory - nouka data collector / yaoya data convertor
agri inventory - nouka data collector / yaoya data convertoragri inventory - nouka data collector / yaoya data convertor
agri inventory - nouka data collector / yaoya data convertor
 
Gur1009
Gur1009Gur1009
Gur1009
 
Puppet at Opera Sofware - PuppetCamp Oslo 2013
Puppet at Opera Sofware - PuppetCamp Oslo 2013Puppet at Opera Sofware - PuppetCamp Oslo 2013
Puppet at Opera Sofware - PuppetCamp Oslo 2013
 
IR Journal (itscholar.codegency.co.in).pdf
IR Journal (itscholar.codegency.co.in).pdfIR Journal (itscholar.codegency.co.in).pdf
IR Journal (itscholar.codegency.co.in).pdf
 
Lab manual
Lab manualLab manual
Lab manual
 
Bosh 2.0
Bosh 2.0Bosh 2.0
Bosh 2.0
 
DNS Configure
DNS Configure DNS Configure
DNS Configure
 
Linux configer
Linux configerLinux configer
Linux configer
 
Couchdb
CouchdbCouchdb
Couchdb
 
Simple Photo Processing and Web Display with Perl
Simple Photo Processing and Web Display with PerlSimple Photo Processing and Web Display with Perl
Simple Photo Processing and Web Display with Perl
 
Using docker for data science - part 2
Using docker for data science - part 2Using docker for data science - part 2
Using docker for data science - part 2
 
st_launcher: Tonel-based Smalltalk shell Scripts
 st_launcher: Tonel-based Smalltalk shell Scripts st_launcher: Tonel-based Smalltalk shell Scripts
st_launcher: Tonel-based Smalltalk shell Scripts
 
Hello click click boom
Hello click click boomHello click click boom
Hello click click boom
 
Web development - technologies and tools
Web development - technologies and toolsWeb development - technologies and tools
Web development - technologies and tools
 

Mehr von Arulalan T

Climate Data Operators (CDO)
Climate Data Operators (CDO)Climate Data Operators (CDO)
Climate Data Operators (CDO)Arulalan T
 
CDAT - graphics - vcs - xmgrace - Introduction
CDAT - graphics - vcs - xmgrace - Introduction CDAT - graphics - vcs - xmgrace - Introduction
CDAT - graphics - vcs - xmgrace - Introduction Arulalan T
 
CDAT - cdms2, maskes, cdscan, cdutil, genutil - Introduction
CDAT - cdms2, maskes, cdscan, cdutil, genutil - Introduction CDAT - cdms2, maskes, cdscan, cdutil, genutil - Introduction
CDAT - cdms2, maskes, cdscan, cdutil, genutil - Introduction Arulalan T
 
CDAT - cdms numpy arrays - Introduction
CDAT - cdms numpy arrays - IntroductionCDAT - cdms numpy arrays - Introduction
CDAT - cdms numpy arrays - IntroductionArulalan T
 
Python an-intro-python-month-2013
Python an-intro-python-month-2013Python an-intro-python-month-2013
Python an-intro-python-month-2013Arulalan T
 
Python an-intro v2
Python an-intro v2Python an-intro v2
Python an-intro v2Arulalan T
 
Thermohaline Circulation & Climate Change
Thermohaline Circulation & Climate ChangeThermohaline Circulation & Climate Change
Thermohaline Circulation & Climate ChangeArulalan T
 
Testing in-python-and-pytest-framework
Testing in-python-and-pytest-frameworkTesting in-python-and-pytest-framework
Testing in-python-and-pytest-frameworkArulalan T
 
Pygrib documentation
Pygrib documentationPygrib documentation
Pygrib documentationArulalan T
 
Lesson1 python an introduction
Lesson1 python an introductionLesson1 python an introduction
Lesson1 python an introductionArulalan T
 
Python An Intro
Python An IntroPython An Intro
Python An IntroArulalan T
 
Final review contour
Final review  contourFinal review  contour
Final review contourArulalan T
 
Contour Ilugc Demo Presentation
Contour Ilugc Demo Presentation Contour Ilugc Demo Presentation
Contour Ilugc Demo Presentation Arulalan T
 
Contour Ilugc Demo Presentation
Contour Ilugc Demo PresentationContour Ilugc Demo Presentation
Contour Ilugc Demo PresentationArulalan T
 
Edit/correct India Map In Cdat Documentation - With Edited World Map Data
Edit/correct India Map In Cdat  Documentation -  With Edited World Map Data Edit/correct India Map In Cdat  Documentation -  With Edited World Map Data
Edit/correct India Map In Cdat Documentation - With Edited World Map Data Arulalan T
 
matplotlib-installatin-interactive-contour-example-guide
matplotlib-installatin-interactive-contour-example-guidematplotlib-installatin-interactive-contour-example-guide
matplotlib-installatin-interactive-contour-example-guideArulalan T
 
Sms frame work using gnokii, ruby & csv - command line argument
Sms frame work using gnokii, ruby & csv - command line argument Sms frame work using gnokii, ruby & csv - command line argument
Sms frame work using gnokii, ruby & csv - command line argument Arulalan T
 
sms frame work
sms frame worksms frame work
sms frame workArulalan T
 

Mehr von Arulalan T (20)

wgrib2
wgrib2wgrib2
wgrib2
 
Climate Data Operators (CDO)
Climate Data Operators (CDO)Climate Data Operators (CDO)
Climate Data Operators (CDO)
 
CDAT - graphics - vcs - xmgrace - Introduction
CDAT - graphics - vcs - xmgrace - Introduction CDAT - graphics - vcs - xmgrace - Introduction
CDAT - graphics - vcs - xmgrace - Introduction
 
CDAT - cdms2, maskes, cdscan, cdutil, genutil - Introduction
CDAT - cdms2, maskes, cdscan, cdutil, genutil - Introduction CDAT - cdms2, maskes, cdscan, cdutil, genutil - Introduction
CDAT - cdms2, maskes, cdscan, cdutil, genutil - Introduction
 
CDAT - cdms numpy arrays - Introduction
CDAT - cdms numpy arrays - IntroductionCDAT - cdms numpy arrays - Introduction
CDAT - cdms numpy arrays - Introduction
 
Python an-intro-python-month-2013
Python an-intro-python-month-2013Python an-intro-python-month-2013
Python an-intro-python-month-2013
 
Python an-intro v2
Python an-intro v2Python an-intro v2
Python an-intro v2
 
Thermohaline Circulation & Climate Change
Thermohaline Circulation & Climate ChangeThermohaline Circulation & Climate Change
Thermohaline Circulation & Climate Change
 
Testing in-python-and-pytest-framework
Testing in-python-and-pytest-frameworkTesting in-python-and-pytest-framework
Testing in-python-and-pytest-framework
 
Pygrib documentation
Pygrib documentationPygrib documentation
Pygrib documentation
 
Lesson1 python an introduction
Lesson1 python an introductionLesson1 python an introduction
Lesson1 python an introduction
 
Python An Intro
Python An IntroPython An Intro
Python An Intro
 
Final review contour
Final review  contourFinal review  contour
Final review contour
 
Contour Ilugc Demo Presentation
Contour Ilugc Demo Presentation Contour Ilugc Demo Presentation
Contour Ilugc Demo Presentation
 
Contour Ilugc Demo Presentation
Contour Ilugc Demo PresentationContour Ilugc Demo Presentation
Contour Ilugc Demo Presentation
 
Edit/correct India Map In Cdat Documentation - With Edited World Map Data
Edit/correct India Map In Cdat  Documentation -  With Edited World Map Data Edit/correct India Map In Cdat  Documentation -  With Edited World Map Data
Edit/correct India Map In Cdat Documentation - With Edited World Map Data
 
Nomography
NomographyNomography
Nomography
 
matplotlib-installatin-interactive-contour-example-guide
matplotlib-installatin-interactive-contour-example-guidematplotlib-installatin-interactive-contour-example-guide
matplotlib-installatin-interactive-contour-example-guide
 
Sms frame work using gnokii, ruby & csv - command line argument
Sms frame work using gnokii, ruby & csv - command line argument Sms frame work using gnokii, ruby & csv - command line argument
Sms frame work using gnokii, ruby & csv - command line argument
 
sms frame work
sms frame worksms frame work
sms frame work
 

Kürzlich hochgeladen

1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdfQucHHunhnh
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxiammrhaywood
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDThiyagu K
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Sapana Sha
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13Steve Thomason
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Celine George
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationnomboosow
 
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...fonyou31
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxheathfieldcps1
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionSafetyChain Software
 
Disha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfDisha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfchloefrazer622
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxGaneshChakor2
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfciinovamais
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docxPoojaSen20
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfchloefrazer622
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introductionMaksud Ahmed
 
9548086042 for call girls in Indira Nagar with room service
9548086042  for call girls in Indira Nagar  with room service9548086042  for call girls in Indira Nagar  with room service
9548086042 for call girls in Indira Nagar with room servicediscovermytutordmt
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeThiyagu K
 
Russian Call Girls in Andheri Airport Mumbai WhatsApp 9167673311 💞 Full Nigh...
Russian Call Girls in Andheri Airport Mumbai WhatsApp  9167673311 💞 Full Nigh...Russian Call Girls in Andheri Airport Mumbai WhatsApp  9167673311 💞 Full Nigh...
Russian Call Girls in Andheri Airport Mumbai WhatsApp 9167673311 💞 Full Nigh...Pooja Nehwal
 

Kürzlich hochgeladen (20)

1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SD
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communication
 
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory Inspection
 
Disha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfDisha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdf
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptx
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docx
 
Advance Mobile Application Development class 07
Advance Mobile Application Development class 07Advance Mobile Application Development class 07
Advance Mobile Application Development class 07
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdf
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
9548086042 for call girls in Indira Nagar with room service
9548086042  for call girls in Indira Nagar  with room service9548086042  for call girls in Indira Nagar  with room service
9548086042 for call girls in Indira Nagar with room service
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and Mode
 
Russian Call Girls in Andheri Airport Mumbai WhatsApp 9167673311 💞 Full Nigh...
Russian Call Girls in Andheri Airport Mumbai WhatsApp  9167673311 💞 Full Nigh...Russian Call Girls in Andheri Airport Mumbai WhatsApp  9167673311 💞 Full Nigh...
Russian Call Girls in Andheri Airport Mumbai WhatsApp 9167673311 💞 Full Nigh...
 

Automatic B Day Remainder Program

  • 1. Automatic Birthday Remainder Program Hi , This Program runs works as Birthday Remainder in our local system . Just try this ! It will display our friends name and photo in desktop like notifier whenever u switch on ur system on. It will remaind u on, 1) Today's B Day 2) Tomorrow's B Day Installation : --------------- To Notify : $ sudo apt-get install libnotify-bin To Ruby : $ sudo apt-get install ruby $ sudo apt-get install rubygems $ sudo gem install activesupport Datebase : ---------- In this “database" file which having friends name, dob , image_path. You can edit and add new line in order of name , dob , image_path with separated by comma. database file: Arulalan,01-01,~/birthday_remainder/Arulalan.jpg Dhastha,31-12,default Conditions: 1) first field must have name 2) second filed have dob. It is date and month order only. date ( from 01 to 31 ) & month ( from 01 to 12 ). The date and month are separeted by minus symbol(-). eg: 09-05 ( 9th day , May month ) 3) third field have the image location path. This image will be displayed on monitor ( notify )
  • 2. create ond directory “ birthday_remainder” in ur home folder. U can set path like this. eg : ~/birthday_remainder/Arulalan.jpg ( If u stored the image in this folder ) or u can set any image path If u dont have image then set the third field as "default" eg: Dhastha,31-12,default This "default" option will invoke inbuild image path. this inbuild image is stored in "birthday_remainder" folder itself. path is : ~/birthday_remainder/cake.jpeg you may add any no of lines in this database file. bday.rb: #!/usr/bin/env ruby require "rubygems" require "active_support" sleep(10) file=File.open("database","r") file.each do |bday| bday=bday.chomp! bday=bday.split(/,/) name=bday[0].to_s dob=bday[1].to_s image_path=bday[2].to_s if image_path=="default" then image_path="~/birthday_remainder/cake.jpeg" end dob=dob.split(/-/) current_time=Time.now month=current_time.month.to_s day=current_time.day.to_s if month.to_i <10 then month="0"+month end tomorrow=1.day.from_now.to_s tomorrow=tomorrow.split(/ /) p tomorrow
  • 3. if dob[1]==month then if dob[0]==day then system("notify-send 'BirthDay Remainder' 'Today #{name} Birthday' -i #{image_path} -t 3000") sleep(10) system("notify-send 'BirthDay Remainder' 'Did U wished #{name} Birthday ?' -t 0") end if dob[0]==(tomorrow[2]) then system("notify-send 'BirthDay Remainder' 'Tomorrow #{name} Birthday' -i #{image_path} -t 3000") sleep(10) system("notify-send 'BirthDay Remainder' 'Did U Purchased Gift For #{name} Birthday ?' -t 0") end end mon=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"] today=Time.now.to_s today=today.split(/ /) today[1].to_s x=mon.index(today[1]).to_i y=mon.index(tomorrow[1]).to_i if (x+1==y or tomorrow[1]=="Jan" ) and dob[0]=="01" then system("notify-send 'BirthDay Remainder' 'Tomorrow #{name} Birthday' -i #{image_path} -t 3000") sleep(10) system("notify-send 'BirthDay Remainder' 'Did U Purchased Gift For #{name} Birthday ?' -t 0") end end Change Permission : ------------------- here , you must make "birthday_remainder" folder in ur home folder and paste this bday.rb and database file and corresponding images .
  • 4. $ sudo chmod -R 777 ~/ birthday_remainder/ Adding into Start Up Application : ---------------------------------- In ubuntu 9.10 version : 1) Go to "System" -> "Preferences" -> "Startup Applications" 2) Click "Add" button 3) Now click "Browse" button and comes to home folder-> birthday_remainder folder-> bday.rb ( select bday.rb ) 4) In Name field , type as " Birthday Remainder" 5) Then click "Add" button * u can enable (check box )or edit or remove whatever u add in startup application Logout or Restart : ------------------- Now u can see the bday remainder in ur desktop. How to check : -------------- If u wanna to check this program , then u change the dob of database file into curent date. this prog will remaind u today's and tomorrow's b day.... * It will remaind u in all calender days like 28,29,30,31 & leap year. Have a fun !
  • 5.