LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 11-24-2007, 06:22 AM   #1
hamster
Member
 
Registered: Apr 2003
Location: Waterford, Ireland
Distribution: Mandrivia 2006.1, Ubuntu 7.10
Posts: 188

Rep: Reputation: 30
Getting info like sunrise and sunset times


Hi Folks,

This might seem like a strange question but the more I use linux - the more it seems possible. When I login I like to have a fortune cookie read from /usr/games/fortune for example. Is it possible or does anyone know of any tool or small program that I could get and call to display today's sunrise and sunset times for the day - in text in the terminal like say fortune. Unusual I know but I am sure there are a few astronomy fans among you!
 
Old 11-24-2007, 06:52 AM   #2
hamster
Member
 
Registered: Apr 2003
Location: Waterford, Ireland
Distribution: Mandrivia 2006.1, Ubuntu 7.10
Posts: 188

Original Poster
Rep: Reputation: 30
I came across a text based calendar called wyrd. I am going to try this - it seems what I need. Another tool called remind does the same thing - it is a running service. Let you know what I think!
 
Old 11-24-2007, 10:25 AM   #3
matthewg42
Senior Member
 
Registered: Oct 2003
Location: UK
Distribution: Kubuntu 12.10 (using awesome wm though)
Posts: 3,530

Rep: Reputation: 63
Not a command-line method, but sort of related so I volunteer the information for those directed here by the likes of google to whom it may be relevant:

GNU emacs has a daylight time function, available through the calendar:
  • Open a calendar buffer using:
    Code:
    M-x calendar
  • Press S (upper case s). You will be prompted for your longitude, latitude and timezone information.
  • You can permanently set your position data in your ~/.emacs file like this:
    Code:
    (setq calendar-latitude +53.950)
    (setq calendar-longitude -1.083)
    (setq calendar-location-name "York, England")
  • Timezone data should be taken from your system settings, but you can over-ride these by setting the variables: calendar-time-zone, calendar-standard-time-zone-name, calendar-daylight-time-zone-name.
 
Old 11-24-2007, 11:20 AM   #4
hamster
Member
 
Registered: Apr 2003
Location: Waterford, Ireland
Distribution: Mandrivia 2006.1, Ubuntu 7.10
Posts: 188

Original Poster
Rep: Reputation: 30
Quote:
Originally Posted by matthewg42 View Post
Not a command-line method, but sort of related so I volunteer the information for those directed here by the likes of google to whom it may be relevant:

GNU emacs has a daylight time function, available through the calendar:
  • Open a calendar buffer using:
    Code:
    M-x calendar
  • Press S (upper case s). You will be prompted for your longitude, latitude and timezone information.
  • You can permanently set your position data in your ~/.emacs file like this:
    Code:
    (setq calendar-latitude +53.950)
    (setq calendar-longitude -1.083)
    (setq calendar-location-name "York, England")
  • Timezone data should be taken from your system settings, but you can over-ride these by setting the variables: calendar-time-zone, calendar-standard-time-zone-name, calendar-daylight-time-zone-name.
Thanks! That's a good tip, I'll try that.
 
Old 02-02-2010, 06:16 PM   #5
leeeoooooo
Member
 
Registered: Jan 2009
Distribution: Slackware 14.0
Posts: 104

Rep: Reputation: 18
command line utility?

I've got the same question, but I don't want to have to go through Emacs.

Yes, Emacs started talking dirty to me (in the very nicest way) when I learned it could give me a calendar but also moon phases and sunrise and sunset times...oooooh baby, you know what I like!



But what I'm looking for is something simpler I can add to my login sequence like fortune and pom (that give you the current phase of the moon).



Is there a simple command line utility that will spit out the sunrise and sunset for a given location and date (or today, this locale if not otherwise specified)?

I have an *old* Basic routine that I could modify for this, and I can probably find some other astronomical programs that I could twist to my purposes, but I don't want to reinvent another wheel.
 
  


Reply

Tags
emacs, latitude


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Innovative Sunrise Browser aids Mac Web developers LXer Syndicated Linux News 0 04-07-2007 11:02 PM
LXer: Sun fights UltraSparc sunset with Linux LXer Syndicated Linux News 0 02-24-2006 06:01 PM
System hangs; Atheros Madwifi-ping times out every 15/16 times james 456 Linux - Networking 0 01-12-2006 06:55 PM
strange sunrise/sunset times in kweather daryl314 Linux - Software 2 12-28-2004 08:45 AM
Sunset for RH linux 8.0?? vsa Linux - Software 0 10-20-2004 09:55 AM


All times are GMT -5. The time now is 05:20 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration