Commits

Leonardo Santagada committed 326b016

pkgdata.csv created and properly imported into app engine

  • Participants
  • Parent commits f86ac5c

Comments (0)

Files changed (5)

 runtime: python
 api_version: 1
 
+builtins:
+- remote_api: on
+- datastore_admin: on
+
 handlers:
 - url: .*
   script: main.py

File bulkloader.yaml

+# Autogenerated bulkloader.yaml file.
+# You must edit this file before using it. TODO: Remove this line when done.
+# At a minimum address the items marked with TODO:
+#  * Fill in connector and connector_options
+#  * Review the property_map.
+#    - Ensure the 'external_name' matches the name of your CSV column,
+#      XML tag, etc.
+#    - Check that __key__ property is what you want. Its value will become
+#      the key name on import, and on export the value will be the Key
+#      object.  If you would like automatic key generation on import and
+#      omitting the key on export, you can remove the entire __key__
+#      property from the property map.
+
+# If you have module(s) with your model classes, add them here. Also
+# change the kind properties to model_class.
+python_preamble:
+- import: base64
+- import: re
+- import: google.appengine.ext.bulkload.transform
+- import: google.appengine.ext.bulkload.bulkloader_wizard
+- import: google.appengine.ext.db
+- import: google.appengine.api.datastore
+- import: google.appengine.api.users
+
+transformers:
+- kind: Port
+  connector: csv
+  property_map:
+    - property: name
+      external_name: name
+      import_transform: str
+    - property: title
+      external_name: title
+      import_transform: str
+    - property: version
+      external_name: version
+      import_transform: str
+    - property: revision
+      external_name: revision
+      import_transform: str
+
 # manually, move them above the marker line.  The index.yaml file is
 # automatically uploaded to the admin console when you next deploy
 # your application using appcfg.py.
-
-#!/usr/bin/env python
-#
-# Copyright 2007 Google Inc.
-#
-# Licensed 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.
-#
+#!/usr/bin/env python2.5
+
 from google.appengine.ext import webapp
 from google.appengine.ext.webapp import util
+from google.appengine.ext import db
+
+
+class Port(db.Model):
+    name = db.StringProperty()
+    title = db.StringProperty()
+    version = db.StringProperty()
+    revision = db.StringProperty()
 
 
 class MainHandler(webapp.RequestHandler):
     def get(self):
-        self.response.out.write('Hello world!')
+        self.response.out.write('<h1>Rudix</h1>')
 
+class PortListHandler(webapp.RequestHandler):
+    def get(self):
+        ports = db.GqlQuery('SELECT * FROM Port ORDER BY name')
+        for port in ports:
+            self.response.out.write('%s '%port.name)
 
 def main():
-    application = webapp.WSGIApplication([('/', MainHandler)],
+    application = webapp.WSGIApplication([('/', MainHandler),
+                                          ('/packages',PortListHandler)],
                                          debug=True)
     util.run_wsgi_app(application)
 
+name,title,version,revision
+"apr","APR 1.4.2","1.4.2","1"
+"apr-util","APR-util 1.3.10","1.3.10","0"
+"asciidoc","AsciiDoc 8.6.3","8.6.3","0"
+"astyle","Artistic Style 1.24","1.24","1"
+"autoconf","GNU Autoconf 2.68","2.68","0"
+"automake","GNU Automake 1.11.1","1.11.1","1"
+"bash","GNU Bash 4.1","4.1","1"
+"boost","Boost C++ Libraries","1.44.0","0"
+"bvi","Bvi 1.3.2","1.3.2","7"
+"bzr","Bazaar 2.2.1","2.2.1","0"
+"cabextract","cabextract 1.3","1.3","1"
+"cadaver","cadaver 0.23.3","0.23.3","1"
+"cairo","cairo 1.10.0","1.10.0","0"
+"ccache","ccache 3.1.1","3.1.1","0"
+"cflow","GNU cflow 1.3","1.3","1"
+"check","Check 0.9.8","0.9.8","1"
+"cheetah","Cheetah 2.4.3","2.4.3","0"
+"clisp","CLISP 2.48","2.48","0.i386"
+"coreutils","GNU Core Utilities 8.7","8.7","0"
+"cscope","Cscope 15.7a","15.7a","1"
+"ctags","Exuberant Ctags 5.8","5.8","1"
+"db","Berkeley DB 5.1.19","5.1.19","0"
+"dialog","dialog 1.1-20100428","1.1-20100428","0"
+"dictd","dictd 1.11.2","1.11.2","0"
+"django","Django 1.2.3","1.2.3","0"
+"docutils","Docutils 0.7","0.7","0"
+"dtach","dtach 0.8","0.8","5"
+"elinks","ELinks ","0.11.7","0"
+"epic5","epic5 1.0","1.0","1"
+"erlang","Erlang/OTP R14B","R14B","1"
+"expat","Expat 2.0.1","2.0.1","6"
+"feedparser","Universal Feed Parser 4.1","4.1","5"
+"ffcall","ffcall 1.10","1.10","2"
+"ffmpeg","ffmpeg snapshot","snapshot","1.i386"
+"figlet","figlet 2.2.2","2.2.2","1"
+"findutils","GNU Find Utilities 4.4.2","4.4.2","1"
+"frotz","frotz 2.43","2.43","5"
+"gawk","GNU AWK 3.1.8","3.1.8","1"
+"getopt","getopt 1.1.4","1.1.4","0"
+"gettext","GNU gettext 0.18.1.1","0.18.1.1","1"
+"git","git 1.7.3.2","1.7.3.2","0"
+"glib","GLib 2.23.5","2.23.5","0"
+"gloox","Gloox 1.0","1.0","0"
+"gmp","GNU MP 4.3.2","4.3.2","0"
+"gmpy","gmpy 1.11rc1","1.11rc1","0"
+"gnupg","GnuPG 1.4.10","1.4.10","0.i386"
+"gnuplot","gnuplot 4.2.6","4.2.6","1"
+"gnutls","GnuTLS 2.8.1","2.8.1","0"
+"go","Go release","release","0"
+"google-perftools","google-perftools 1.1","1.1",""
+"grace","grace 5.1.22","5.1.22","0"
+"grep","GNU Grep 2.7","2.7","0"
+"guile","guile 1.8.7","1.8.7","2"
+"hexedit","hexedit 1.2.12","1.2.12","4"
+"hoc","hoc 1.1","1.1","5"
+"htmldoc","htmldoc 1.8.27","1.8.27","11"
+"httpd","Apache HTTP Server 2.2.14","2.2.14","0"
+"httptunnel","GNU httptunnel 3.3","3.3","1"
+"iftop","iftop 0.17","0.17","0"
+"imap","imap 2007e","2007e","2"
+"inadyn","inadyn 1.96.2","1.96.2","9"
+"ipython","iPython 0.10","0.10","0"
+"json-c","JSON-C 0.9","0.9","1"
+"lame","LAME 3.98.2","3.98.2","3"
+"lftp","LFTP 4.0.10","4.0.10","0"
+"libao","libao 0.8.8","0.8.8","6"
+"libevent","libevent 1.4.14b","1.4.14b","0"
+"libgd","GD library 2.0.35","2.0.35","0"
+"libid3tag","ID3v2 0.15.1b","0.15.1b","15"
+"libmaa","libmaa 1.2.0","1.2.0","0"
+"libmemcached","libmemcached 0.43","0.43","0"
+"libpng","libpng 1.2.40","1.2.40","0"
+"librsync","librsync 0.9.7","0.9.7","8"
+"libsigc++","libsigc++ 2.2.4.2","2.2.4.2","0"
+"libsigsegv","GNU libsigsegv 2.9","2.9","0"
+"libtorrent","libtorrent 0.12.6","0.12.6","0"
+"libxml2-python","libxml2-python 2.6.21","2.6.21","0"
+"libzip","libzip 0.9","0.9","1"
+"lighttpd","lighttpd 1.4.24","1.4.24","0"
+"lua","Lua 5.1.4","5.1.4","4"
+"lynx","Lynx 2.8.7","2.8.7","1"
+"lzma","lzma 4.32.7","4.32.7","2"
+"lzo","LZO 2.03","2.03","0"
+"m4","GNU M4 1.4.15","1.4.15","1"
+"libmad","MAD 0.15.1b","0.15.1b","14"
+"madplay","MAD Player 0.15.2b","0.15.2b","14.i386"
+"make","GNU Make 3.82","3.82","1"
+"mc","Midnight Commander 4.7.1","4.7.1","1"
+"memcached","memcached 1.4.5","1.4.5","0"
+"memcachedb","memcachedb 1.2.0","1.2.0","0"
+"mercurial","Mercurial 1.7.1","1.7.1","0"
+"mpg123","mpg123 1.9.2","1.9.2","0"
+"mpop","mpop 1.0.19","1.0.19","0"
+"msmtp","msmtp 1.4.17","1.4.17","2"
+"mtr","MTR 0.80","0.80","0"
+"mutt","mutt 1.5.20","1.5.20","0"
+"ncftp","NcFTP Client 3.2.4","3.2.4","0"
+"neon","neon 0.29.3","0.29.3","0"
+"nginx","nginx 0.7.64","0.7.64","0"
+"nhc98","nhc98 1.22","1.22","0.i386"
+"nmap","Nmap 5.20","5.20","0"
+"ocaml","ocaml 3.12.0","3.12.0","0.i386"
+"offlineimap","Offline IMAP 6.2.0","6.2.0","0"
+"p7zip","P7ZIP 9.04","9.04","0.i386"
+"pango","Pango 1.27.1","1.27.1","0"
+"pcre","PCRE 8.10","8.10","0"
+"pdksh","PD-ksh 5.2.14","5.2.14","14"
+"Imaging","Imaging 1.1.6","1.1.6","0"
+"pixman","pixman 0.21.2","0.21.2","0"
+"pkg-config","pkg-config 0.25","0.25","1"
+"popt","Popt 1.15","1.15","1"
+"protobuf","protobuf 2.3.0","2.3.0","0"
+"psyco","Psyco 1.6","1.6","6"
+"pychecker","PyChecker 0.8.18","0.8.18","2"
+"pycommoncrypto","PyCommonCrypto 0.9.1","0.9.1","0"
+"pycrypto","PyCrypto 2.1.0","2.1.0","0"
+"pycurl","PycURL 7.19.0","7.19.0","0"
+"pygame","pygame 1.9.1","1.9.1","0"
+"pylibmc","pylibmc 1.1.1","1.1.1","0"
+"python-twitter","Python Twitter 0.6","0.6","0"
+"qemu","QEMU 0.13.0","0.13.0","0.i386"
+"rdiff-backup","rdiff-backup 1.2.8","1.2.8","1"
+"readline","GNU Readline 6.0","6.0","2"
+"rrdtool","rrdtool 1.4.1","1.4.1","0"
+"rsync","Rsync 3.0.7","3.0.7","0"
+"rtorrent","rTorrent 0.8.6","0.8.6","0"
+"rudix","Rudix Package Manager 3.0","3.0","0"
+"rzip","rzip 2.1","2.1","13"
+"scons","SCons 2.0.1","2.0.1","1"
+"SDL","SDL 1.2.14","1.2.14","0.i386"
+"sed","GNU Sed 4.2.1","4.2.1","1"
+"sexpr","sexpr 1.2","1.2","1"
+"shuffle","Shuffle 1.0.1","1.0.1","1"
+"simh","SIMH 3.8.1","3.8.1","0"
+"simplejson","simplejson 2.0.9","2.0.9","0"
+"slib","slib 3b1","3b1","0"
+"sox","SoX 14.3.0","14.3.0","0"
+"sqlite","SQLite 3.7.3","3.7.3","0"
+"ssldump","ssldump 0.9b3","0.9b3","1"
+"stunnel","stunnel 4.33","4.33","0"
+"subversion","Subversion 1.6.12","1.6.12","0"
+"tload","tload 3.2.7","3.2.7","5"
+"apache-tomcat","Apache Tomcat 6.0.20","6.0.20","1"
+"tornado","Tornado 1.1","1.1","0"
+"tree","tree 1.5.3","1.5.3","0"
+"twisted","Twisted Python 8.2.0","8.2.0","0"
+"txt2tags","txt2tags 2.5","2.5","3"
+"unrar","unRAR 3.7.8","3.7.8","5"
+"varnish","Varnish 2.1.4","2.1.4","0"
+"vim","vim 7.3","7.3","0"
+"vx32","Vx32 0.12","0.12","2"
+"watch","watch 3.2.7","3.2.7","12"
+"web.py","web.py 0.34","0.34","0"
+"wget","GNU Wget 1.12","1.12","1"
+"wine","Wine 1.1.36","1.1.36","0"
+"xemacs","xemacs 21.4.22","21.4.22","1.i386"
+"xmp","XMP 3.2.0","3.2.0","1"
+"yasm","Yasm 1.1.0","1.1.0","1"
+"zsync","zsync 0.6.2","0.6.2","1"