Commit 339cd33a authored by Takayuki Kamiyama's avatar Takayuki Kamiyama 🐉

Update, Calendar function add.

parent 740c2aa7
......@@ -8,6 +8,7 @@ ruby '2.6.1'
gem 'minitest'
gem 'minitest-reporters'
gem 'pycall'
gem 'rake'
gem 'rspec'
gem 'ruby-prof'
......
......@@ -25,6 +25,7 @@ GEM
ast (~> 2.4.0)
power_assert (1.1.3)
powerpack (0.1.2)
pycall (1.2.1)
rainbow (3.0.0)
rake (12.3.2)
reverse_markdown (1.1.0)
......@@ -78,6 +79,7 @@ PLATFORMS
DEPENDENCIES
minitest
minitest-reporters
pycall
rake
rspec
ruby-prof
......
......@@ -14,7 +14,21 @@
zinbeijett バージョン情報 ライセンス情報 ヘルプ情報 スタートページ
engine 全文検索 AND検索 NOT検索 OR検索 メールアドレス検索 GC表示 文字列カウント 時刻表示 作成者情報
engine 全文検索 AND検索 NOT検索 OR検索 メールアドレス検索 GC表示
文字列カウント 時刻表示 作成者情報 カレンダー
[Use Pycall](https://github.com/mrkn/pycall.rb)
```ruby
zinbeijett users.
$ gem install pycall
$ env PYTHON_CONFIGURE_OPTS='--enable-shared' pyenv install 3.7.2
Python 3.7.2 already install N/ Still install Y/
```
## ※詳しくは[箱入り娘のサポートページ](http://www.hakoirimusume.xyz/)を参照
......
......@@ -138,9 +138,12 @@ module Zinbeijett
$ engine -m notojima.txt
mail search. pattern match is mailaddress word only.
$ engine -c notojima.txt notojima
$ engine -s notojima.txt notojima
String count search. String count in File.
$ engine -c
Calendar views. Today now.
HELP
puts 'Command'.center(60, '-').toutf8
......
require 'date'
require 'pycall/import'
include PyCall::Import
puts ''
module Calendar
module_function
def view
sys = PyCall.import_module('sys')
d = Date.today
pyimport :calendar
puts (calendar.month(d.year,d.month))
end
end
puts ''
......@@ -50,6 +50,11 @@ module Engine
require_relative 'prop/count'
Count.search
end
def calendar_view
require_relative 'prop/calendar'
Calendar.view
end
end
include Engine
......@@ -62,6 +67,7 @@ o = /\A[-][o]\z/
d = /\A[-][d]\z/
g = /\A[-][g]\z/
m = /\A[-][m]\z/
s = /\A[-][s]\z/
c = /\A[-][c]\z/
if one.nil?
......@@ -80,8 +86,10 @@ elsif one.match?(m)
search_mail
elsif one.match?(d)
search_druby_erb
elsif one.match?(c)
elsif one.match?(s)
count_search
elsif one.match?(c)
calendar_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