emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Chris Raschl <cr@kautsig.org>
To: emacs-orgmode@gnu.org
Subject: Re: org-weather for openweathermap.org
Date: Sun, 15 Jun 2014 11:47:11 +0200	[thread overview]
Message-ID: <87oaxu1p40.fsf@dylan.nashville> (raw)
In-Reply-To: <87sin7twqg.fsf@gmail.com>


Hi Thorsten,
first of all, thanks for your suggestions, I really appreciate it.

tjolitz@gmail.com writes:

> Chris Raschl <cr@kautsig.org> writes:
>
>> Hi everybody,
>>
>> recently I wanted to add a weather forecast to my org-agenda. I found
>> org-google-weather, but this package is obsolete since 2012, because the
>> API is not available any more. So I wrote my own version which is backed
>> by the openweathermap.org API.
>>
>> I implemented the minimal usecase which works for me, if somebody else
>> dares to use it, its available here:
>>
>> https://github.com/kautsig/org-weather
>
> Nice, thank you, never made org-google-weather, but this works
> out-of-the-box:
>
>   ,-------------------------------------------------
>   | City:     Weather: light rain, 10.43°C - 17.58°C
>   `-------------------------------------------------
>
> A few suggestions wrt

[...]

> - why not use (round ...) for the temperature data, 10-17°C would be
>   more than accurate enough?

I added this. Additionally I removed the temperature unit being
displayed twice, this was unnecessary and looks much nicer in the format
you suggested.

> - why not include city/country info in the weather string? I added
>
>   * Weather
>     :PROPERTIES:
>     :CATEGORY: City
>     :END:
>   %%(org-weather)
>
>   to get the above, but it would be much better to take the return
>   values for city/country and include them in the weather string, to
>   make sure one did not mess up the configuration and gets the weather
>   from another place than expected.

Also thought about this, but I think I will go with the method which was
also used in org-google-weather. It looks like:

* Weather
%%(org-google-weather "New York")

This is much simpler for me, as I'm not so familiar with lisp and the
org-mode api. But I'll have to change the data structure for caching the
data a bit, so it might take a while.

> - maybe make the whole thing a bit customizable by adding a few
>   defcustoms, so the user can decide which info he wants to print in the
>   agenda
>
>   the return string looks like this, there are many options:

[...]

I improved result processing a little bit and added a formatting string
(org-weather-format). You can now also add different temperature fields,
as well as humidity, pressure and wind speed.

Regards,
Chris

  reply	other threads:[~2014-06-15  9:42 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-14 13:11 org-weather for openweathermap.org Chris Raschl
2014-06-14 13:41 ` Fletcher Charest
2014-06-14 14:02 ` Thorsten Jolitz
2014-06-15  9:47   ` Chris Raschl [this message]
2014-06-15 11:54     ` Thorsten Jolitz
2014-06-16 10:07       ` Ian Barton
2014-06-16 10:45         ` Thorsten Jolitz
2014-06-16 15:04           ` Ian Barton
2014-06-17 10:34             ` Thorsten Jolitz
2014-06-16  9:59     ` Thorsten Jolitz
2014-06-16  8:04 ` Rüdiger Sonderfeld
2014-06-16 13:10   ` Alan Schmitt
2014-06-27 12:50   ` Andreas Leha
2014-06-16 14:40 ` Doyley, Marvin
2014-06-16 15:47   ` Nick Dokos
2014-06-16 16:11     ` Doyley, Marvin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87oaxu1p40.fsf@dylan.nashville \
    --to=cr@kautsig.org \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).