diff --git a/groups.json b/groups.json index 23be1ce..127e47f 100644 --- a/groups.json +++ b/groups.json @@ -464,7 +464,7 @@ "id": "a1341112-f9ea-4727-9171-a410e132eafe", "location": { "country": "AU", - "continent": "OC", + "continent": "AS", "lat": "0", "lng": "0" }, @@ -481,7 +481,7 @@ "id": "d3e72761-f39f-41d3-8ac2-df0f717d905e", "location": { "country": "NZ", - "continent": "OC", + "continent": "AS", "lat": "0", "lng": "0" }, diff --git a/makewiki.py b/makewiki.py new file mode 100644 index 0000000..1ce0590 --- /dev/null +++ b/makewiki.py @@ -0,0 +1,99 @@ +#!/usr/bin/env python +# +# 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. + +""" Make the UserGroups Wiki page. + +Takes a JSON file made for the User Group Portal and generates a mediawiki +format page. +""" + +import json +import logging + +groups_json = json.load(open('groups.json')) +groups = {} +logger = logging.getLogger('makewiki') +continent_names = {'AF': 'Africa', 'AS': 'Asia Pacific', 'EU': 'Europe', + 'ME': 'Middle East', 'NA': 'North America', + 'SA': 'South America'} + +def nice_label(attribute): + nice_labels = {'facebook': 'Facebook Group', 'meetup' : 'Meetup details here', + 'linkedin': 'LinkedIn Group', 'irc': 'IRC', + 'twitter': 'Twitter', 'website': 'Website', + 'google-groups': 'Google Group', 'blog': 'Blog', + 'coordinators': 'Coordinators', + 'google-plus': 'Google Plus Community', + 'mailing-list': 'Mailing List'} + + if attribute in nice_labels: + return nice_labels[attribute] + else: + return attribute + +def make_header(continent_groups): + print '__NOTOC__' + print 'Welcome to the list of the OpenStack User Groups!' + print + print "Can't find one nearby? Want to start one? The\ +[[Teams#Community_team|OpenStack International Community team]] is your main\ +contact point. Join\ +[http://lists.openstack.org/cgi-bin/mailman/listinfo/community the mailing\ +list] and read [[OpenStackUserGroups/HowTo|the HowTo page]] if you are hosting\ +or want to start a user group with meetups, hackathons and other social events\ +talking about OpenStack and free/libre open source software for the cloud. You\ +can also edit this page to add your group, but remember - we're an [[Open]]\ +community." + print + print '