summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorluxagraf <sng@luxagraf.net>2016-01-19 15:56:03 -0500
committerluxagraf <sng@luxagraf.net>2016-01-19 15:56:03 -0500
commit944d8bc9972abd3cede92d1a30fc0a1875a439fe (patch)
tree4dc6dab6fe9a5712ee23f3111e3160d501f46d6b
parent7622933e291141b5d58293eacb813d0c0635695f (diff)
added scripts to daily for nightly cron job that creates new entry and
appends weather to previous
-rw-r--r--app/TODO16
-rw-r--r--app/daily/create_daily.py14
-rw-r--r--app/daily/get_weather.py14
3 files changed, 40 insertions, 4 deletions
diff --git a/app/TODO b/app/TODO
index 93b98c8..17f39e0 100644
--- a/app/TODO
+++ b/app/TODO
@@ -17,6 +17,15 @@ https://github.com/duner/django-bluebox/blob/master/bluebox/converters/sanitizer
Climate classifications instead of geopolitical boundaries:
https://en.wikipedia.org/wiki/Köppen_climate_classification
+
+shapefiles: http://koeppen-geiger.vu-wien.ac.at/shifts.htm
+---
+
+daily
+
+Still need to add widget to checkin admin to
+automatically grab the geodata from device.
+
---
#src
@@ -32,16 +41,15 @@ redirect lhp: home, book and rss
# figments
-iron out templates and push first piece live.
+fix send to Kindle function
+
---
# photos:
-
-handle portrait orientation in resizing
-
finish builder
+add geodata to upload
port existing galleries to new structure
diff --git a/app/daily/create_daily.py b/app/daily/create_daily.py
new file mode 100644
index 0000000..5441b77
--- /dev/null
+++ b/app/daily/create_daily.py
@@ -0,0 +1,14 @@
+import sys
+import os
+from os.path import dirname, abspath
+import django
+PROJECT_ROOT = abspath(dirname(dirname(dirname(__file__)))) + '/'
+sys.path.append(PROJECT_ROOT)
+sys.path.append(PROJECT_ROOT + '/app')
+sys.path.append(PROJECT_ROOT + '/app/lib')
+sys.path.append(PROJECT_ROOT + '/config')
+sys.path.append(PROJECT_ROOT + '/venv/bin/python3')
+os.environ['DJANGO_SETTINGS_MODULE'] = 'config.settings'
+django.setup()
+from daily import retriever
+retriever.create_daily()
diff --git a/app/daily/get_weather.py b/app/daily/get_weather.py
new file mode 100644
index 0000000..6cd56af
--- /dev/null
+++ b/app/daily/get_weather.py
@@ -0,0 +1,14 @@
+import sys
+import os
+from os.path import dirname, abspath
+import django
+PROJECT_ROOT = abspath(dirname(dirname(dirname(__file__)))) + '/'
+sys.path.append(PROJECT_ROOT)
+sys.path.append(PROJECT_ROOT + '/app')
+sys.path.append(PROJECT_ROOT + '/app/lib')
+sys.path.append(PROJECT_ROOT + '/config')
+sys.path.append(PROJECT_ROOT + '/venv/bin/python3')
+os.environ['DJANGO_SETTINGS_MODULE'] = 'config.settings'
+django.setup()
+from daily import retriever
+retriever.get_yesterday_weather()