Author: robweir
Date: Sat May 26 15:34:45 2012
New Revision: 1342913
URL: http://svn.apache.org/viewvc?rev=1342913&view=rev
Log:
Initial check-in of download stats script
Added:
incubator/ooo/devtools/aoo-stats/
incubator/ooo/devtools/aoo-stats/aoo-stats.py (with props)
Added: incubator/ooo/devtools/aoo-stats/aoo-stats.py
URL:
http://svn.apache.org/viewvc/incubator/ooo/devtools/aoo-stats/aoo-stats.py?rev=1342913&view=auto
==============================================================================
--- incubator/ooo/devtools/aoo-stats/aoo-stats.py (added)
+++ incubator/ooo/devtools/aoo-stats/aoo-stats.py Sat May 26 15:34:45 2012
@@ -0,0 +1,341 @@
+################################################################
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+################################################################
+
+
+# This script queries the SourceForce REST API for download statistics for
+# Apche OpenOffice 3.4 downloads. The statistics are then written to stdout
+# in a CSV format suitable for loading into Calc.
+#
+#
+# In order to speed up the script on repeat executions, partial results
+# are cachced in the ./cache directory
+
+
+import urllib
+import json
+import os
+import hashlib
+import datetime
+import time
+
+from urllib import urlencode
+
+def getSourceForgeStats(download,date):
+# We cache JSON objects for previously requested data
+# Note that caching the data from today is probably not
+# the best idea, but determing exactly what data is still
+# changing is hard, since it depends on timezone as well
+# as the lag in SourceForge's reporting, which is variable.
+
+# Safe thing is to always refresh today's and yesterday's data
+
+ datestr = time.strftime("%Y-%m-%d", date.timetuple())
+
+ today = date.today()
+ yesterday = today - datetime.timedelta(days=1)
+
+ url = download + "/stats/json?start_date=" + datestr + "&" "end_date=" +
datestr
+
+ fileName = "./cache/" + datestr + "-" + hashlib.sha1(url).hexdigest() +
".txt"
+
+ if os.path.exists(fileName) and date!=today and date!=yesterday:
+ return open(fileName, 'r').read()
+ else:
+ data = urllib.urlopen(url).read()
+ file = open(fileName, "w")
+ file.write(data)
+ file.close()
+ return data
+
+#extracts the language code from the URL
+# this logic is very sensitive to the exact naming conventions
+def getLanguage(url):
+
+ s = str(url)
+
+ if s.endswith('.exe'):
+ s = s[:-4]
+ elif s.endswith('.dmg'):
+ s = s[:-4]
+ elif s.endswith('.tar.gz'):
+ s = s[:-7]
+
+ return s[s.rfind("_")+1:len(s)]
+
+
+#extracts the platform string from the URL
+def getPlatform(url):
+
+ if str(url).find("Win_x86") != -1:
+ return "Win_x86"
+
+ if str(url).find("Linux_x86-64") != -1:
+ return "Linux_x86-64"
+
+ if str(url).find("Linux_x86") != -1:
+ return "Linux_x86"
+
+ if str(url).find("MacOS_x86") != -1:
+ return "MacOS_x86"
+
+ return "unknown"
+
+
+#extracts the packaging from the URL
+def getPackaging(url):
+
+ if str(url).find("-deb") != -1:
+ return "DEB"
+
+ if str(url).find("-rpm") != -1:
+ return "RPM"
+
+ return "none"
+
+#extracts the kind of download from the URL
+def getKind(url):
+
+ if str(url).find("SDK") != -1:
+ return "SDK"
+
+ if str(url).find("install") != -1:
+ return "install"
+
+ if str(url).find("langpack") != -1:
+ return "langpack"
+
+ return "unknown"
+
+#all of the URLs for AOO 3.4 downloads, including installs, SDK's and
langpacks, but excluding the checksum files and source bundle
+downloads = [
+
"http://sourceforge.net/projects/openofficeorg.mirror/files/localized/ar/3.4.0/Apache_OpenOffice_incubating_3.4.0_Win_x86_install_ar.exe"
,
+
"http://sourceforge.net/projects/openofficeorg.mirror/files/localized/ar/3.4.0/Apache_OpenOffice_incubating_3.4.0_Linux_x86_install-rpm_ar.tar.gz"
,
+
"http://sourceforge.net/projects/openofficeorg.mirror/files/localized/ar/3.4.0/Apache_OpenOffice_incubating_3.4.0_Linux_x86_install-deb_ar.tar.gz"
,
+
"http://sourceforge.net/projects/openofficeorg.mirror/files/localized/ar/3.4.0/Apache_OpenOffice_incubating_3.4.0_Linux_x86-64_install-rpm_ar.tar.gz"
,
+
"http://sourceforge.net/projects/openofficeorg.mirror/files/localized/ar/3.4.0/Apache_OpenOffice_incubating_3.4.0_Linux_x86-64_install-deb_ar.tar.gz"
,
+
"http://sourceforge.net/projects/openofficeorg.mirror/files/localized/ar/3.4.0/Apache_OpenOffice_incubating_3.4.0_MacOS_x86_install_ar.dmg"
,
+
"http://sourceforge.net/projects/openofficeorg.mirror/files/localized/zh-CN/3.4.0/Apache_OpenOffice_incubating_3.4.0_Win_x86_install_zh-CN.exe"
,
+
"http://sourceforge.net/projects/openofficeorg.mirror/files/localized/zh-CN/3.4.0/Apache_OpenOffice_incubating_3.4.0_Linux_x86_install-rpm_zh-CN.tar.gz"
,
+
"http://sourceforge.net/projects/openofficeorg.mirror/files/localized/zh-CN/3.4.0/Apache_OpenOffice_incubating_3.4.0_Linux_x86_install-deb_zh-CN.tar.gz"
,
+
"http://sourceforge.net/projects/openofficeorg.mirror/files/localized/zh-CN/3.4.0/Apache_OpenOffice_incubating_3.4.0_Linux_x86-64_install-rpm_zh-CN.tar.gz"
,
+
"http://sourceforge.net/projects/openofficeorg.mirror/files/localized/zh-CN/3.4.0/Apache_OpenOffice_incubating_3.4.0_Linux_x86-64_install-deb_zh-CN.tar.gz"
,
+
"http://sourceforge.net/projects/openofficeorg.mirror/files/localized/zh-CN/3.4.0/Apache_OpenOffice_incubating_3.4.0_MacOS_x86_install_zh-CN.dmg"
,
+
"http://sourceforge.net/projects/openofficeorg.mirror/files/localized/zh-TW/3.4.0/Apache_OpenOffice_incubating_3.4.0_Win_x86_install_zh-TW.exe"
,
+
"http://sourceforge.net/projects/openofficeorg.mirror/files/localized/zh-TW/3.4.0/Apache_OpenOffice_incubating_3.4.0_Linux_x86_install-rpm_zh-TW.tar.gz"
,
+
"http://sourceforge.net/projects/openofficeorg.mirror/files/localized/zh-TW/3.4.0/Apache_OpenOffice_incubating_3.4.0_Linux_x86_install-deb_zh-TW.tar.gz"
,
+
"http://sourceforge.net/projects/openofficeorg.mirror/files/localized/zh-TW/3.4.0/Apache_OpenOffice_incubating_3.4.0_Linux_x86-64_install-rpm_zh-TW.tar.gz"
,
+
"http://sourceforge.net/projects/openofficeorg.mirror/files/localized/zh-TW/3.4.0/Apache_OpenOffice_incubating_3.4.0_Linux_x86-64_install-deb_zh-TW.tar.gz"
,
+
"http://sourceforge.net/projects/openofficeorg.mirror/files/localized/zh-TW/3.4.0/Apache_OpenOffice_incubating_3.4.0_MacOS_x86_install_zh-TW.dmg"
,
+
"http://sourceforge.net/projects/openofficeorg.mirror/files/localized/cs/3.4.0/Apache_OpenOffice_incubating_3.4.0_Win_x86_install_cs.exe"
,
+
"http://sourceforge.net/projects/openofficeorg.mirror/files/localized/cs/3.4.0/Apache_OpenOffice_incubating_3.4.0_Linux_x86_install-rpm_cs.tar.gz"
,
+
"http://sourceforge.net/projects/openofficeorg.mirror/files/localized/cs/3.4.0/Apache_OpenOffice_incubating_3.4.0_Linux_x86_install-deb_cs.tar.gz"
,
+
"http://sourceforge.net/projects/openofficeorg.mirror/files/localized/cs/3.4.0/Apache_OpenOffice_incubating_3.4.0_Linux_x86-64_install-rpm_cs.tar.gz"
,
+
"http://sourceforge.net/projects/openofficeorg.mirror/files/localized/cs/3.4.0/Apache_OpenOffice_incubating_3.4.0_Linux_x86-64_install-deb_cs.tar.gz"
,
+
"http://sourceforge.net/projects/openofficeorg.mirror/files/localized/cs/3.4.0/Apache_OpenOffice_incubating_3.4.0_MacOS_x86_install_cs.dmg"
,
+
"http://sourceforge.net/projects/openofficeorg.mirror/files/localized/nl/3.4.0/Apache_OpenOffice_incubating_3.4.0_Win_x86_install_nl.exe"
,
+
"http://sourceforge.net/projects/openofficeorg.mirror/files/localized/nl/3.4.0/Apache_OpenOffice_incubating_3.4.0_Linux_x86_install-rpm_nl.tar.gz"
,
+
"http://sourceforge.net/projects/openofficeorg.mirror/files/localized/nl/3.4.0/Apache_OpenOffice_incubating_3.4.0_Linux_x86_install-deb_nl.tar.gz"
,
+
"http://sourceforge.net/projects/openofficeorg.mirror/files/localized/nl/3.4.0/Apache_OpenOffice_incubating_3.4.0_Linux_x86-64_install-rpm_nl.tar.gz"
,
+
"http://sourceforge.net/projects/openofficeorg.mirror/files/localized/nl/3.4.0/Apache_OpenOffice_incubating_3.4.0_Linux_x86-64_install-deb_nl.tar.gz"
,
+
"http://sourceforge.net/projects/openofficeorg.mirror/files/localized/nl/3.4.0/Apache_OpenOffice_incubating_3.4.0_MacOS_x86_install_nl.dmg"
,
+
"http://sourceforge.net/projects/openofficeorg.mirror/files/stable/3.4.0/Apache_OpenOffice_incubating_3.4.0_Win_x86_install_en-US.exe"
,
+
"http://sourceforge.net/projects/openofficeorg.mirror/files/stable/3.4.0/Apache_OpenOffice_incubating_3.4.0_Linux_x86_install-rpm_en-US.tar.gz"
,
+
"http://sourceforge.net/projects/openofficeorg.mirror/files/stable/3.4.0/Apache_OpenOffice_incubating_3.4.0_Linux_x86_install-deb_en-US.tar.gz"
,
+
"http://sourceforge.net/projects/openofficeorg.mirror/files/stable/3.4.0/Apache_OpenOffice_incubating_3.4.0_Linux_x86-64_install-rpm_en-US.tar.gz"
,
+
"http://sourceforge.net/projects/openofficeorg.mirror/files/stable/3.4.0/Apache_OpenOffice_incubating_3.4.0_Linux_x86-64_install-deb_en-US.tar.gz"
,
+
"http://sourceforge.net/projects/openofficeorg.mirror/files/stable/3.4.0/Apache_OpenOffice_incubating_3.4.0_MacOS_x86_install_en-US.dmg"
,
+
"http://sourceforge.net/projects/openofficeorg.mirror/files/localized/fr/3.4.0/Apache_OpenOffice_incubating_3.4.0_Win_x86_install_fr.exe"
,
+
"http://sourceforge.net/projects/openofficeorg.mirror/files/localized/fr/3.4.0/Apache_OpenOffice_incubating_3.4.0_Linux_x86_install-rpm_fr.tar.gz"
,
+
"http://sourceforge.net/projects/openofficeorg.mirror/files/localized/fr/3.4.0/Apache_OpenOffice_incubating_3.4.0_Linux_x86_install-deb_fr.tar.gz"
,
+
"http://sourceforge.net/projects/openofficeorg.mirror/files/localized/fr/3.4.0/Apache_OpenOffice_incubating_3.4.0_Linux_x86-64_install-rpm_fr.tar.gz"
,
+
"http://sourceforge.net/projects/openofficeorg.mirror/files/localized/fr/3.4.0/Apache_OpenOffice_incubating_3.4.0_Linux_x86-64_install-deb_fr.tar.gz"
,
+
"http://sourceforge.net/projects/openofficeorg.mirror/files/localized/fr/3.4.0/Apache_OpenOffice_incubating_3.4.0_MacOS_x86_install_fr.dmg"
,
+
"http://sourceforge.net/projects/openofficeorg.mirror/files/localized/gl/3.4.0/Apache_OpenOffice_incubating_3.4.0_Win_x86_install_gl.exe"
,
+
"http://sourceforge.net/projects/openofficeorg.mirror/files/localized/gl/3.4.0/Apache_OpenOffice_incubating_3.4.0_Linux_x86_install-rpm_gl.tar.gz"
,
+
"http://sourceforge.net/projects/openofficeorg.mirror/files/localized/gl/3.4.0/Apache_OpenOffice_incubating_3.4.0_Linux_x86_install-deb_gl.tar.gz"
,
+
"http://sourceforge.net/projects/openofficeorg.mirror/files/localized/gl/3.4.0/Apache_OpenOffice_incubating_3.4.0_Linux_x86-64_install-rpm_gl.tar.gz"
,
+
"http://sourceforge.net/projects/openofficeorg.mirror/files/localized/gl/3.4.0/Apache_OpenOffice_incubating_3.4.0_Linux_x86-64_install-deb_gl.tar.gz"
,
+
"http://sourceforge.net/projects/openofficeorg.mirror/files/localized/gl/3.4.0/Apache_OpenOffice_incubating_3.4.0_MacOS_x86_install_gl.dmg"
,
+
"http://sourceforge.net/projects/openofficeorg.mirror/files/localized/de/3.4.0/Apache_OpenOffice_incubating_3.4.0_Win_x86_install_de.exe"
,
+
"http://sourceforge.net/projects/openofficeorg.mirror/files/localized/de/3.4.0/Apache_OpenOffice_incubating_3.4.0_Linux_x86_install-rpm_de.tar.gz"
,
+
"http://sourceforge.net/projects/openofficeorg.mirror/files/localized/de/3.4.0/Apache_OpenOffice_incubating_3.4.0_Linux_x86_install-deb_de.tar.gz"
,
+
"http://sourceforge.net/projects/openofficeorg.mirror/files/localized/de/3.4.0/Apache_OpenOffice_incubating_3.4.0_Linux_x86-64_install-rpm_de.tar.gz"
,
+
"http://sourceforge.net/projects/openofficeorg.mirror/files/localized/de/3.4.0/Apache_OpenOffice_incubating_3.4.0_Linux_x86-64_install-deb_de.tar.gz"
,
+
"http://sourceforge.net/projects/openofficeorg.mirror/files/localized/de/3.4.0/Apache_OpenOffice_incubating_3.4.0_MacOS_x86_install_de.dmg"
,
+
"http://sourceforge.net/projects/openofficeorg.mirror/files/localized/hu/3.4.0/Apache_OpenOffice_incubating_3.4.0_Win_x86_install_hu.exe"
,
+
"http://sourceforge.net/projects/openofficeorg.mirror/files/localized/hu/3.4.0/Apache_OpenOffice_incubating_3.4.0_Linux_x86_install-rpm_hu.tar.gz"
,
+
"http://sourceforge.net/projects/openofficeorg.mirror/files/localized/hu/3.4.0/Apache_OpenOffice_incubating_3.4.0_Linux_x86_install-deb_hu.tar.gz"
,
+
"http://sourceforge.net/projects/openofficeorg.mirror/files/localized/hu/3.4.0/Apache_OpenOffice_incubating_3.4.0_Linux_x86-64_install-rpm_hu.tar.gz"
,
+
"http://sourceforge.net/projects/openofficeorg.mirror/files/localized/hu/3.4.0/Apache_OpenOffice_incubating_3.4.0_Linux_x86-64_install-deb_hu.tar.gz"
,
+
"http://sourceforge.net/projects/openofficeorg.mirror/files/localized/hu/3.4.0/Apache_OpenOffice_incubating_3.4.0_MacOS_x86_install_hu.dmg"
,
+
"http://sourceforge.net/projects/openofficeorg.mirror/files/localized/it/3.4.0/Apache_OpenOffice_incubating_3.4.0_Win_x86_install_it.exe"
,
+
"http://sourceforge.net/projects/openofficeorg.mirror/files/localized/it/3.4.0/Apache_OpenOffice_incubating_3.4.0_Linux_x86_install-rpm_it.tar.gz"
,
+
"http://sourceforge.net/projects/openofficeorg.mirror/files/localized/it/3.4.0/Apache_OpenOffice_incubating_3.4.0_Linux_x86_install-deb_it.tar.gz"
,
+
"http://sourceforge.net/projects/openofficeorg.mirror/files/localized/it/3.4.0/Apache_OpenOffice_incubating_3.4.0_Linux_x86-64_install-rpm_it.tar.gz"
,
+
"http://sourceforge.net/projects/openofficeorg.mirror/files/localized/it/3.4.0/Apache_OpenOffice_incubating_3.4.0_Linux_x86-64_install-deb_it.tar.gz"
,
+
"http://sourceforge.net/projects/openofficeorg.mirror/files/localized/it/3.4.0/Apache_OpenOffice_incubating_3.4.0_MacOS_x86_install_it.dmg"
,
+
"http://sourceforge.net/projects/openofficeorg.mirror/files/localized/ja/3.4.0/Apache_OpenOffice_incubating_3.4.0_Win_x86_install_ja.exe"
,
+
"http://sourceforge.net/projects/openofficeorg.mirror/files/localized/ja/3.4.0/Apache_OpenOffice_incubating_3.4.0_Linux_x86_install-rpm_ja.tar.gz"
,
+
"http://sourceforge.net/projects/openofficeorg.mirror/files/localized/ja/3.4.0/Apache_OpenOffice_incubating_3.4.0_Linux_x86_install-deb_ja.tar.gz"
,
+
"http://sourceforge.net/projects/openofficeorg.mirror/files/localized/ja/3.4.0/Apache_OpenOffice_incubating_3.4.0_Linux_x86-64_install-rpm_ja.tar.gz"
,
+
"http://sourceforge.net/projects/openofficeorg.mirror/files/localized/ja/3.4.0/Apache_OpenOffice_incubating_3.4.0_Linux_x86-64_install-deb_ja.tar.gz"
,
+
"http://sourceforge.net/projects/openofficeorg.mirror/files/localized/ja/3.4.0/Apache_OpenOffice_incubating_3.4.0_MacOS_x86_install_ja.dmg"
,
+
"http://sourceforge.net/projects/openofficeorg.mirror/files/localized/pt-BR/3.4.0/Apache_OpenOffice_incubating_3.4.0_Win_x86_install_pt-BR.exe"
,
+
"http://sourceforge.net/projects/openofficeorg.mirror/files/localized/pt-BR/3.4.0/Apache_OpenOffice_incubating_3.4.0_Linux_x86_install-rpm_pt-BR.tar.gz"
,
+
"http://sourceforge.net/projects/openofficeorg.mirror/files/localized/pt-BR/3.4.0/Apache_OpenOffice_incubating_3.4.0_Linux_x86_install-deb_pt-BR.tar.gz"
,
+
"http://sourceforge.net/projects/openofficeorg.mirror/files/localized/pt-BR/3.4.0/Apache_OpenOffice_incubating_3.4.0_Linux_x86-64_install-rpm_pt-BR.tar.gz"
,
+
"http://sourceforge.net/projects/openofficeorg.mirror/files/localized/pt-BR/3.4.0/Apache_OpenOffice_incubating_3.4.0_Linux_x86-64_install-deb_pt-BR.tar.gz"
,
+
"http://sourceforge.net/projects/openofficeorg.mirror/files/localized/pt-BR/3.4.0/Apache_OpenOffice_incubating_3.4.0_MacOS_x86_install_pt-BR.dmg"
,
+
"http://sourceforge.net/projects/openofficeorg.mirror/files/localized/ru/3.4.0/Apache_OpenOffice_incubating_3.4.0_Win_x86_install_ru.exe"
,
+
"http://sourceforge.net/projects/openofficeorg.mirror/files/localized/ru/3.4.0/Apache_OpenOffice_incubating_3.4.0_Linux_x86_install-rpm_ru.tar.gz"
,
+
"http://sourceforge.net/projects/openofficeorg.mirror/files/localized/ru/3.4.0/Apache_OpenOffice_incubating_3.4.0_Linux_x86_install-deb_ru.tar.gz"
,
+
"http://sourceforge.net/projects/openofficeorg.mirror/files/localized/ru/3.4.0/Apache_OpenOffice_incubating_3.4.0_Linux_x86-64_install-rpm_ru.tar.gz"
,
+
"http://sourceforge.net/projects/openofficeorg.mirror/files/localized/ru/3.4.0/Apache_OpenOffice_incubating_3.4.0_Linux_x86-64_install-deb_ru.tar.gz"
,
+
"http://sourceforge.net/projects/openofficeorg.mirror/files/localized/ru/3.4.0/Apache_OpenOffice_incubating_3.4.0_MacOS_x86_install_ru.dmg"
,
+
"http://sourceforge.net/projects/openofficeorg.mirror/files/localized/es/3.4.0/Apache_OpenOffice_incubating_3.4.0_Win_x86_install_es.exe"
,
+
"http://sourceforge.net/projects/openofficeorg.mirror/files/localized/es/3.4.0/Apache_OpenOffice_incubating_3.4.0_Linux_x86_install-rpm_es.tar.gz"
,
+
"http://sourceforge.net/projects/openofficeorg.mirror/files/localized/es/3.4.0/Apache_OpenOffice_incubating_3.4.0_Linux_x86_install-deb_es.tar.gz"
,
+
"http://sourceforge.net/projects/openofficeorg.mirror/files/localized/es/3.4.0/Apache_OpenOffice_incubating_3.4.0_Linux_x86-64_install-rpm_es.tar.gz"
,
+
"http://sourceforge.net/projects/openofficeorg.mirror/files/localized/es/3.4.0/Apache_OpenOffice_incubating_3.4.0_Linux_x86-64_install-deb_es.tar.gz"
,
+
"http://sourceforge.net/projects/openofficeorg.mirror/files/localized/es/3.4.0/Apache_OpenOffice_incubating_3.4.0_MacOS_x86_install_es.dmg"
,
+
"http://sourceforge.net/projects/openofficeorg.mirror/files/localized/ar/3.4.0/Apache_OpenOffice_incubating_3.4.0_Win_x86_langpack_ar.exe"
,
+
"http://sourceforge.net/projects/openofficeorg.mirror/files/localized/ar/3.4.0/Apache_OpenOffice_incubating_3.4.0_Linux_x86_langpack-rpm_ar.tar.gz"
,
+
"http://sourceforge.net/projects/openofficeorg.mirror/files/localized/ar/3.4.0/Apache_OpenOffice_incubating_3.4.0_Linux_x86_langpack-deb_ar.tar.gz"
,
+
"http://sourceforge.net/projects/openofficeorg.mirror/files/localized/ar/3.4.0/Apache_OpenOffice_incubating_3.4.0_Linux_x86-64_langpack-rpm_ar.tar.gz"
,
+
"http://sourceforge.net/projects/openofficeorg.mirror/files/localized/ar/3.4.0/Apache_OpenOffice_incubating_3.4.0_Linux_x86-64_langpack-deb_ar.tar.gz"
,
+
"http://sourceforge.net/projects/openofficeorg.mirror/files/localized/ar/3.4.0/Apache_OpenOffice_incubating_3.4.0_MacOS_x86_langpack_ar.dmg"
,
+
"http://sourceforge.net/projects/openofficeorg.mirror/files/localized/zh-CN/3.4.0/Apache_OpenOffice_incubating_3.4.0_Win_x86_langpack_zh-CN.exe"
,
+
"http://sourceforge.net/projects/openofficeorg.mirror/files/localized/zh-CN/3.4.0/Apache_OpenOffice_incubating_3.4.0_Linux_x86_langpack-rpm_zh-CN.tar.gz"
,
+
"http://sourceforge.net/projects/openofficeorg.mirror/files/localized/zh-CN/3.4.0/Apache_OpenOffice_incubating_3.4.0_Linux_x86_langpack-deb_zh-CN.tar.gz"
,
+
"http://sourceforge.net/projects/openofficeorg.mirror/files/localized/zh-CN/3.4.0/Apache_OpenOffice_incubating_3.4.0_Linux_x86-64_langpack-rpm_zh-CN.tar.gz"
,
+
"http://sourceforge.net/projects/openofficeorg.mirror/files/localized/zh-CN/3.4.0/Apache_OpenOffice_incubating_3.4.0_Linux_x86-64_langpack-deb_zh-CN.tar.gz"
,
+
"http://sourceforge.net/projects/openofficeorg.mirror/files/localized/zh-CN/3.4.0/Apache_OpenOffice_incubating_3.4.0_MacOS_x86_langpack_zh-CN.dmg"
,
+
"http://sourceforge.net/projects/openofficeorg.mirror/files/localized/zh-TW/3.4.0/Apache_OpenOffice_incubating_3.4.0_Win_x86_langpack_zh-TW.exe"
,
+
"http://sourceforge.net/projects/openofficeorg.mirror/files/localized/zh-TW/3.4.0/Apache_OpenOffice_incubating_3.4.0_Linux_x86_langpack-rpm_zh-TW.tar.gz"
,
+
"http://sourceforge.net/projects/openofficeorg.mirror/files/localized/zh-TW/3.4.0/Apache_OpenOffice_incubating_3.4.0_Linux_x86_langpack-deb_zh-TW.tar.gz"
,
+
"http://sourceforge.net/projects/openofficeorg.mirror/files/localized/zh-TW/3.4.0/Apache_OpenOffice_incubating_3.4.0_Linux_x86-64_langpack-rpm_zh-TW.tar.gz"
,
+
"http://sourceforge.net/projects/openofficeorg.mirror/files/localized/zh-TW/3.4.0/Apache_OpenOffice_incubating_3.4.0_Linux_x86-64_langpack-deb_zh-TW.tar.gz"
,
+
"http://sourceforge.net/projects/openofficeorg.mirror/files/localized/zh-TW/3.4.0/Apache_OpenOffice_incubating_3.4.0_MacOS_x86_langpack_zh-TW.dmg"
,
+
"http://sourceforge.net/projects/openofficeorg.mirror/files/localized/cs/3.4.0/Apache_OpenOffice_incubating_3.4.0_Win_x86_langpack_cs.exe"
,
+
"http://sourceforge.net/projects/openofficeorg.mirror/files/localized/cs/3.4.0/Apache_OpenOffice_incubating_3.4.0_Linux_x86_langpack-rpm_cs.tar.gz"
,
+
"http://sourceforge.net/projects/openofficeorg.mirror/files/localized/cs/3.4.0/Apache_OpenOffice_incubating_3.4.0_Linux_x86_langpack-deb_cs.tar.gz"
,
+
"http://sourceforge.net/projects/openofficeorg.mirror/files/localized/cs/3.4.0/Apache_OpenOffice_incubating_3.4.0_Linux_x86-64_langpack-rpm_cs.tar.gz"
,
+
"http://sourceforge.net/projects/openofficeorg.mirror/files/localized/cs/3.4.0/Apache_OpenOffice_incubating_3.4.0_Linux_x86-64_langpack-deb_cs.tar.gz"
,
+
"http://sourceforge.net/projects/openofficeorg.mirror/files/localized/cs/3.4.0/Apache_OpenOffice_incubating_3.4.0_MacOS_x86_langpack_cs.dmg"
,
+
"http://sourceforge.net/projects/openofficeorg.mirror/files/localized/nl/3.4.0/Apache_OpenOffice_incubating_3.4.0_Win_x86_langpack_nl.exe"
,
+
"http://sourceforge.net/projects/openofficeorg.mirror/files/localized/nl/3.4.0/Apache_OpenOffice_incubating_3.4.0_Linux_x86_langpack-rpm_nl.tar.gz"
,
+
"http://sourceforge.net/projects/openofficeorg.mirror/files/localized/nl/3.4.0/Apache_OpenOffice_incubating_3.4.0_Linux_x86_langpack-deb_nl.tar.gz"
,
+
"http://sourceforge.net/projects/openofficeorg.mirror/files/localized/nl/3.4.0/Apache_OpenOffice_incubating_3.4.0_Linux_x86-64_langpack-rpm_nl.tar.gz"
,
+
"http://sourceforge.net/projects/openofficeorg.mirror/files/localized/nl/3.4.0/Apache_OpenOffice_incubating_3.4.0_Linux_x86-64_langpack-deb_nl.tar.gz"
,
+
"http://sourceforge.net/projects/openofficeorg.mirror/files/localized/nl/3.4.0/Apache_OpenOffice_incubating_3.4.0_MacOS_x86_langpack_nl.dmg"
,
+
"http://sourceforge.net/projects/openofficeorg.mirror/files/stable/3.4.0/Apache_OpenOffice_incubating_3.4.0_Win_x86_langpack_en-US.exe"
,
+
"http://sourceforge.net/projects/openofficeorg.mirror/files/stable/3.4.0/Apache_OpenOffice_incubating_3.4.0_Linux_x86_langpack-rpm_en-US.tar.gz"
,
+
"http://sourceforge.net/projects/openofficeorg.mirror/files/stable/3.4.0/Apache_OpenOffice_incubating_3.4.0_Linux_x86_langpack-deb_en-US.tar.gz"
,
+
"http://sourceforge.net/projects/openofficeorg.mirror/files/stable/3.4.0/Apache_OpenOffice_incubating_3.4.0_Linux_x86-64_langpack-rpm_en-US.tar.gz"
,
+
"http://sourceforge.net/projects/openofficeorg.mirror/files/stable/3.4.0/Apache_OpenOffice_incubating_3.4.0_Linux_x86-64_langpack-deb_en-US.tar.gz"
,
+
"http://sourceforge.net/projects/openofficeorg.mirror/files/stable/3.4.0/Apache_OpenOffice_incubating_3.4.0_MacOS_x86_langpack_en-US.dmg"
,
+
"http://sourceforge.net/projects/openofficeorg.mirror/files/localized/fr/3.4.0/Apache_OpenOffice_incubating_3.4.0_Win_x86_langpack_fr.exe"
,
+
"http://sourceforge.net/projects/openofficeorg.mirror/files/localized/fr/3.4.0/Apache_OpenOffice_incubating_3.4.0_Linux_x86_langpack-rpm_fr.tar.gz"
,
+
"http://sourceforge.net/projects/openofficeorg.mirror/files/localized/fr/3.4.0/Apache_OpenOffice_incubating_3.4.0_Linux_x86_langpack-deb_fr.tar.gz"
,
+
"http://sourceforge.net/projects/openofficeorg.mirror/files/localized/fr/3.4.0/Apache_OpenOffice_incubating_3.4.0_Linux_x86-64_langpack-rpm_fr.tar.gz"
,
+
"http://sourceforge.net/projects/openofficeorg.mirror/files/localized/fr/3.4.0/Apache_OpenOffice_incubating_3.4.0_Linux_x86-64_langpack-deb_fr.tar.gz"
,
+
"http://sourceforge.net/projects/openofficeorg.mirror/files/localized/fr/3.4.0/Apache_OpenOffice_incubating_3.4.0_MacOS_x86_langpack_fr.dmg"
,
+
"http://sourceforge.net/projects/openofficeorg.mirror/files/localized/gl/3.4.0/Apache_OpenOffice_incubating_3.4.0_Win_x86_langpack_gl.exe"
,
+
"http://sourceforge.net/projects/openofficeorg.mirror/files/localized/gl/3.4.0/Apache_OpenOffice_incubating_3.4.0_Linux_x86_langpack-rpm_gl.tar.gz"
,
+
"http://sourceforge.net/projects/openofficeorg.mirror/files/localized/gl/3.4.0/Apache_OpenOffice_incubating_3.4.0_Linux_x86_langpack-deb_gl.tar.gz"
,
+
"http://sourceforge.net/projects/openofficeorg.mirror/files/localized/gl/3.4.0/Apache_OpenOffice_incubating_3.4.0_Linux_x86-64_langpack-rpm_gl.tar.gz"
,
+
"http://sourceforge.net/projects/openofficeorg.mirror/files/localized/gl/3.4.0/Apache_OpenOffice_incubating_3.4.0_Linux_x86-64_langpack-deb_gl.tar.gz"
,
+
"http://sourceforge.net/projects/openofficeorg.mirror/files/localized/gl/3.4.0/Apache_OpenOffice_incubating_3.4.0_MacOS_x86_langpack_gl.dmg"
,
+
"http://sourceforge.net/projects/openofficeorg.mirror/files/localized/de/3.4.0/Apache_OpenOffice_incubating_3.4.0_Win_x86_langpack_de.exe"
,
+
"http://sourceforge.net/projects/openofficeorg.mirror/files/localized/de/3.4.0/Apache_OpenOffice_incubating_3.4.0_Linux_x86_langpack-rpm_de.tar.gz"
,
+
"http://sourceforge.net/projects/openofficeorg.mirror/files/localized/de/3.4.0/Apache_OpenOffice_incubating_3.4.0_Linux_x86_langpack-deb_de.tar.gz"
,
+
"http://sourceforge.net/projects/openofficeorg.mirror/files/localized/de/3.4.0/Apache_OpenOffice_incubating_3.4.0_Linux_x86-64_langpack-rpm_de.tar.gz"
,
+
"http://sourceforge.net/projects/openofficeorg.mirror/files/localized/de/3.4.0/Apache_OpenOffice_incubating_3.4.0_Linux_x86-64_langpack-deb_de.tar.gz"
,
+
"http://sourceforge.net/projects/openofficeorg.mirror/files/localized/de/3.4.0/Apache_OpenOffice_incubating_3.4.0_MacOS_x86_langpack_de.dmg"
,
+
"http://sourceforge.net/projects/openofficeorg.mirror/files/localized/hu/3.4.0/Apache_OpenOffice_incubating_3.4.0_Win_x86_langpack_hu.exe"
,
+
"http://sourceforge.net/projects/openofficeorg.mirror/files/localized/hu/3.4.0/Apache_OpenOffice_incubating_3.4.0_Linux_x86_langpack-rpm_hu.tar.gz"
,
+
"http://sourceforge.net/projects/openofficeorg.mirror/files/localized/hu/3.4.0/Apache_OpenOffice_incubating_3.4.0_Linux_x86_langpack-deb_hu.tar.gz"
,
+
"http://sourceforge.net/projects/openofficeorg.mirror/files/localized/hu/3.4.0/Apache_OpenOffice_incubating_3.4.0_Linux_x86-64_langpack-rpm_hu.tar.gz"
,
+
"http://sourceforge.net/projects/openofficeorg.mirror/files/localized/hu/3.4.0/Apache_OpenOffice_incubating_3.4.0_Linux_x86-64_langpack-deb_hu.tar.gz"
,
+
"http://sourceforge.net/projects/openofficeorg.mirror/files/localized/hu/3.4.0/Apache_OpenOffice_incubating_3.4.0_MacOS_x86_langpack_hu.dmg"
,
+
"http://sourceforge.net/projects/openofficeorg.mirror/files/localized/it/3.4.0/Apache_OpenOffice_incubating_3.4.0_Win_x86_langpack_it.exe"
,
+
"http://sourceforge.net/projects/openofficeorg.mirror/files/localized/it/3.4.0/Apache_OpenOffice_incubating_3.4.0_Linux_x86_langpack-rpm_it.tar.gz"
,
+
"http://sourceforge.net/projects/openofficeorg.mirror/files/localized/it/3.4.0/Apache_OpenOffice_incubating_3.4.0_Linux_x86_langpack-deb_it.tar.gz"
,
+
"http://sourceforge.net/projects/openofficeorg.mirror/files/localized/it/3.4.0/Apache_OpenOffice_incubating_3.4.0_Linux_x86-64_langpack-rpm_it.tar.gz"
,
+
"http://sourceforge.net/projects/openofficeorg.mirror/files/localized/it/3.4.0/Apache_OpenOffice_incubating_3.4.0_Linux_x86-64_langpack-deb_it.tar.gz"
,
+
"http://sourceforge.net/projects/openofficeorg.mirror/files/localized/it/3.4.0/Apache_OpenOffice_incubating_3.4.0_MacOS_x86_langpack_it.dmg"
,
+
"http://sourceforge.net/projects/openofficeorg.mirror/files/localized/ja/3.4.0/Apache_OpenOffice_incubating_3.4.0_Win_x86_langpack_ja.exe"
,
+
"http://sourceforge.net/projects/openofficeorg.mirror/files/localized/ja/3.4.0/Apache_OpenOffice_incubating_3.4.0_Linux_x86_langpack-rpm_ja.tar.gz"
,
+
"http://sourceforge.net/projects/openofficeorg.mirror/files/localized/ja/3.4.0/Apache_OpenOffice_incubating_3.4.0_Linux_x86_langpack-deb_ja.tar.gz"
,
+
"http://sourceforge.net/projects/openofficeorg.mirror/files/localized/ja/3.4.0/Apache_OpenOffice_incubating_3.4.0_Linux_x86-64_langpack-rpm_ja.tar.gz"
,
+
"http://sourceforge.net/projects/openofficeorg.mirror/files/localized/ja/3.4.0/Apache_OpenOffice_incubating_3.4.0_Linux_x86-64_langpack-deb_ja.tar.gz"
,
+
"http://sourceforge.net/projects/openofficeorg.mirror/files/localized/ja/3.4.0/Apache_OpenOffice_incubating_3.4.0_MacOS_x86_langpack_ja.dmg"
,
+
"http://sourceforge.net/projects/openofficeorg.mirror/files/localized/pt-BR/3.4.0/Apache_OpenOffice_incubating_3.4.0_Win_x86_langpack_pt-BR.exe"
,
+
"http://sourceforge.net/projects/openofficeorg.mirror/files/localized/pt-BR/3.4.0/Apache_OpenOffice_incubating_3.4.0_Linux_x86_langpack-rpm_pt-BR.tar.gz"
,
+
"http://sourceforge.net/projects/openofficeorg.mirror/files/localized/pt-BR/3.4.0/Apache_OpenOffice_incubating_3.4.0_Linux_x86_langpack-deb_pt-BR.tar.gz"
,
+
"http://sourceforge.net/projects/openofficeorg.mirror/files/localized/pt-BR/3.4.0/Apache_OpenOffice_incubating_3.4.0_Linux_x86-64_langpack-rpm_pt-BR.tar.gz"
,
+
"http://sourceforge.net/projects/openofficeorg.mirror/files/localized/pt-BR/3.4.0/Apache_OpenOffice_incubating_3.4.0_Linux_x86-64_langpack-deb_pt-BR.tar.gz"
,
+
"http://sourceforge.net/projects/openofficeorg.mirror/files/localized/pt-BR/3.4.0/Apache_OpenOffice_incubating_3.4.0_MacOS_x86_langpack_pt-BR.dmg"
,
+
"http://sourceforge.net/projects/openofficeorg.mirror/files/localized/ru/3.4.0/Apache_OpenOffice_incubating_3.4.0_Win_x86_langpack_ru.exe"
,
+
"http://sourceforge.net/projects/openofficeorg.mirror/files/localized/ru/3.4.0/Apache_OpenOffice_incubating_3.4.0_Linux_x86_langpack-rpm_ru.tar.gz"
,
+
"http://sourceforge.net/projects/openofficeorg.mirror/files/localized/ru/3.4.0/Apache_OpenOffice_incubating_3.4.0_Linux_x86_langpack-deb_ru.tar.gz"
,
+
"http://sourceforge.net/projects/openofficeorg.mirror/files/localized/ru/3.4.0/Apache_OpenOffice_incubating_3.4.0_Linux_x86-64_langpack-rpm_ru.tar.gz"
,
+
"http://sourceforge.net/projects/openofficeorg.mirror/files/localized/ru/3.4.0/Apache_OpenOffice_incubating_3.4.0_Linux_x86-64_langpack-deb_ru.tar.gz"
,
+
"http://sourceforge.net/projects/openofficeorg.mirror/files/localized/ru/3.4.0/Apache_OpenOffice_incubating_3.4.0_MacOS_x86_langpack_ru.dmg"
,
+
"http://sourceforge.net/projects/openofficeorg.mirror/files/localized/es/3.4.0/Apache_OpenOffice_incubating_3.4.0_Win_x86_langpack_es.exe"
,
+
"http://sourceforge.net/projects/openofficeorg.mirror/files/localized/es/3.4.0/Apache_OpenOffice_incubating_3.4.0_Linux_x86_langpack-rpm_es.tar.gz"
,
+
"http://sourceforge.net/projects/openofficeorg.mirror/files/localized/es/3.4.0/Apache_OpenOffice_incubating_3.4.0_Linux_x86_langpack-deb_es.tar.gz"
,
+
"http://sourceforge.net/projects/openofficeorg.mirror/files/localized/es/3.4.0/Apache_OpenOffice_incubating_3.4.0_Linux_x86-64_langpack-rpm_es.tar.gz"
,
+
"http://sourceforge.net/projects/openofficeorg.mirror/files/localized/es/3.4.0/Apache_OpenOffice_incubating_3.4.0_Linux_x86-64_langpack-deb_es.tar.gz"
,
+
"http://sourceforge.net/projects/openofficeorg.mirror/files/localized/es/3.4.0/Apache_OpenOffice_incubating_3.4.0_MacOS_x86_langpack_es.dmg"
,
+
"http://sourceforge.net/projects/openofficeorg.mirror/files/stable/3.4.0/Apache_OpenOffice_incubating-SDK_3.4_Win_x86_install_en-US.exe"
,
+
"http://sourceforge.net/projects/openofficeorg.mirror/files/stable/3.4.0/Apache_OpenOffice_incubating-SDK_3.4_Linux_x86_install-rpm_en-US.tar.gz"
,
+
"http://sourceforge.net/projects/openofficeorg.mirror/files/stable/3.4.0/Apache_OpenOffice_incubating-SDK_3.4_Linux_x86_install-deb_en-US.tar.gz"
,
+
"http://sourceforge.net/projects/openofficeorg.mirror/files/stable/3.4.0/Apache_OpenOffice_incubating-SDK_3.4_Linux_x86-64_install-rpm_en-US.tar.gz"
,
+
"http://sourceforge.net/projects/openofficeorg.mirror/files/stable/3.4.0/Apache_OpenOffice_incubating-SDK_3.4_Linux_x86-64_install-deb_en-US.tar.gz"
,
+
"http://sourceforge.net/projects/openofficeorg.mirror/files/stable/3.4.0/Apache_OpenOffice_incubating-SDK_3.4_MacOS_x86_install_en-US.dmg"
+]
+
+#helper function/generator
+def daterange(start_date, end_date):
+ for n in range((end_date - start_date).days):
+ yield start_date + datetime.timedelta(n)
+
+# print the CSV header
+print "date, language, kind, platform, packaging, count"
+
+for download in downloads :
+
+ # Remember that range functions do not include the end value, so set range
to n+1 if you want to include date n
+ for date in daterange(datetime.date(2012,5,7), datetime.date(2012,5,27)):
+
+ data = json.loads(getSourceForgeStats(download,date))
+
+ lang = getLanguage(download)
+ kind = getKind(download)
+ platform = getPlatform(download)
+ packaging = getPackaging(download)
+ count = data["total"]
+
+ print str(date) + "," + lang + "," + kind + "," + platform + "," +
packaging + "," + str(count)
+
+
+
Propchange: incubator/ooo/devtools/aoo-stats/aoo-stats.py
------------------------------------------------------------------------------
svn:eol-style = native