Skip to content

Commit

Permalink
Merge pull request #173 from devopsdays/bridget-new-event-setup
Browse files Browse the repository at this point in the history
Setup script for new events

Former-commit-id: 478a49e
  • Loading branch information
mattstratton committed May 2, 2016
2 parents 2828c22 + cd39f8b commit ad7d634
Show file tree
Hide file tree
Showing 11 changed files with 84 additions and 47 deletions.
2 changes: 1 addition & 1 deletion content/events/sample-event/conduct.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
+++
date = "2016-03-06T21:17:08-06:00"
date = "2000-01-01T01:01:01-06:00"
title = "conduct"
type = "event"
draft = true
Expand Down
6 changes: 3 additions & 3 deletions content/events/sample-event/contact.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
+++
date = "2016-03-06T21:16:08-06:00"
date = "2000-01-01T01:01:01-06:00"
title = "contact"
type = "event"
draft = true
Expand All @@ -9,10 +9,10 @@ draft = true

If you'd like to contact us by email: {{< email_organizers >}}

** Our local team**
**Our local team**

{{< list_organizers >}}

** The core devopsdays organizer group**
**The core devopsdays organizer group**

{{< list_core >}}
2 changes: 1 addition & 1 deletion content/events/sample-event/location.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
+++
date = "2016-03-06T21:17:00-06:00"
date = "2000-01-01T01:01:01-06:00"
title = "location"
type = "event"
draft = true
Expand Down
2 changes: 1 addition & 1 deletion content/events/sample-event/program.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
+++
date = "2016-03-06T21:28:07-06:00"
date = "2000-01-01T01:01:01-06:00"
title = "program"
type = "event"
draft = true
Expand Down
14 changes: 0 additions & 14 deletions content/events/sample-event/proposals.md

This file was deleted.

2 changes: 1 addition & 1 deletion content/events/sample-event/propose.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
+++
date = "2016-03-06T22:47:24-06:00"
date = "2000-01-01T01:01:01-06:00"
title = "propose"
type = "event"
draft = true
Expand Down
2 changes: 1 addition & 1 deletion content/events/sample-event/registration.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
+++
date = "2016-03-06T21:28:23-06:00"
date = "2000-01-01T01:01:01-06:00"
title = "registration"
type = "event"
draft = true
Expand Down
2 changes: 1 addition & 1 deletion content/events/sample-event/sponsor.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
+++
date = "2016-03-06T21:17:14-06:00"
date = "2000-01-01T01:01:01-06:00"
title = "sponsor"
type = "event"
draft = true
Expand Down
6 changes: 3 additions & 3 deletions content/events/sample-event/welcome.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
+++
date = "2016-03-06T21:15:25-06:00"
date = "2000-01-01T01:01:01-06:00"
title = "welcome"
type = "event"
aliases = ["/events/YYYY-city"]
Expand All @@ -9,7 +9,7 @@ draft = true

## {{< event_start >}} - {{< event_end >}}

DevOps Days is coming to XXXXXX
DevOps Days is coming to {{< event_location >}}!

<!-- <div style="text-align:center;">
{{< event_logo >}}
Expand Down Expand Up @@ -47,7 +47,7 @@ DevOps Days is coming to XXXXXX
<tr>
<td></td>
<td>
{{< event_twitter devopsdayschi >}} <!-- add your twitter name here without the @ sign -->
{{< event_twitter devopsdaysyourtown >}}
</td>
</tr>
</table>
40 changes: 40 additions & 0 deletions make_new_event.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
#!/bin/bash

set -e

# We assume the current year (and also assume bash 3, because macs)
read -p "Enter your event year (default: $(date +"%Y")): " year
[ -z "${year}" ] && year='2016'

# We don't use accent marks or spaces or other special characters in city names
read -p "Enter your city name: " city
cityabbr=$(echo $city | tr -dc '[:alpha:]' | tr 'āáǎàēéěèīíǐìōóǒòöūúǔùǖǘǚǜĀÁǍÀĒÉĚÈĪÍǏÌŌÓǑÒŪÚǓÙǕǗǙǛ' 'aaaaeeeeiiiiooooouuuuuuuuAAAAEEEEIIIIOOOOUUUUUUUU' | tr '[:upper:]' '[:lower:]')

read -p "Enter your devopsdays event twitter handle (defaults to devopsdays): " twitter
[ -z "${twitter}" ] && twitter='devopsdays'
# remove @ if they added it
twitter=$(echo $twitter | tr -dc '[:alnum:]')

# We use the term event_slug in the hugo files too
event_slug=$year-$cityabbr


cp yyyy-city.yml data/events/$event_slug.yml
sed -i '' "s/YYYY/$year/" data/events/$event_slug.yml
sed -i '' "s/City/$city/" data/events/$event_slug.yml
sed -i '' "s/yourlocation/$city/" data/events/$event_slug.yml
sed -i '' "s/yyyy-city/$event_slug/" data/events/$event_slug.yml
sed -i '' "s/city-year/$cityabbr-$year/" data/events/$event_slug.yml

cp -r content/events/sample-event content/events/$event_slug

# The draft = true in the frontmatter is what prevents the sample event from showing on the site
# don't need the double quotes because there's no variable in the substitution
sed -i '' '/draft = true/d' content/events/$event_slug/*

# setting the creation date at the time the event is instantiated
datestamp=$(date +%Y-%m-%dT:%H:%M:%S:%z)
sed -i '' "s/2000-01-01T01:01:01-06:00/$datestamp/" content/events/$event_slug/*

sed -i '' "s/YYYY-city/$event_slug/" content/events/$event_slug/welcome.md
sed -i '' "s/devopsdaysyourtown/$twitter/" content/events/$event_slug/welcome.md
53 changes: 32 additions & 21 deletions yyyy-city.yml
Original file line number Diff line number Diff line change
@@ -1,38 +1,49 @@
name: yyyycity # The name of the event. Four digit year with the city name in lower-case, with no spaces.
name: "yyyy-city" # The name of the event. Four digit year with the city name in lower-case, with no spaces.
year: "YYYY" # The year of the event. Make sure it is in quotes.
city: "City" # The city name of the event. Capitalize it.
friendly: "yyyy-city" # Four digit year and the city name in lower-case. Don't forget the dash!
status: "current" # Options are "past" or "current".
startdate: 2016-08-30 # The start date of your event, in YYYY-MM-DD format. Leave blank if you don't have a date yet.
enddate: 2016-08-31 # The end date of your event, in YYYY-MM-DD format. Leave blank if you don't have a date yet.
cfp_date_start: 2016-04-01
cfp_date_end: 2016-06-01
cfp_date_announce: 2016-07-01
coordinates: "41.882219, -87.640530" # The corrodinates of your venue. Get Latitude and Longitude of a Point: http://itouchmap.com/latlong.html
location: "location" # The name of your location
"sponsor"] # List of pages you want to show up in the navigation of your page. Remove any that aren't relevent yet.
nav_elements: # List of pages you want to show up in the navigation of your page. Remove any that aren't relevent yet.
status: "current" # Options are "past" or "current". Use "current" for upcoming.

# All dates are in unquoted YYYY-MM-DD, like this: variable: 2016-01-05
startdate: 2016-01-01 # The start date of your event. Leave blank if you don't have a venue reserved yet.
enddate: 2016-01-01 # The end date of your event. Leave blank if you don't have a venue reserved yet.
# Leave CFP dates blank if you don't know yet, or set all three at once.
cfp_date_start: 2016-01-01 # start accepting talk proposals.
cfp_date_end: 2016-01-01 # close your call for proposals.
cfp_date_announce: 2016-01-01 # inform proposers of status

# Location
#
coordinates: "41.882219, -87.640530" # The coordinates of your city. Get Latitude and Longitude of a Point: http://itouchmap.com/latlong.html
location: "yourlocation" # Defaults to city, but you can make it the venue name.
#

nav_elements: # List of pages you want to show up in the navigation of your page.
- name: welcome
# - name: program
# - name: propose
# url: http://mycfp.com # The url setting is optional, and only if you want the navigation to link off-site
# - name: location
# - name: registration
- name: sponsor
- name: contact
- name: location
- name: program
- name: propose
url: http://mycfp.com # The url setting is optional, and only if you want the navigation to link off-site
- name: conduct
- name: sponsor

# These are the same people you have on the mailing list and Slack channel.
team: ["John Doe", "Jane Smith", "Sally Fields"]
team_members:
team_members: # Name is the only required field for team members.
- name: "John Doe"
- name: "Jane Smith"
twitter: "devopsdays"
- name: "Sally Fields"
employer: "Acme Anvil Co."
organizer_email: "[email protected]" # Put your organizer email address here
proposal_email: "[email protected]" # Put your proposal email address here
sponsors: # List all of your sponsors here along with what level of sponsorship they have.
- id: chef
level: gold
- id: datadog

# List all of your sponsors here along with what level of sponsorship they have.
# Check data/sponsors/ to use sponsors already added by others.
sponsors:
- id: samplesponsorname
level: gold
- id: arresteddevops
level: community
Expand Down

0 comments on commit ad7d634

Please sign in to comment.