Skip to content

ayasamind/holidays_jp2aipo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

43 Commits
 
 
 
 
 
 

Repository files navigation

holidays_jp2aipo

Overview

オープンソースグループウェアaipoに1970年から2050年までの祝日を定義させるphpです。

Description

1970年~2050年の祝日を記述したyamlファイル をオープンソースのグループウェアであるaipoで利用するためにaipoの祝日定義ファイルである、propertiesファイルに変換するphpです。

yamlファイルはaipoで使用するために(/usr/local/aipo/tomcat/webapps/aipo/WEB-INF/conf/holidays_default.properties) にholidays_default.propertiesとしてデータが上書きされます。

Requirement

curl 7.37.0

Usage

curl -L https://raw.githubusercontent.com/k1LoW/holiday_jp/master/holidays.yml | php change.php> /任意のPATH/holidays_default.properties | chmod 755 holidays_default.properties

(任意のPATHにはあなたのaipo上のholidays_default.propertiesのPATHを入力してください)

上記のようにcurlコマンドによってyamlファイルを取り出し、同時にパイプでこのphpを実行することによって、php側でyamlの標準入力を受け取り、出力がproperties形式に変換されます。 そしてリダイレクト(>)によってその出力があなたが入力したPATH上のholidays_default.propertiesに上書きされます。 またcronを使って自動更新を行うために、chmodコマンドで実行権限を付与します。

Lisence

Copyright (c) [2015] [MasayaYoshino] This software is released under the MIT License, please see LICENSE.txt.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages