diff options
author | luxagraf <sng@luxagraf.net> | 2012-09-22 22:27:04 -0400 |
---|---|---|
committer | luxagraf <sng@luxagraf.net> | 2012-09-22 22:27:04 -0400 |
commit | efb623af0bcb47d510501c282e1326b11343a29c (patch) | |
tree | 3a35fb19f5eba3b219c65277a5fb712cbe9604ac /app/cron | |
parent | 0b481fd7931c2ae20ca21f89a87f2ba6a6c01e10 (diff) |
site reorg
Diffstat (limited to 'app/cron')
-rw-r--r-- | app/cron/create_country_sidebar.py | 19 | ||||
-rw-r--r-- | app/cron/create_region_sidebar.py | 18 | ||||
-rw-r--r-- | app/cron/full_build.py | 33 | ||||
-rwxr-xr-x | app/cron/full_build.sh | 2 | ||||
-rw-r--r-- | app/cron/sync_links.py | 13 | ||||
-rw-r--r-- | app/cron/sync_photo_sets.py | 15 | ||||
-rw-r--r-- | app/cron/sync_photos.py | 15 |
7 files changed, 115 insertions, 0 deletions
diff --git a/app/cron/create_country_sidebar.py b/app/cron/create_country_sidebar.py new file mode 100644 index 0000000..f660c73 --- /dev/null +++ b/app/cron/create_country_sidebar.py @@ -0,0 +1,19 @@ +import sys, os + +sys.path.append('/home/luxagraf/webapps/django1_1') +sys.path.append('/home/luxagraf/webapps/django1_1/luxagraf') +sys.path.append('/home/luxagraf/webapps/django1_1/luxagraf/apps') +sys.path.append('/home/luxagraf/webapps/django1_1/luxagraf/lib') +sys.path.append('/home/luxagraf/webapps/django1_1/lib/python2.5/') +os.environ['DJANGO_SETTINGS_MODULE'] = 'settings' + +from django.template import Context +from django.template import loader +from django.conf import settings +from locations.models import Country,Region +c = Context({'country_list': Country.objects.filter(visited=True),}) +t = loader.render_to_string('includes/country_sidebar_template.html',c) +fpath = '%s%s' %(settings.PROJ_ROOT,'templates/includes/country_sidebar.html') +file = open(fpath, 'w') +file.write(t) +file.close()
\ No newline at end of file diff --git a/app/cron/create_region_sidebar.py b/app/cron/create_region_sidebar.py new file mode 100644 index 0000000..77f2628 --- /dev/null +++ b/app/cron/create_region_sidebar.py @@ -0,0 +1,18 @@ +import sys, os + +sys.path.append('/home/luxagraf/webapps/django1_1') +sys.path.append('/home/luxagraf/webapps/django1_1/luxagraf') +sys.path.append('/home/luxagraf/webapps/django1_1/luxagraf/apps') +sys.path.append('/home/luxagraf/webapps/django1_1/luxagraf/lib') +sys.path.append('/home/luxagraf/webapps/django1_1/lib/python2.5/') +os.environ['DJANGO_SETTINGS_MODULE'] = 'settings' + +from django.template import Context,loader +from django.conf import settings +from locations.models import Region +c = Context({'region_list': Region.objects.all(),}) +t = loader.render_to_string('includes/regions_sidebar_template.html',c) +fpath = '%s%s' %(settings.PROJ_ROOT,'templates/includes/regions_sidebar.html') +file = open(fpath, 'w') +file.write(t) +file.close()
\ No newline at end of file diff --git a/app/cron/full_build.py b/app/cron/full_build.py new file mode 100644 index 0000000..e52d005 --- /dev/null +++ b/app/cron/full_build.py @@ -0,0 +1,33 @@ +import sys, os +from os.path import dirname, abspath + +PROJECT_ROOT = abspath(dirname(dirname(__file__))) + +sys.path.append(PROJECT_ROOT) +sys.path.append(PROJECT_ROOT+'/apps') +sys.path.append(PROJECT_ROOT+'/lib') +sys.path.append('/home/luxagraf/webapps/django1_3/lib/python2.7/') +os.environ['DJANGO_SETTINGS_MODULE'] = 'settings' + +from build.base import BuildWriting,BuildMap,BuildPhotos,BuildAbout,BuildProjects,BuildSitemap,BuildContact + +b = BuildWriting() +b.build() + +b = BuildPhotos() +b.build() + +b = BuildMap() +b.build() + +b = BuildAbout() +b.build() + +b = BuildProjects() +b.build() + +b = BuildSitemap() +b.build() + +b = BuildContact() +b.build()
\ No newline at end of file diff --git a/app/cron/full_build.sh b/app/cron/full_build.sh new file mode 100755 index 0000000..c065d48 --- /dev/null +++ b/app/cron/full_build.sh @@ -0,0 +1,2 @@ +#!/bin/sh +python2.7 /home/luxagraf/webapps/django/luxagraf/cron/full_build.py
\ No newline at end of file diff --git a/app/cron/sync_links.py b/app/cron/sync_links.py new file mode 100644 index 0000000..4bec6d2 --- /dev/null +++ b/app/cron/sync_links.py @@ -0,0 +1,13 @@ +import sys, os +from os.path import dirname, abspath + +PROJECT_ROOT = abspath(dirname(dirname(__file__))) + +sys.path.append(PROJECT_ROOT) +sys.path.append(PROJECT_ROOT+'/apps') +sys.path.append(PROJECT_ROOT+'/lib') +sys.path.append(PROJECT_ROOT+'/lib/utils') +sys.path.append('/home/luxagraf/webapps/django/lib/python2.7/') +os.environ['DJANGO_SETTINGS_MODULE'] = 'settings' +from links import retriever +retriever.sync_pinboard_links()
\ No newline at end of file diff --git a/app/cron/sync_photo_sets.py b/app/cron/sync_photo_sets.py new file mode 100644 index 0000000..8c18a9a --- /dev/null +++ b/app/cron/sync_photo_sets.py @@ -0,0 +1,15 @@ +import sys, os +from os.path import dirname, abspath + +PROJECT_ROOT = abspath(dirname(dirname(__file__))) + + +sys.path.append(PROJECT_ROOT) +sys.path.append(PROJECT_ROOT+'/apps') +sys.path.append(PROJECT_ROOT+'/lib') +sys.path.append(PROJECT_ROOT+'/lib/utils') +sys.path.append('/home/luxagraf/webapps/django1_3/lib/python2.7/') +os.environ['DJANGO_SETTINGS_MODULE'] = 'settings' + +from photos import retriever +retriever.sync_sets()
\ No newline at end of file diff --git a/app/cron/sync_photos.py b/app/cron/sync_photos.py new file mode 100644 index 0000000..3dc7552 --- /dev/null +++ b/app/cron/sync_photos.py @@ -0,0 +1,15 @@ +import sys, os +from os.path import dirname, abspath + +PROJECT_ROOT = abspath(dirname(dirname(__file__))) + + +sys.path.append(PROJECT_ROOT) +sys.path.append(PROJECT_ROOT+'/apps') +sys.path.append(PROJECT_ROOT+'/lib') +sys.path.append(PROJECT_ROOT+'/lib/utils') +sys.path.append('/home/luxagraf/webapps/django1_3/lib/python2.7/') +os.environ['DJANGO_SETTINGS_MODULE'] = 'settings' + +from photos import retriever +retriever.sync_flickr_photos()
\ No newline at end of file |