Created
October 15, 2015 05:51
-
-
Save mohemohe/1c4f5af64847e1b08111 to your computer and use it in GitHub Desktop.
ATOKダイレクトAPIで柔軟に「いま」できるやつ
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env python | |
# coding:utf-8 | |
import datetime | |
def atok_plugin_run_process( request_data ): | |
result_data = {} | |
candidate_array = [] | |
now = datetime.datetime.now() | |
IMA = '{0:%Y-%m-%d %H:%M:%S}'.format(now) | |
if request_data['composition_string'] == u'いま': | |
candidate_array.append({'hyoki': IMA.decode('utf-8')}) | |
result_data['candidate'] = candidate_array | |
return result_data |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment