From a063dfdd704ebdfefb7bac1d5ab4ee4bca0763df Mon Sep 17 00:00:00 2001 From: Oleg Broytman Date: Sat, 30 Sep 2006 18:28:52 +0000 Subject: [PATCH] Started to make the program language-independent. Fixed a problem in month names. git-svn-id: file:///home/phd/archive/SVN/phdru.name/scripts@57 7bb0bf08-9e0d-0410-b083-99cee3bf18b8 --- reindex_blog.py | 9 +++++---- reindex_blog_ru | 2 +- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/reindex_blog.py b/reindex_blog.py index 24db91d..a4667b0 100755 --- a/reindex_blog.py +++ b/reindex_blog.py @@ -10,8 +10,9 @@ __copyright__ = "Copyright (C) 2006 PhiloSoft Design" import sys, os -blog_filename = sys.argv[1] +blog_data_root = sys.argv[1] blog_root = sys.argv[2] +blog_filename = os.path.join(blog_data_root, "blog_dict.pickle") try: import cPickle as pickle @@ -179,11 +180,11 @@ def write_template(level, year, month, day, titles, tags=None): #attr $Copyright = %(cyear)s ## #def body_html -

öÕÒÎÁÌ: %(day)d %(month_name_ru0)s %(year)s

+

öÕÒÎÁÌ: %(day)d %(month_name_ru)s %(year)s

""" % { "year": year, "cyear": year or 2005, "month_abbr_en": months_abbrs_en[imonth], "month_name_en": months_names_en[imonth], - "month_name_ru0": months_names_ru0[imonth], + "month_name_ru": months_names_ru[imonth], "day": iday }) @@ -388,7 +389,7 @@ from atom_10 import atom_10 from rss_20 import rss_20 from news import NewsItem -baseURL = "http://phd.pp.ru/Russian/blog/" +baseURL = "http://phd.pp.ru/" + blog_root items = [] for item in tuple(reversed(all_titles_tags))[:10]: diff --git a/reindex_blog_ru b/reindex_blog_ru index 37f1376..c881635 100755 --- a/reindex_blog_ru +++ b/reindex_blog_ru @@ -6,4 +6,4 @@ LC_TIME=ru_RU.KOI8-R export LC_TIME cd ../htdocs/phd.pp.ru && \ -exec ../../phd.pp.ru/reindex_blog.py ../../phd.pp.ru/blog_ru Russian/blog +exec ../../phd.pp.ru/reindex_blog.py ../../phd.pp.ru/ru Russian/blog -- 2.39.5