diff --git a/award.php b/award.php index c09b71b..a0a4126 100644 --- a/award.php +++ b/award.php @@ -118,12 +118,13 @@ $baseary["awardname"] = "優秀論文賞"; $baseary["eventname"] = "情報教育シンポジウム{$baseary['year']}"; $baseary["content"] = "貴殿が情報処理学会{$baseary['eventname']}にて発表された「[:TITLE:]」" . -"は特に優秀な論文であり論文賞を授与するにふさわしいものであると認めます。\r\nよってここに表彰いたします。"; + "は特に優秀な論文であり論文賞を授与するにふさわしいものであると認めます。\r\nよってここに表彰いたします。"; $baseary["presenter"] = $baseary["date"] . "\r\n" . -"一般社団法人 情報処理学会\r\n" . -"情報教育シンポジウム{$baseary['year']}\r\n" . -"プログラム委員長 遠山 紗矢香\r\n" . -"実行委員長 三浦 元喜\r\n"; + "一般社団法人 情報処理学会\r\n" . + "情報教育シンポジウム{$baseary['year']}\r\n" . + "プログラム委員長 遠山 紗矢香\r\n" . + "実行委員長 三浦 元喜\r\n" . + "大会委員長 中野 由章\r\n"; $url = "https://sss.istlab.info/awards/json_booth_title_author/oimo"; $json = file_get_contents($url); @@ -132,20 +133,41 @@ // 一部の【ブース番号】(not paper id)だけを出力する場合 半角スペース区切り // $booth_list = "1 2 3 4 5 "; -$booth_list = ""; -if (strlen($booth_list) > 1) { - $booth_list_ary = explode(" ", trim($booth_list)); - foreach ($booth_list_ary as $b) { - $ary = $obj[$b]; - $ary = array_merge($ary, $baseary); - addHSJ($phpPres, $ary); +$awards = [ + "優秀論文賞" => "貴殿が情報処理学会{$baseary['eventname']}にて発表された「hoge」は特に優秀な論文であり、情報教育の発展に貢献することを認めここに表彰いたします。", + "優秀発表賞" => "貴殿が情報処理学会{$baseary['eventname']}にて発表された「hoge」は特に優秀な発表であり、情報教育の発展に貢献することを認めここに表彰いたします。", + "デモ・ポスター賞" => "貴殿が情報処理学会{$baseary['eventname']}にて発表された「hoge」は特に優秀なデモ・ポスターであり、情報教育の発展に貢献することを認めここに表彰いたします。", + "学生奨励賞" => "貴殿が情報処理学会{$baseary['eventname']}にて発表された「hoge」は特に優秀な学生発表であることを認めここに表彰いたします。" +]; +/** + * ここで、受賞者の論文のブース、発表番号を半角スペース区切りで入れてください。 + */ +$winners = [ + "優秀論文賞" => "1-1 1-2", + "優秀発表賞" => "1-3", + "デモ・ポスター賞" => "P-1", + "学生奨励賞" => "8-1", +]; + +foreach($awards as $award=>$body){ + $baseary["awardname"] = $award; // 〜〜賞 + $baseary["content"] = str_replace("hoge","[:TITLE:]", $body); // 貴殿が... (hogeを[:TITLE:]に差し替える) + $booth_list = $winners[$award]; + if (strlen($booth_list) > 1) { + $booth_list_ary = explode(" ", trim($booth_list)); + foreach ($booth_list_ary as $b) { + $ary = $obj[$b]; + $ary = array_merge($ary, $baseary); + addHSJ($phpPres, $ary); + } + } else { + // 全部出力する場合 + foreach ($obj as $booth => $ary) { + $ary = array_merge($ary, $baseary); + addHSJ($phpPres, $ary); + } } -} else { - // 全部出力する場合 - foreach ($obj as $booth => $ary) { - $ary = array_merge($ary, $baseary); - addHSJ($phpPres, $ary); - } + } // $ary = [ diff --git a/composer.lock b/composer.lock index a081f52..bd64b72 100644 --- a/composer.lock +++ b/composer.lock @@ -69,33 +69,36 @@ }, { "name": "maennchen/zipstream-php", - "version": "v2.4.0", + "version": "3.1.0", "source": { "type": "git", "url": "https://github.com/maennchen/ZipStream-PHP.git", - "reference": "3fa72e4c71a43f9e9118752a5c90e476a8dc9eb3" + "reference": "b8174494eda667f7d13876b4a7bfef0f62a7c0d1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/maennchen/ZipStream-PHP/zipball/3fa72e4c71a43f9e9118752a5c90e476a8dc9eb3", - "reference": "3fa72e4c71a43f9e9118752a5c90e476a8dc9eb3", + "url": "https://api.github.com/repos/maennchen/ZipStream-PHP/zipball/b8174494eda667f7d13876b4a7bfef0f62a7c0d1", + "reference": "b8174494eda667f7d13876b4a7bfef0f62a7c0d1", "shasum": "" }, "require": { "ext-mbstring": "*", - "myclabs/php-enum": "^1.5", - "php": "^8.0", - "psr/http-message": "^1.0" + "ext-zlib": "*", + "php-64bit": "^8.1" }, "require-dev": { "ext-zip": "*", - "friendsofphp/php-cs-fixer": "^3.9", - "guzzlehttp/guzzle": "^6.5.3 || ^7.2.0", + "friendsofphp/php-cs-fixer": "^3.16", + "guzzlehttp/guzzle": "^7.5", "mikey179/vfsstream": "^1.6", - "php-coveralls/php-coveralls": "^2.4", - "phpunit/phpunit": "^8.5.8 || ^9.4.2", + "php-coveralls/php-coveralls": "^2.5", + "phpunit/phpunit": "^10.0", "vimeo/psalm": "^5.0" }, + "suggest": { + "guzzlehttp/psr7": "^2.4", + "psr/http-message": "^2.0" + }, "type": "library", "autoload": { "psr-4": { @@ -131,7 +134,7 @@ ], "support": { "issues": "https://github.com/maennchen/ZipStream-PHP/issues", - "source": "https://github.com/maennchen/ZipStream-PHP/tree/v2.4.0" + "source": "https://github.com/maennchen/ZipStream-PHP/tree/3.1.0" }, "funding": [ { @@ -143,7 +146,7 @@ "type": "open_collective" } ], - "time": "2022-12-08T12:29:14+00:00" + "time": "2023-06-21T14:59:35+00:00" }, { "name": "markbaker/complex", @@ -253,69 +256,6 @@ "time": "2022-12-02T22:17:43+00:00" }, { - "name": "myclabs/php-enum", - "version": "1.8.4", - "source": { - "type": "git", - "url": "https://github.com/myclabs/php-enum.git", - "reference": "a867478eae49c9f59ece437ae7f9506bfaa27483" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/myclabs/php-enum/zipball/a867478eae49c9f59ece437ae7f9506bfaa27483", - "reference": "a867478eae49c9f59ece437ae7f9506bfaa27483", - "shasum": "" - }, - "require": { - "ext-json": "*", - "php": "^7.3 || ^8.0" - }, - "require-dev": { - "phpunit/phpunit": "^9.5", - "squizlabs/php_codesniffer": "1.*", - "vimeo/psalm": "^4.6.2" - }, - "type": "library", - "autoload": { - "psr-4": { - "MyCLabs\\Enum\\": "src/" - }, - "classmap": [ - "stubs/Stringable.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP Enum contributors", - "homepage": "https://github.com/myclabs/php-enum/graphs/contributors" - } - ], - "description": "PHP Enum implementation", - "homepage": "http://github.com/myclabs/php-enum", - "keywords": [ - "enum" - ], - "support": { - "issues": "https://github.com/myclabs/php-enum/issues", - "source": "https://github.com/myclabs/php-enum/tree/1.8.4" - }, - "funding": [ - { - "url": "https://github.com/mnapoli", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/myclabs/php-enum", - "type": "tidelift" - } - ], - "time": "2022-08-04T09:53:51+00:00" - }, - { "name": "pclzip/pclzip", "version": "2.8.2", "source": { @@ -483,16 +423,16 @@ }, { "name": "phpoffice/phpspreadsheet", - "version": "1.26.0", + "version": "1.29.0", "source": { "type": "git", "url": "https://github.com/PHPOffice/PhpSpreadsheet.git", - "reference": "5b6ceea9705b068f993e268e4debc566c2637063" + "reference": "fde2ccf55eaef7e86021ff1acce26479160a0fa0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PHPOffice/PhpSpreadsheet/zipball/5b6ceea9705b068f993e268e4debc566c2637063", - "reference": "5b6ceea9705b068f993e268e4debc566c2637063", + "url": "https://api.github.com/repos/PHPOffice/PhpSpreadsheet/zipball/fde2ccf55eaef7e86021ff1acce26479160a0fa0", + "reference": "fde2ccf55eaef7e86021ff1acce26479160a0fa0", "shasum": "" }, "require": { @@ -510,7 +450,7 @@ "ext-zip": "*", "ext-zlib": "*", "ezyang/htmlpurifier": "^4.15", - "maennchen/zipstream-php": "^2.1", + "maennchen/zipstream-php": "^2.1 || ^3.0", "markbaker/complex": "^3.0", "markbaker/matrix": "^3.0", "php": "^7.4 || ^8.0", @@ -519,15 +459,15 @@ "psr/simple-cache": "^1.0 || ^2.0 || ^3.0" }, "require-dev": { - "dealerdirect/phpcodesniffer-composer-installer": "dev-master", + "dealerdirect/phpcodesniffer-composer-installer": "dev-main", "dompdf/dompdf": "^1.0 || ^2.0", "friendsofphp/php-cs-fixer": "^3.2", - "mitoteam/jpgraph": "^10.2.4", + "mitoteam/jpgraph": "^10.3", "mpdf/mpdf": "^8.1.1", "phpcompatibility/php-compatibility": "^9.3", "phpstan/phpstan": "^1.1", "phpstan/phpstan-phpunit": "^1.0", - "phpunit/phpunit": "^8.5 || ^9.0", + "phpunit/phpunit": "^8.5 || ^9.0 || ^10.0", "squizlabs/php_codesniffer": "^3.7", "tecnickcom/tcpdf": "^6.5" }, @@ -582,27 +522,27 @@ ], "support": { "issues": "https://github.com/PHPOffice/PhpSpreadsheet/issues", - "source": "https://github.com/PHPOffice/PhpSpreadsheet/tree/1.26.0" + "source": "https://github.com/PHPOffice/PhpSpreadsheet/tree/1.29.0" }, - "time": "2022-12-21T12:22:06+00:00" + "time": "2023-06-14T22:48:31+00:00" }, { "name": "psr/http-client", - "version": "1.0.1", + "version": "1.0.2", "source": { "type": "git", "url": "https://github.com/php-fig/http-client.git", - "reference": "2dfb5f6c5eff0e91e20e913f8c5452ed95b86621" + "reference": "0955afe48220520692d2d09f7ab7e0f93ffd6a31" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/http-client/zipball/2dfb5f6c5eff0e91e20e913f8c5452ed95b86621", - "reference": "2dfb5f6c5eff0e91e20e913f8c5452ed95b86621", + "url": "https://api.github.com/repos/php-fig/http-client/zipball/0955afe48220520692d2d09f7ab7e0f93ffd6a31", + "reference": "0955afe48220520692d2d09f7ab7e0f93ffd6a31", "shasum": "" }, "require": { "php": "^7.0 || ^8.0", - "psr/http-message": "^1.0" + "psr/http-message": "^1.0 || ^2.0" }, "type": "library", "extra": { @@ -622,7 +562,7 @@ "authors": [ { "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" + "homepage": "https://www.php-fig.org/" } ], "description": "Common interface for HTTP clients", @@ -634,27 +574,27 @@ "psr-18" ], "support": { - "source": "https://github.com/php-fig/http-client/tree/master" + "source": "https://github.com/php-fig/http-client/tree/1.0.2" }, - "time": "2020-06-29T06:28:15+00:00" + "time": "2023-04-10T20:12:12+00:00" }, { "name": "psr/http-factory", - "version": "1.0.1", + "version": "1.0.2", "source": { "type": "git", "url": "https://github.com/php-fig/http-factory.git", - "reference": "12ac7fcd07e5b077433f5f2bee95b3a771bf61be" + "reference": "e616d01114759c4c489f93b099585439f795fe35" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/http-factory/zipball/12ac7fcd07e5b077433f5f2bee95b3a771bf61be", - "reference": "12ac7fcd07e5b077433f5f2bee95b3a771bf61be", + "url": "https://api.github.com/repos/php-fig/http-factory/zipball/e616d01114759c4c489f93b099585439f795fe35", + "reference": "e616d01114759c4c489f93b099585439f795fe35", "shasum": "" }, "require": { "php": ">=7.0.0", - "psr/http-message": "^1.0" + "psr/http-message": "^1.0 || ^2.0" }, "type": "library", "extra": { @@ -674,7 +614,7 @@ "authors": [ { "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" + "homepage": "https://www.php-fig.org/" } ], "description": "Common interfaces for PSR-7 HTTP message factories", @@ -689,31 +629,31 @@ "response" ], "support": { - "source": "https://github.com/php-fig/http-factory/tree/master" + "source": "https://github.com/php-fig/http-factory/tree/1.0.2" }, - "time": "2019-04-30T12:38:16+00:00" + "time": "2023-04-10T20:10:41+00:00" }, { "name": "psr/http-message", - "version": "1.0.1", + "version": "2.0", "source": { "type": "git", "url": "https://github.com/php-fig/http-message.git", - "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363" + "reference": "402d35bcb92c70c026d1a6a9883f06b2ead23d71" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/http-message/zipball/f6561bf28d520154e4b0ec72be95418abe6d9363", - "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363", + "url": "https://api.github.com/repos/php-fig/http-message/zipball/402d35bcb92c70c026d1a6a9883f06b2ead23d71", + "reference": "402d35bcb92c70c026d1a6a9883f06b2ead23d71", "shasum": "" }, "require": { - "php": ">=5.3.0" + "php": "^7.2 || ^8.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0.x-dev" + "dev-master": "2.0.x-dev" } }, "autoload": { @@ -728,7 +668,7 @@ "authors": [ { "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" + "homepage": "https://www.php-fig.org/" } ], "description": "Common interface for HTTP messages", @@ -742,9 +682,9 @@ "response" ], "support": { - "source": "https://github.com/php-fig/http-message/tree/master" + "source": "https://github.com/php-fig/http-message/tree/2.0" }, - "time": "2016-08-06T14:39:51+00:00" + "time": "2023-04-04T09:54:51+00:00" }, { "name": "psr/simple-cache",