├── .github └── FUNDING.yml ├── .gitignore ├── LICENSE ├── Makefile ├── README.rst ├── create.py ├── index.tmpl ├── prune.py ├── robots.txt ├── serve.py └── zones.py /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | github: [djc] 2 | patreon: dochtman 3 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.json 2 | *.pyc 3 | index.html 4 | tzdata-latest.tar.gz 5 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Permission is hereby granted, free of charge, to any person obtaining a copy 2 | of this software and associated documentation files (the "Software"), 3 | to deal in the Software without restriction, including without limitation 4 | the rights to use, copy, modify, merge, publish, distribute, sublicense, 5 | and/or sell copies of the Software, and to permit persons to whom 6 | the Software is furnished to do so, subject to the following conditions: 7 | 8 | The above copyright notice and this permission notice shall be included 9 | in all copies or substantial portions of the Software. 10 | 11 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 12 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 13 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 14 | THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 15 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 16 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 17 | IN THE SOFTWARE. 18 | 19 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | GENTOO_TZDATA = $(shell ls /usr/portage/distfiles/tzdata20* 2>/dev/null | tail -n1) 2 | TZDATA_LATEST = $(or $(GENTOO_TZDATA),tzdata-latest.tar.gz) 3 | TZDATA_URL = ftp://ftp.iana.org/tz/tzdata-latest.tar.gz 4 | 5 | index.html: pruned.json index.tmpl 6 | @python3 create.py pruned.json > index.html 7 | 8 | pruned.json: source.json prune.py 9 | @python3 prune.py source.json > pruned.json 10 | 11 | source.json: zones.py $(TZDATA_LATEST) 12 | @python3 zones.py $(TZDATA_LATEST) > $@ 13 | 14 | tzdata-latest.tar.gz: 15 | @echo Downloading $(TZDATA_URL) 16 | @wget -q $(TZDATA_URL) 17 | 18 | serve: 19 | @python3 serve.py 20 | 21 | clean: 22 | rm -rf index.html *.json tzdata-latest.tar.gz 23 | -------------------------------------------------------------------------------- /README.rst: -------------------------------------------------------------------------------- 1 | arewemeetingyet.com 2 | =================== 3 | 4 | A single-page web thingy that helps communicate (recurring) meeting times 5 | to globally distributed (and therefore timezone-challenged) participants. 6 | 7 | Requirements 8 | ------------ 9 | 10 | * A tzdata tarball (as distributed by IANA) 11 | * Python (tested with 2.7) 12 | 13 | How to install 14 | -------------- 15 | 16 | Simply run ``make``, which will retrieve the latest timezone information and 17 | build the templates. On gentoo, it will use the latest installed timezone data 18 | from ``/usr/portage/distfiles/tzdata20*``, on other systems it will download the 19 | latest timezone information from ftp.iana.org. If you are not on gentoo, you 20 | have to manually delete tzdata-latest.tar.gz and re-run ``make`` to update 21 | timezones. 22 | 23 | The JavaScript code currently assumes installation at a host root and 24 | redirection of all requests for that host to ``index.html``. On Apache, this 25 | can be achieved by employing the ``FallbackResource`` directive (consider 26 | also enabling ``AllowEncodedSlashes`` for your virtual host). 27 | 28 | To test locally, run ``make serve`` to spin up a simple http server on port 8000. 29 | -------------------------------------------------------------------------------- /create.py: -------------------------------------------------------------------------------- 1 | import json 2 | 3 | if __name__ == '__main__': 4 | 5 | with open('pruned.json') as f: 6 | data = json.load(f) 7 | 8 | with open('index.tmpl') as f: 9 | tmpl = f.read() 10 | 11 | for k, v in data.items(): 12 | tmpl = tmpl.replace('{{ %s }}' % k, json.dumps(v)) 13 | 14 | print(tmpl) 15 | -------------------------------------------------------------------------------- /index.tmpl: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 |143 | Your time: 144 | 145 | 146 |
147 | 152 | 153 |