Difference between revisions of "Activities/Clock"

From Sugar Labs
Jump to navigation Jump to search
m (moved Activities/Clock to Walter is a wanker 7/Clock: Walter is a wanker)
(Migrate to GitHub)
 
(2 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<noinclude>{{GoogleTrans-en}}{{TOCright}}[[Category:Activities|Clock]]</noinclude>
+
== Clock ==
==Description & Goals==
 
  
[[Image:clock-nice.png|right|300px|thumb|What time is it?]]
+
Read at https://help.sugarlabs.org/clock.html
[[Image:activity-clock-55x55.png]]
 
  
===Summary===
+
The source file has been moved to [https://github.com/godiard/help-activity/blob/master/source/clock.rst GitHub]
 
 
The Clock activity aims at two simple goals:
 
* As a teaching tool to help children learn how to read time.
 
* To give the children a way to know the time it is, with their XO, even they don't own a watch.
 
The presentation on screen has been kept simple enough to reach these two objectives.
 
 
 
===Current Use & Goals===
 
 
 
Click on the Clock toolbar buttons to change display mode and options.
 
* Simple analog display with hours numbers
 
* Nice clock face
 
* Digital clock view
 
* Time in full letters
 
* Weekday and date
 
* Talking clock
 
 
 
A consistent color code is used through the activity so that hours are always displayed in blue (resp. minutes and seconds), either the figures in the digital clock or the short hand in the analog clocks, or the time scale. The child will understand that these are different representations of the same concept.
 
 
 
 
 
===Other uses===
 
 
 
Learn how to find geographical North (or South, depending in which hemisphere you are located) using the clock hands: [http://www.wikihow.com/Find-True-North-Without-a-Compass Findind True North Without a Compass].
 
And from there, build a solar clock!
 
 
 
 
 
===Screenshots===
 
 
 
{|style="border: solid 1px gray; margin: 1em auto 1em; auto"
 
|-
 
| valign="top"|
 
[[Image:clock-simple.png|300px|thumb|center|The basic clock face (v5)]]
 
| valign="top"|
 
[[Image:clock-nice-spanish.png|300px|thumb|center|The nice clock face (v5)]]
 
|-
 
| valign="top"|
 
[[Image:clock-digital-french.png|300px|thumb|center|French digital clock (v5)]]
 
| valign="top"|
 
[[Image:clock-simple-spanish.png|300px|thumb|center|Learning time in spanish (v5)]]
 
|-
 
|}
 
 
 
 
 
==Development==
 
 
 
This code is released in Public Domain, so you can do whatever you want with it. This is simple enough that Python learners can try to add or change features.
 
 
 
Point of interests:
 
* PyGTK events programming.
 
* GTK/GDK drawing and Pango layout.
 
* Localization. Though a clock face should look quite similar in all cultures, you can adapt the way it displays hours numbers and date. Use of Pango markup allows to adapt the views to cultural representations of date and time.
 
* SVG rendering. The nice clock background is the SVG file clock.svg (drawn with [http://www.inkscape.org Inkscape]). You can change it to your liking.
 
* How to call an external process (espeak) to read the current time aloud.
 
* A small inference engine to translate time to full letters, where the set of rules can be adapted to new languages.
 
 
 
Look at the README file for notes and ideas.
 
 
 
===Package and History===
 
 
 
As a Python application, the full source is included in the package for you to enjoy.
 
 
 
* Version 5
 
** Re-coded from scratch to better integrate with Sugar.
 
** Display the current time in full letters, to learn how to write time.
 
** TTS (Time To Speech) support in the talking clock.
 
 
 
* Version 4
 
** Be a better Sugar citizen: do not draw the clock when the activity does not have the focus, to save resources for other running activities.
 
** Run with old Sugar versions.
 
 
 
Version 3 or older versions of Clock activity uses a lot of CPU time, slowing down all other activities that run at the same time. Please upgrade to version 4 (for OS 650, 656 or 8.2) or newer (8.2 and up).
 
 
 
 
 
===Localization===
 
 
 
The Clock activity has been written with localization in mind, though a clock should look similar in all cultures. The POT file contains strftime patterns and Pango markup, so that translators can localize the application with more freedom. For instance, they can change the way date or time are displayed, the fonts to use or the size of characters.
 
 
 
I've provided 3 localizations for French, English and Spanish, but others are welcome!
 
 
 
Also, the Clock displays the time in full letters and reads it aloud with the espeak command. The translation from a numeric time (3:45) to full letters (a quarter to three AM) is done using a set of inference rules, which are totaly localizable.
 
:I haven't downloaded it yet to check that it implements this, but did you know that Swahili clocks are angled differently? [[wikipedia:Swahili#Swahili_time]]
 
 
 
==Functional Test==
 
 
 
* Open the clock activity.
 
* Check that it display the current time of the XO.
 
* On the Clock toolbar, select the display modes from the toolbar buttons.
 
* Close the activity; ensure that it closes properly.
 
 
 
==Enhancements==
 
 
 
* Better Sugar integration; current display stops after 50 seconds when power saving fires up.
 
* Ability to set the date, time, timezone, etc.
 
* Add a Big Ben chime and turn it to an alarm clock.
 
* Add a Calendar toolbar, with locale variations, to learn the current day and month.
 
 
 
== Resources ==
 
 
 
* [http://activities.sugarlabs.org/en-US/sugar/addon/4191 Activity bundle]
 
* [http://git.sugarlabs.org/projects/clock GIT repository]
 
* [http://download.sugarlabs.org/sources/honey/Clock/ Source tarball]
 
* Trac Tickets: [http://trac.sugarlabs.org/query?status=accepted&status=assigned&status=closed&status=new&status=reopened&groupdesc=1&group=milestone&component=Clock&order=priority&col=id&col=summary&col=status&col=owner&col=type&col=priority&col=version&col=severity&col=resolution&col=status_field&col=reporter&col=time&col=changetime Sugar Labs] [http://dev.laptop.org/query?status=assigned&status=closed&status=new&status=reopened&groupdesc=1&group=milestone&max=150&component=clock-activity&order=id&col=id&col=summary&col=status&col=owner&col=type&col=next_action&col=changetime OLPC]
 

Latest revision as of 02:34, 18 June 2018

Clock

Read at https://help.sugarlabs.org/clock.html

The source file has been moved to GitHub