1
0
mirror of https://github.com/gryf/pygtkworldclock.git synced 2025-12-17 03:20:23 +01:00
Files
pygtkworldclock/README.rst

2.6 KiB

This is simple world clock application written in Python and Cairo.

Requirement

  • Python3

  • PyCairo

  • PyGObject (GTK3)

Configuration

See example.yaml for reference. Basically config file is a YAML file, which contain a definition of timezone and the label, which in the end maps as python dictionary:

{'tz': 'string of timezone'
 'label': 'string of some label'}

For example, single clock can be represended as:

---
-
  tz: UTC
  label: The real world clock

which would have an effect:

single clock

Note, that it have to be a list in YAML format (line started with -) followed by a definition of key-value of timezone and a label. Analogically, several clocks (let's take an example of US timezones) can be vertically arranged by providing a list of key-values:

---
-
  tz: US/Hawaii
  label: Honolulu, Hawaii, US
-
  tz: US/Alaska
  label: Anchorage, Alaska, US
-
  tz: US/Pacific
  label: Portland, Oregon, US
-
  tz: US/Mountain
  label: Salt Lake City, Utah, US
-
  tz: US/Central
  label: Austin, Texas, US
-
  tz: US/Eastern
  label: New York, US

and the result:

single clock

Same in horizontal arrangement:

---
-
  -
    tz: US/Hawaii
    label: Honolulu, Hawaii, US
  -
    tz: US/Alaska
    label: Anchorage, Alaska, US
  -
    tz: US/Pacific
    label: Portland, Oregon, US
  -
    tz: US/Mountain
    label: Salt Lake City, Utah, US
  -
    tz: US/Central
    label: Austin, Texas, US
  -
    tz: US/Eastern
    label: New York, US

obviously the result would be:

single clock

And finally the same in two rows, three columns:

---
-
  -
    tz: US/Hawaii
    label: Honolulu, Hawaii, US
  -
    tz: US/Alaska
    label: Anchorage, Alaska, US
  -
    tz: US/Pacific
    label: Portland, Oregon, US
-
  -
    tz: US/Mountain
    label: Salt Lake City, Utah, US
  -
    tz: US/Central
    label: Austin, Texas, US
  -
    tz: US/Eastern
    label: New York, US

which will look like that:

single clock

You can experiment to get the layout of your choice.

License

This software is licensed under 3-clause BSD license. See LICENSE file for details.