This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env python | |
from geoserver.catalog import Catalog | |
cat = Catalog('http://host/geoserver/rest', 'user', 'password') | |
def internal_name(s): | |
return s.startswith("__") and s.endswith("__") | |
def check(x): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Utilities for reading Microsoft Excel files. | |
""" | |
#requires | |
#pip install xlrd | |
import xlrd | |
import datetime | |
class ExcelDictReader(object): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from geoserver.catalog import Catalog | |
from geonode import settings | |
user, password = settings.GEOSERVER_CREDENTIALS | |
url = "http://localhost:8001/geoserver-geonode-dev/rest" | |
cat = Catalog(url, user, password) | |
print "Connected to GeoServer, about to get resources" | |
resources = cat.get_resources() | |
print "Got %d resources" % len(resources) | |
fixed =0 | |
for resource in resources: |