progress count
This commit is contained in:
parent
7f1a8e0a6c
commit
361c75c6f7
6 changed files with 53 additions and 31 deletions
|
|
@ -33,7 +33,7 @@ def makeKML():
|
|||
point.appendChild( coordinates )
|
||||
placemark.appendChild( point )
|
||||
root.childNodes[0].childNodes[0].childNodes[0].appendChild( placemark )
|
||||
with open('output/projects/' + category + '.kml', 'w') as xml_file:
|
||||
with open(collection[category]["path"] + '.kml', 'w') as xml_file:
|
||||
root.writexml(xml_file, indent="", addindent=" ", newl='\n')
|
||||
|
||||
def makeGPX():
|
||||
|
|
@ -50,10 +50,12 @@ def makeGPX():
|
|||
name.appendChild( title )
|
||||
wpt.appendChild( name )
|
||||
root.childNodes[0].appendChild( wpt )
|
||||
with open('output/projects/' + category + '.gpx', 'w') as xml_file:
|
||||
with open( collection[category]["path"] + '.gpx', 'w') as xml_file:
|
||||
root.writexml(xml_file, indent="", addindent=" ", newl='\n')
|
||||
|
||||
def geodata(generator):
|
||||
output = generator.settings.get('OUTPUT_PATH')
|
||||
filepath = generator.settings.get('CATEGORY_URL')
|
||||
for category, articles in generator.categories:
|
||||
locations = []
|
||||
for article in articles:
|
||||
|
|
@ -65,6 +67,7 @@ def geodata(generator):
|
|||
collection.update({
|
||||
category.slug : {
|
||||
"name" : category.name,
|
||||
"path" : output + '/' + filepath.replace('{slug}', category.slug),
|
||||
"points" : locations
|
||||
}})
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue