Commit af9dc42a authored by Takayuki Kamiyama's avatar Takayuki Kamiyama 🐉

Update, autocal add.

parent 25677ad7
......@@ -144,6 +144,9 @@ module Zinbeijett
$ engine -c
Calendar views. Today now.
$ engine -f 2007 09
Calendar views, select year and month.
HELP
puts 'Command'.center(60, '-').toutf8
......
require 'date'
require 'pycall/import'
include PyCall::Import
require 'kconv'
Encoding.default_internal = 'UTF-8'
module Auto
module_function
def view
yr = ARGV[1].toutf8
mh = ARGV[2].toutf8
sys = PyCall.import_module('sys')
d = Date.today
pyimport :calendar
puts (calendar.month(yr.to_i,mh.to_i))
end
end
puts ''
......@@ -4,7 +4,7 @@ require 'kconv'
Encoding.default_internal = 'UTF-8'
module Engine
VERSION = '1.0.10'.toutf8.freeze
VERSION = '1.0.10.1'.toutf8.freeze
end
__END__
......@@ -56,6 +56,12 @@ module Engine
Calendar.view
puts ''
end
def auto_view
require_relative 'prop/autocal'
Auto.view
puts ''
end
end
include Engine
......@@ -70,6 +76,7 @@ g = /\A[-][g]\z/
m = /\A[-][m]\z/
s = /\A[-][s]\z/
c = /\A[-][c]\z/
f = /\A[-][f]\z/
if one.nil?
puts 'engine is Zinbeijett, I made in 2016.'.toutf8.freeze
......@@ -91,6 +98,8 @@ elsif one.match?(s)
count_search
elsif one.match?(c)
calendar_view
elsif one.match?(f)
auto_view
else
puts 'Not other arguments!'.toutf8.freeze
end
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment