Skip to content

Commit

Permalink
init
Browse files Browse the repository at this point in the history
git-svn-id: https://pycsw.svn.sourceforge.net/svnroot/pycsw/trunk@1 f6d6ccb1-4906-4145-b9cb-3503ec0a5639
  • Loading branch information
tomkralidis committed Dec 2, 2010
0 parents commit 2025ff4
Show file tree
Hide file tree
Showing 20 changed files with 1,882 additions and 0 deletions.
16 changes: 16 additions & 0 deletions HISTORY.txt
@@ -0,0 +1,16 @@
pycsw Revision History
===========================

$Id$

This is a human-readable revision history which will attempt to document
required changes for users to migrate from one version of pycsw to the
next. Developers are strongly encouraged to document their changes and
their impacts on the users here. (Please add the most recent changes to
the top of the list.)

For a complete change history, please see the Subversion log comments.

Current Version (svn trunk):
----------------------------

20 changes: 20 additions & 0 deletions LICENSE.txt
@@ -0,0 +1,20 @@
Copyright (c) 2010 Tom Kralidis

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

6 changes: 6 additions & 0 deletions README.txt
@@ -0,0 +1,6 @@
pycsw README
============

$Id$

Please read the docs in doc/<lang> for more information.
1 change: 1 addition & 0 deletions VERSION.txt
@@ -0,0 +1 @@
0.0.1
49 changes: 49 additions & 0 deletions csw.py
@@ -0,0 +1,49 @@
#!/usr/bin/python
# -*- coding: ISO-8859-15 -*-
# =================================================================
#
# $Id$
#
# Authors: Tom Kralidis <tomkralidis@hotmail.com>
#
# Copyright (c) 2010 Tom Kralidis
#
# Permission is hereby granted, free of charge, to any person
# obtaining a copy of this software and associated documentation
# files (the "Software"), to deal in the Software without
# restriction, including without limitation the rights to use,
# copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the
# Software is furnished to do so, subject to the following
# conditions:
#
# The above copyright notice and this permission notice shall be
# included in all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
# OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
# HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
# OTHER DEALINGS IN THE SOFTWARE.
#
# =================================================================

from server import server

# turn on CGI debugging when in dev mode
import cgitb
cgitb.enable()

# get runtime configuration
csw = server.Csw('./default.cfg')

csw.dispatch()

# output response
print 'Content-type:%s\n' % csw.config['server']['mimetype']
print '<?xml version="1.0" encoding="%s" standalone="no"?>' % \
csw.config['server']['encoding']
print csw.response
65 changes: 65 additions & 0 deletions default.cfg
@@ -0,0 +1,65 @@
# =================================================================
#
# $Id$
#
# Authors: Tom Kralidis <tomkralidis@hotmail.com>
#
# Copyright (c) 2010 Tom Kralidis
#
# Permission is hereby granted, free of charge, to any person
# obtaining a copy of this software and associated documentation
# files (the "Software"), to deal in the Software without
# restriction, including without limitation the rights to use,
# copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the
# Software is furnished to do so, subject to the following
# conditions:
#
# The above copyright notice and this permission notice shall be
# included in all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
# OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
# HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
# OTHER DEALINGS IN THE SOFTWARE.
#
# =================================================================

[server]
baseurl=http://example.org/pycsw/csw.py
mimetype=text/xml; charset=iso-8859-1
encoding=iso-8859-1
language=en-CA
data=data/foo.db
maxrecords=10

[identification]
title=pycsw Geospatial Catalogue
abstract=pycsw is an OGC CSW server implementation
keywords=catalogue,discovery
fees=None
accessconstraints=None

[provider]
name=Environment Canada
url=http://sourceforge.net/apps/trac/pycsw

[contact]
name=Kralidis, Tom
position=Senior Systems Scientist
address=TBA
city=Toronto
stateorprovince=Ontario
postalcode=M9C 3Z9
country=Canada
phone=+01-416-xxx-xxxx
fax=+01-416-xxx-xxxx
email=tomkralidis@hotmail.com
url=http://www.kralidis.ca/
hours=0800h - 1600h EST
contactinstructions=During hours of service. Off on weekends.
role=pointOfContact
181 changes: 181 additions & 0 deletions docs/Makefile
@@ -0,0 +1,181 @@
# Makefile for Sphinx documentation
#
# $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $$lang $(BUILDDIR)/$$lang;
#

# You can set these variables from the command line.
BUILDDIR = build
SPHINXOPTS =
SPHINXBUILD = sphinx-build
PAPER =
TRANSLATIONS =
LANGUAGES = en $(TRANSLATIONS)

# Internal variables.
PAPEROPT_a4 = -D latex_paper_size=a4
PAPEROPT_letter = -D latex_paper_size=letter
ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees/$$lang $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) -c . -A language=$$lang -D language=$$lang -A target=$(TARGET) -A languages='$(LANGUAGES)'

.PHONY: help clean html web pickle htmlhelp latex changes linkcheck

help:
@echo "Please use \`make <target>' where <target> is one of"
@echo " html to make standalone HTML files"
@echo " init to preprocess translation directories"
@echo " pickle to make pickle files"
@echo " json to make JSON files"
@echo " htmlhelp to make HTML files and a HTML help project"
@echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
@echo " all-pdf to make PDF file"
@echo " all-ps to make PS file"
@echo " changes to make an overview over all changed/added/deprecated items"
@echo " linkcheck to check all external links for integrity"

clean:
-rm -rf $(BUILDDIR)/*

init:
@for lang in $(TRANSLATIONS) ;\
do \
# We change the Internal Field Separator (IFS) because to handle filename with special char like space. \
OLDIFS="$$IFS"; \
IFS=$$'\n'; \
for file in `cd en; find . -type f -a -regex '.*\.txt$$' -a -not -regex '.*\.svn.*' -printf "%p\n" ; cd ..;`; \
do \
if [ ! -f $$lang/$$file ]; then \
mkdir -p `dirname "$$lang/$$file"`; \
(echo ".. meta::"; echo " :ROBOTS: NOINDEX") | cat - "en/$$file" > "$$lang/$$file"; \
fi \
done; \
IFS=$$OLDIFS; \
# Copy all no .txt files \
yes n | cp -ipR en/* $$lang &> /dev/null; \
done
@echo "Init finished. Other targets can now be built.";\

html:
@for lang in $(LANGUAGES);\
do \
mkdir -p $(BUILDDIR)/html/$$lang $(BUILDDIR)/doctrees/$$lang; \
echo "$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $$lang $(BUILDDIR)/html/$$lang";\
$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $$lang $(BUILDDIR)/html/$$lang;\
done
@echo
@echo "Build finished. The HTML pages are in $(BUILDDIR)/html/<language>.";\

singlehtml:
@for lang in $(LANGUAGES);\
do \
mkdir -p $(BUILDDIR)/singlehtml/$$lang $(BUILDDIR)/doctrees/$$lang; \
$(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $$lang $(BUILDDIR)/singlehtml/$$lang;\
done
@echo
@echo "Build finished. The HTML pages are in $(BUILDDIR)/singlehtml/<language>.";\

pickle:
@for lang in $(LANGUAGES);\
do \
mkdir -p $(BUILDDIR)/pickle/$$lang $(BUILDDIR)/doctrees/$$lang; \
$(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $$lang $(BUILDDIR)/pickle/$$lang;\
done
@echo
@echo "Build finished; now you can process the pickle files."

web: pickle

json:
@for lang in $(LANGUAGES);\
do \
mkdir -p $(BUILDDIR)/json/$$lang $(BUILDDIR)/doctrees/$$lang; \
$(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $$lang $(BUILDDIR)/json/$$lang;\
done
@echo
@echo "Build finished; now you can process the JSON files."

htmlhelp:
@for lang in $(LANGUAGES);\
do \
mkdir -p $(BUILDDIR)/htmlhelp/$$lang $(BUILDDIR)/doctrees/$$lang; \
$(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $$lang $(BUILDDIR)/htmlhelp/$$lang;\
done
@echo
@echo "Build finished; now you can run HTML Help Workshop with the" \
".hhp project file in $(BUILDDIR)/htmlhelp/<language>."

latex:
@for lang in $(LANGUAGES);\
do \
mkdir -p $(BUILDDIR)/latex/$$lang $(BUILDDIR)/doctrees/$$lang; \
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $$lang $(BUILDDIR)/latex/$$lang;\
done
@echo
@echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex/<language>."\
@echo "Run \`make all-pdf' or \`make all-ps'"

pdf:
@for lang in $(LANGUAGES);\
do \
mkdir -p $(BUILDDIR)/pdf/$$lang $(BUILDDIR)/doctrees/$$lang; \
$(SPHINXBUILD) -b pdf $(ALLSPHINXOPTS) $$lang $(BUILDDIR)/pdf/$$lang;\
done
@echo
@echo "Build finished; the PDF files are in $(BUILDDIR)/pdf/<language>."\
@echo "Run \`make pdf' "

epub:
@for lang in en;\
do \
mkdir -p $(BUILDDIR)/epub/$$lang $(BUILDDIR)/doctrees/$$lang; \
$(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $$lang $(BUILDDIR)/epub/$$lang;\
done
@echo
@echo "Build finished; the epub files are in $(BUILDDIR)/epub/<language>."\
@echo "Run \`make epub' "

all-pdf:
@for lang in $(LANGUAGES);\
do \
/usr/bin/make -C $(BUILDDIR)/latex/$$lang all-pdf ; \
if [ -d $(BUILDDIR)/html/$$lang ]; then \
mv -f $(BUILDDIR)/latex/$$lang/pycsw.pdf $(BUILDDIR)/html/$$lang ; \
fi \
done

all-ps:
@for lang in $(LANGUAGES);\
do \
/usr/bin/make -C $(BUILDDIR)/latex/$$lang all-ps ; \
if [ -d $(BUILDDIR)/html/$$lang ]; then \
mv -f $(BUILDDIR)/latex/$$lang/pycsw.pdf $(BUILDDIR)/html/$$lang ; \
fi \
done

changes:
@for lang in $(LANGUAGES);\
do \
mkdir -p $(BUILDDIR)/changes/$$lang $(BUILDDIR)/doctrees/$$lang; \
$(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $$lang $(BUILDDIR)/changes/$$lang;\
done
@echo
@echo "The overview file is in $(BUILDDIR)/changes/<language>."

linkcheck:
@for lang in $(LANGUAGES);\
do \
mkdir -p $(BUILDDIR)/linkcheck/$$lang $(BUILDDIR)/doctrees/$$lang; \
$(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $$lang $(BUILDDIR)/linkcheck/$$lang;\
done
@echo
@echo "Link check complete; look for any errors in the above output " \
"or in $(BUILDDIR)/linkcheck/<language>/output.txt."

labels:
@for lang in $(LANGUAGES);\
do \
mkdir -p $(BUILDDIR)/labels/$$lang $(BUILDDIR)/doctrees/$$lang; \
$(SPHINXBUILD) -b labels $(ALLSPHINXOPTS) $$lang $(BUILDDIR)/labels/$$lang;\
cp $(BUILDDIR)/labels/$$lang/labels.txt $$lang/include/labels.inc;\
done
@echo
@echo "Label generation complete; look for any errors in the above output " \
"or in $(BUILDDIR)/labels/<language>/labels.txt."

0 comments on commit 2025ff4

Please sign in to comment.