diff --git a/tutorial/questionnaire/beginner.html b/tutorial/questionnaire/beginner.html new file mode 100644 index 000000000..2614ad033 --- /dev/null +++ b/tutorial/questionnaire/beginner.html @@ -0,0 +1,424 @@ + + + + + + OSS Gateワークショップの振り返り (ビギナー用) + + + +
+

お疲れ様でした!

+

OSS Gateワークショップにご参加いただきありがとうございました!

+
+ +
+

アンケートへの回答をお願いいたします

+ +

+ 本日のOSS Gateワークショップはいかがでしたか?
+ 今後のOSS Gateワークショップの参考とするため、アンケートへの回答をお願いいたします! +

+
+ +
+ +
+
+
+

OSS Gateワークショップの振り返り

+

ビギナー用

+
+ +

*は必須項目

+ +
+

+ ユーザー名 + * +

+ +

GitHubアカウントのユーザー名 (@以降の文字列)を入力して下さい。

+ + +
+ +
+

+ 参加した理由 + * +

+ +

+ どうしてこのワークショップに参加しようと思いましたか?
+ どうしてOSSの開発に参加したいと思っていますか?
+ みんなのためとか世界のためとかでもよいですが、 + 個人的な理由でもまったく問題ありません。
+ 自分の思っていることを大事にしたいのです。 +

+ + + + +
+ +
+

+ 見つけた場所 + * +

+ +

どこでこのワークショップを知りましたか?

+ + + + +
+ +
+

+ 開発対象 + * +

+ +

ワークショップで開発対象に選んだOSSはなんですか?

+ + +
+ +
+

+ 満足度 + * +

+ + + + +
+ +
+

+ 想定との違い + * +

+ + + + +
+ +
+

+ 進行役について + * +

+ +

+ 進行役はうまく進行できていましたか?
+ 進行役の説明はどうでしたか? + スライドの内容を理解するのに役立ちましたか? +

+ + + + +
+ +
+

+ サポートメンターについて + * +

+ +

+ サポートメンターはサポーターがいないときの代役としてうまくフォローできていましたか?
+ サポートメンターはサポーターをうまくフォローできていましたか? +

+ + + + +
+ +
+

+ 次回のOSS Gateワークショップについて + * +

+ +
+ 当てはまるものを全て選んでください + +
+ + + +
+ +
+ + + +
+ +
+ + + +
+ +
+ + + +
+
+
+ +
+

+ 今後のOSS開発への参加について + * +

+ + + + +
+ +
+

+ 今後のOSSの開発への参加の動機について + * +

+ +

+ 今回のワークショップを終えた現時点で、今後のOSS開発への参加で + どういうことが動機になりそうだと思いますか?
+ みんなのためとか世界のためとかでもよいですが、 + 個人的な理由でもまったく問題ありません。 +

+ +
+ 当てはまるものを全て選んでください + +
+ + + +
+ +
+ + + +
+ +
+ + + +
+ +
+ + + +
+ +
+ + + +
+ +
+ + + +
+ +
+ + + +
+ +
+ + + +
+ +
+ + + +
+ +
+ + + + + +
+
+
+ +
+

+ 次に変えて試すこと + * +

+ +

+ ワークショップの内容を何か1つだけ変えられるとしたら、 + どんなことを試したいと思いますか? +

+ + + + +
+ +
+

その他

+ +

なにか思ったことがあれば自由に書いてください。

+ + + + +
+ + + + + +
+ +
+
+
+ +
+ +

質問は以上です。お疲れ様でした!

+ + + + + + diff --git a/tutorial/questionnaire/json2yaml.rb b/tutorial/questionnaire/json2yaml.rb new file mode 100755 index 000000000..1f917edef --- /dev/null +++ b/tutorial/questionnaire/json2yaml.rb @@ -0,0 +1,52 @@ +#!/usr/bin/env ruby +# json2yaml.rb -- Convert a JSON file to a YAML file +# Copyright 2025 Keisuke Kurosawa +# +# 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. + +# frozen_string_literal: true + +require 'json' +require 'yaml' + +def main + path = ARGV.shift + output_dir = ARGV.shift + + begin + json2yaml(path, output_dir) + rescue ArgumentError => e + warn "#{$PROGRAM_NAME}: #{e.message}" + return 1 + end + + 0 +end + +def json2yaml(path, output_dir = nil) + raise(ArgumentError, "#{path}: Is not a JSON file") unless File.basename(path) =~ /\.json$/ + + output_dir = File.dirname(path) if output_dir.to_s.empty? + + yaml_path = "#{output_dir}/#{File.basename(path, '.json')}.yaml" + + obj = JSON.load_file(path) + + File.open(yaml_path, 'w') { |file| YAML.dump(obj, file) } +end + +if __FILE__ == $PROGRAM_NAME + errno = main + + exit(errno) +end diff --git a/tutorial/questionnaire/questionnaire.js b/tutorial/questionnaire/questionnaire.js new file mode 100644 index 000000000..15362050c --- /dev/null +++ b/tutorial/questionnaire/questionnaire.js @@ -0,0 +1,99 @@ +// questionnaire.js -- Extract and save a JSON file from a survey form +// Copyright (C) 2025 Keisuke Kurosawa +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as +// published by the Free Software Foundation, either version 3 of the +// License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . + +function saveQuestionnaire(type) { + const form = document.getElementById(type); + const formData = new FormData(form); + + const username = formData.get('username'); + const questionnaire = extractQuestionnaire(type, formData); + + const json = `${JSON.stringify(questionnaire, null, 2)}\n`; + const blob = new Blob([json], {'type': 'application/json'}); + const url = URL.createObjectURL(blob); + + const a = document.createElement('a'); + a.href = url; + a.download = [type, username].join('-').concat('.json'); + a.click(); + + URL.revokeObjectURL(url); +} + +function extractQuestionnaire(type, formData) { + const questions = new Map(); + + formData.keys().forEach((key) => { + const answer = getAnswer(formData, key); + + if (answer !== null) { + questions.set(key, answer); + } + }); + + const questionnaire = { + 'type': type, + 'questions': Object.fromEntries(questions) + }; + + return questionnaire; +} + +function getAnswer(formData, key) { + let answer = ''; + + switch (key) { + case 'target': + answer = formData.get(key); + + break; + case 'motivation': + case 'via': + case 'moderator': + case 'support-mentor': + case 'challenge-planning': + case 'active-rate': + answer = formData.get(key).replaceAll("\n", ''); + + break; + case 'satisfaction-rating': + case 'difference': + case 'next': + case 'future': + case 'future-motivation': + case 'supported': + case 'moderator-likely': + answer = formData.getAll(key); + + break; + case 'future-motivation-freeform': + answer = formData.getAll('future-motivation').includes('その他') ? formData.get(key) : '(ここに回答を改行を入れずに書いてください)'; + + break; + case 'etc': + answer = formData.get(key).replaceAll("\n", ''); + + if (answer.length <= 0) { + answer = '(ここに回答を改行を入れずに書いてください)'; + } + + break; + default: + answer = null; + } + + return answer; +} diff --git a/tutorial/questionnaire/supporter.html b/tutorial/questionnaire/supporter.html new file mode 100644 index 000000000..b0205d77d --- /dev/null +++ b/tutorial/questionnaire/supporter.html @@ -0,0 +1,351 @@ + + + + + + OSS Gateワークショップの振り返り (サポーター用) + + + +
+

お疲れ様でした!

+

OSS Gateワークショップにご参加いただきありがとうございました!

+
+ +
+

アンケートへの回答をお願いいたします

+ +

+ 本日のOSS Gateワークショップはいかがでしたか?
+ 今後のOSS Gateワークショップの参考とするため、アンケートへの回答をお願いいたします! +

+
+ +
+ +
+
+
+

OSS Gateワークショップの振り返り

+

サポーター用

+
+ +

*は必須項目

+ +
+

+ ユーザー名 + * +

+ +

GitHubアカウントのユーザー名 (@以降の文字列)を入力して下さい。

+ + +
+ +
+

+ 参加した理由 + * +

+ +

+ どうしてこのワークショップに参加しようと思いましたか?
+ どうしてOSSの開発に参加したいと思っていますか?
+ みんなのためとか世界のためとかでもよいですが、 + 個人的な理由でもまったく問題ありません。
+ 自分の思っていることを大事にしたいのです。
+ アイスブレイクのときに話した内容でもよいですし、 + そのあとに気持ちが変わったらなら変わった気持ちでよいです。 +

+ + + + +
+ +
+

+ 見つけた場所 + * +

+ +

どこでこのワークショップを知りましたか?

+ + + + +
+ +
+

+ このワークショップでビギナーをサポートできましたか? + * +

+ + + + +
+ +
+

+ 満足度 + * +

+ + + + +
+ +
+

+ 想定との違い + * +

+ + + + +
+ +
+

+ 進行役について + * +

+ +

+ 進行役はうまく進行できていましたか?
+ 進行役の説明はどうでしたか? + スライドの内容を理解するのに役立ちましたか? +

+ + + + +
+ +
+

+ サポートメンターについて + * +

+ +

+ サポートメンターはサポーターがいないときの代役としてうまくフォローできていましたか?
+ サポートメンターはサポーターをうまくフォローできていましたか? +

+ + + + +
+ +
+

+ 進行役のやりやすさについて + * +

+ +

+ + + + +
+ +
+

+ 次回のOSS Gateワークショップについて + * +

+ +
+ 当てはまるものを全て選んでください + +
+ + + +
+ +
+ + + +
+ +
+ + + +
+ +
+ + + +
+ +
+ + + +
+
+
+ +
+

+ ワークショップへの関心度 + * +

+ +

+ OSS Gateのワークショップは定期的に開催していますが、その開催時期や間隔はご存知ですか?
+ また、その際のご都合はいかがでしょうか?
+ これまでの話でも、今後の話でも構いません。自由に回答してください。 +

+ + + + +
+ +
+

+ 次に変えて試すこと + * +

+ +

+ ワークショップの内容を何か1つだけ変えられるとしたら、 + どんなことを試したいと思いますか? +

+ + + + +
+ +
+

その他

+ +

なにか思ったことがあれば自由に書いてください。

+ + + + +
+ + + + + +
+ +
+
+
+ +
+ +

質問は以上です。お疲れ様でした!

+ +
+ +
+ + + +