Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setup script for new events #173

Merged
merged 3 commits into from
May 2, 2016
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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"
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since hugo insists on a date, I picked one that's unlikely to appear naturally, so I know what to search/replace on.

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**
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is just a cosmetic fix for the bolding.


{{< 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 >}}!
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Making it so this gets filled in automagically.


<!-- <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 >}}
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Chicago is a funny default. ;) Search/replacing this, defaulting to @devopsdays.

</td>
</tr>
</table>
41 changes: 41 additions & 0 deletions make_new_event.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
#!/bin/bash

set -e
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The -e is for excellent and not at all janky. (Pay no attention to the sed behind the curtain.)


# 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/yyyycity/$year$cityabbr/" 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
51 changes: 31 additions & 20 deletions yyyy-city.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,37 +2,48 @@ name: yyyycity # The name of the event. Four digit year with the city name in lo
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.
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably need an "upcoming" too.


# 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.
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Really need TBD as an option for these ("upcoming" with no map placement would help here).

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
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Scaffolding this but starting with the MVsite.

# - 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
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sponsors with no yaml don't show on the site.

level: gold
- id: arresteddevops
level: community
Expand Down