Skip to content

Commit

Permalink
Merge pull request #43 from socallinuxexpo/docops/use-config-file-for…
Browse files Browse the repository at this point in the history
…-global-variables/#41

use config.yaml for setting global variables
  • Loading branch information
capsulecorplab committed Mar 7, 2024
2 parents c370e5c + fa46cdb commit 4f0edc1
Show file tree
Hide file tree
Showing 11 changed files with 55 additions and 31 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -94,4 +94,4 @@ build-iPhoneSimulator/
# End of https://www.gitignore.io/api/ruby,macos

# asciidoctor build cache
public/
dist/
4 changes: 1 addition & 3 deletions README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,7 @@ as well as offering a wiki and issue tracker for SCaLE A/V logistics and plannin
If you are interested in volunteering, please refer to the {scale-av-wiki}.

SCaLE A/V is the team that handles audio & visual (A/V) for the
{scale-homepage}, a volunteer-organized open-source conference. We are
currently working on SCaLE 18x, which will be held on March 5-8, 2020, at the
Pasadena Convention Center.
{scale-homepage}, a volunteer-organized open-source conference.

== Developer Notes ==

Expand Down
45 changes: 33 additions & 12 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,36 @@ if [ ! -r ./dist ]; then
mkdir dist
fi

#### copy contents to dist/ ####
cp index.adoc dist/
cp -r user_manual/ dist/
cp -r user_manual/assets dist/

#### generate config.adoc from config.yaml using jinja2 ####
clitool="jinja2"
cmdargs="-o dist/config.adoc --format yaml templates/config.adoc.jinja2 -D commit_hash=$(git rev-parse --short HEAD) -D commit_date=$(git show -s --format=%cI HEAD) config.yaml"
workdir=$project_root
cmd="$clitool $cmdargs"
podmancmd="podman run --rm -v $workdir:/work -w /work docker.io/roquie/docker-jinja2-cli $cmdargs"
condition="$clitool --version | grep 'v0.8.2'"

if ! eval $condition; then
echo "generating config.adoc from jinja2 template via podman..."
cd $project_root
eval $(echo $podmancmd)
else
echo "generating config.adoc from jinja2 template..."
cd $workdir
eval $cmd
cd $project_root
fi

#### generate landing page as html ####
clitool="asciidoctor"
cmdargs="index.adoc -o dist/index.html"
cmdargs="index.adoc"
cmd="$clitool $cmdargs"
workdir=$project_root
podmancmd="podman run --rm -v "$PWD:/src" -w "/src" docker.io/asciidoctor/docker-asciidoctor:1.27.0 $cmd"
workdir=$project_root/dist
podmancmd="podman run --rm -v "$workdir:/src" -w "/src" docker.io/asciidoctor/docker-asciidoctor:1.27.0 $cmd"
condition="$clitool --version | grep $version"

if ! eval $condition; then
Expand All @@ -33,10 +57,10 @@ fi

#### generate scale av user manual as html ####
clitool="asciidoctor"
cmdargs="user_manual/index.adoc -o dist/scale-av-user-manual.html -acommitHash=$(git rev-parse --short HEAD) -r asciidoctor-diagram"
cmdargs="user_manual/index.adoc -o scale-av-user-manual.html -r asciidoctor-diagram"
cmd="$clitool $cmdargs"
workdir=$project_root
podmancmd="podman run --rm -v "$PWD:/src" -w "/src" docker.io/asciidoctor/docker-asciidoctor:1.27.0 $cmd"
workdir=$project_root/dist
podmancmd="podman run --rm -v "$workdir:/src" -w "/src" docker.io/asciidoctor/docker-asciidoctor:1.27.0 $cmd"
condition="$clitool --version | grep $version"

if ! eval $condition; then
Expand All @@ -53,10 +77,10 @@ fi

#### generate scale av user manual as pdf ####
clitool="asciidoctor"
cmdargs="user_manual/index.adoc -o dist/scale-av-user-manual.pdf -r asciidoctor-pdf -acommitHash=$(git rev-parse --short HEAD) -acommitDate=$(git show -s --format=%cI HEAD) -r asciidoctor-diagram -b pdf -a pdf-theme=user_manual/theme.yml"
cmdargs="user_manual/index.adoc -o scale-av-user-manual.pdf -r asciidoctor-pdf -r asciidoctor-diagram -b pdf -a pdf-theme=user_manual/theme.yml"
cmd="$clitool $cmdargs"
workdir=$project_root
podmancmd="podman run --rm -v "$PWD:/src" -w "/src" docker.io/asciidoctor/docker-asciidoctor:1.27.0 $cmd"
workdir=$project_root/dist
podmancmd="podman run --rm -v "$workdir:/src" -w "/src" docker.io/asciidoctor/docker-asciidoctor:1.27.0 $cmd"
condition="$clitool --version | grep $version"

if ! eval $condition; then
Expand All @@ -70,6 +94,3 @@ else
eval $cmd
cd $project_root
fi

#### copy assets to dist/ ####
cp -r user_manual/assets/ dist/
2 changes: 2 additions & 0 deletions config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
global_vars:
doc_version: 2.0
11 changes: 5 additions & 6 deletions index.adoc
Original file line number Diff line number Diff line change
@@ -1,19 +1,18 @@
include::config.adoc[]
= scale-av minimalist webpage

SCALE A/V is the team that handles A/V for the http://socallinuxexpo.org[Southern California Linux Expo], an open source conference.

We consist of volunteers. The main perks for volunteers include free admission to SCALE, learning new things, getting the bird's eye view of the conference. And meals are covered for your shifts.

We are currently working on SCALE 18x, which will be at the Pasadena Convention Center on Mar 5-8, 2019. This will be our fourth time at this venue.

There are many volunteer opportunities for people of any skill level before, during, and after the conference.

== volunteer signup

If you are interested in volunteering with us,

* Sign up https://forms.gle/XmyaohJZc1t1XQs49[here] at your earliest convenience so we can get a good idea of what our staffing will be and whether we need to heavily recruit for certain time slots. This form asks a number of questions specific to the A/V team and helps us gauge your skills, interests, and availability.
* Sign up for the https://lists.linuxfests.org/cgi-bin/mailman/listinfo/scale-av[scale-av mailing list]. This is we discuss things relating to A/V and where announcements will be made. It will get busier as we get closer to SCALE. Please feel free to ask questions and contribute your ideas. Don't let March 7th be the first time we hear from you.
* Sign up for the https://lists.linuxfests.org/cgi-bin/mailman/listinfo/scale-av[scale-av mailing list]. This is we discuss things relating to A/V and where announcements will be made. It will get busier as we get closer to SCALE. Please feel free to ask questions and contribute your ideas.
* Sign up for the https://lists.linuxfests.org/cgi-bin/mailman/listinfo/scale-planning[scale-planning mailing list]. This is where other SCALE volunteers communicate.
* Bookmark http://socallinuxexpo.github.io/scale-av-web/[this page]. It will be a centralized place to direct people to current scale-av plans and activities. We will be posting more information as we figure out logistical and technical issues.

Expand All @@ -24,9 +23,9 @@ For more information on volunteering with the SCALE A/V team, please refer to th
== volunteer timeline

* Most of the before-SCALE activities involve software development and hardware hacking in addition to the usual planning.
* Mar 3/4 (Tues night,Wed), we will be setting up the conference rooms and the A/V command center.
* Mar 5-8 (Thu-Sun), we will be focused on live video and audio production and troubleshooting. Volunteer hours are 9-7pm, but A/V support may be required for some evening events. (NOTE: you are not expected to work the whole day, just whatever times you can manage.)
* Mar 8 (Sun), once the conference is over, we could use all the help we can get for tear down. Most talks will be over by 5:30pm, but we can probably begin teardown of rooms that are no longer being used.
* Tues night,Wed, we will be setting up the conference rooms and the A/V command center.
* Thu-Sun, we will be focused on live video and audio production and troubleshooting. Volunteer hours are 9-7pm, but A/V support may be required for some evening events. (NOTE: you are not expected to work the whole day, just whatever times you can manage.)
* Sun, once the conference is over, we could use all the help we can get for tear down. Most talks will be over by 5:30pm, but we can probably begin teardown of rooms that are no longer being used.
* After, we will have a post-mortem and finish up with any video editing tasks needed to get all the videos uploaded to Youtube.

== who are you?
Expand Down
5 changes: 5 additions & 0 deletions templates/config.adoc.jinja2
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{%- for key in global_vars -%}
:{{ key }}: {{ global_vars[key] }}
{% endfor -%}
:commit_hash: {{commit_hash}}
:commit_date: {{commit_date}}
8 changes: 4 additions & 4 deletions user_manual/index.adoc
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
include::version.adoc[]
include::../config.adoc[]
= Scale A/V User Manual
v{version}
v{doc_version}
:toc: left
:toclevels: 3

Last Updated: {commitDate}
Last Updated: {commit_date}

Document generated from https://github.com/socallinuxexpo/scale-av-web/commit/{commitHash}[{commitHash}]
Document generated from https://github.com/socallinuxexpo/scale-av-web/commit/{commit_hash}[{commit_hash}]

ifndef::backend-pdf[]
image:https://img.shields.io/badge/License-MIT-yellow.svg[MIT License, link=https://opensource.org/licenses/MIT] image:https://img.shields.io/badge/Contribute%20on-GitHub-orange[Contribute on GitHub, link=https://github.com/socallinuxexpo/scale-av-web/] image:https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square[PRs Welcome, link=http://makeapullrequest.com] image:https://img.shields.io/badge/Download%20-PDF-blue[Download PDF, link=./scale-av-user-manual.pdf]
Expand Down
2 changes: 1 addition & 1 deletion user_manual/introduction.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ effective in the field.

=== Schedule Overview ===

SCALE 18x is March 5-8, 2020, Thursday through Sunday. However, volunteers are
SCALE is held Thursday through Sunday. However, volunteers are
needed for setup on Wednesday as well as sometimes on Tuesday.
Tuesday (afternoon): Retrieving equipment from the off-site storage facility,
unpacking and setting up the A/V NOC, and potential room setups.
Expand Down
1 change: 0 additions & 1 deletion user_manual/the-av-noc.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,3 @@ When in the NOC, please talk quietly (like inside a library) because video feed
=== NOC Setup

The table for the radios should be sufficiently far away from the door to prevent people from running into it.
For 17x, we are going to try to place the radios behind the reception desk.
4 changes: 2 additions & 2 deletions user_manual/theme.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ footer:
columns: =100%
recto:
center:
content: '{section-or-chapter-title} | *{page-number}* | v{version} https://github.com/socallinuxexpo/scale-av-web/commit/{commitHash}[{commitHash}] | {commitDate}'
content: '{section-or-chapter-title} | *{page-number}* | v{doc_version} https://github.com/socallinuxexpo/scale-av-web/commit/{commit_hash}[{commit_hash}] | {commit_date}'
verso:
center:
content: '{section-or-chapter-title} | *{page-number}* | v{version} https://github.com/socallinuxexpo/scale-av-web/commit/{commitHash}[{commitHash}] | {commitDate}'
content: '{section-or-chapter-title} | *{page-number}* | v{doc_version} https://github.com/socallinuxexpo/scale-av-web/commit/{commit_hash}[{commit_hash}] | {commit_date}'
2 changes: 1 addition & 1 deletion user_manual/where-we-do-it.adoc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
== Where We Do It

SCALE 17x (2019) is at the https://pasadenacenter.visitpasadena.com/[Pasadena Convention Center].
SCALE is at the https://pasadenacenter.visitpasadena.com/[Pasadena Convention Center].

Here is a map of the convention center:

Expand Down

0 comments on commit 4f0edc1

Please sign in to comment.