@@ -0,0 +1,1262 @@
+%22%22%22Main Module%0A%E8%B5%B7%E5%8B%95%E3%81%97%E3%81%9F%E3%82%89%E6%8A%95%E7%A8%BF%E3%81%97%E3%81%A6%E7%B5%82%E4%BA%86%E3%81%99%E3%82%8B%E3%80%82%0A%22%22%22%0Aimport sys%0Aimport argparse%0Aimport slacker%0A%0Adef make_argparser():%0A    %22%22%22Create Command Line Parser%0A    DESCRIPTION:%0A        This function creates ArgumentParser Object and make arguments for this app.%0A    NOTE:%0A        %E4%BB%8A%E5%BE%8C%E3%81%AE%E6%8B%A1%E5%BC%B5%E6%80%A7%E3%81%AE%E3%81%9F%E3%82%81%E3%81%ABArgumentParser%E3%82%AA%E3%83%96%E3%82%B8%E3%82%A7%E3%82%AF%E3%83%88%E3%81%A7%E3%82%B3%E3%83%9E%E3%83%B3%E3%83%89%E3%83%A9%E3%82%A4%E3%83%B3%E3%81%AE%E3%83%91%E3%83%BC%E3%82%B9%E3%82%92%E3%81%97%E3%81%A6%E3%81%84%E3%81%BE%E3%81%99%E3%81%8C%E4%BB%8A%E3%81%AE%E3%81%A8%E3%81%93%E3%82%8D%0A        python slackbotcommander APITOKEN%0A        %E3%81%A3%E3%81%A6%E3%81%A0%E3%81%91%E3%81%A7%E3%81%99%0A    %22%22%22%0A    parser = argparse.ArgumentParser()%0A    parser.add_argument(%22--channel%22, help='channel to post message')%0A    parser.add_argument(%22APITOKEN%22, default=%22random%22, help='api token for slack bot/integration you use')%0A    return parser%0Adef get_channel(slack: slacker.Slacker, channel_name: str):%0A    %22%22%22get the channel_name for integration%0A    NOTE:%E4%B8%80%E5%BF%9CDM%E3%82%84%E8%87%AA%E5%88%86DM%E7%AD%89%E3%81%AE%E5%AF%BE%E5%BF%9C%E3%81%AE%E3%81%9F%E3%82%81%E3%81%AE%E4%BD%99%E5%9C%B0%E3%81%A8%E3%81%97%E3%81%A6%E4%BD%9C%E3%81%A3%E3%81%A8%E3%81%84%E3%81%9F%0A    %22%22%22%0A    return channel_name%0Adef main():%0A    %22%22%22Main Routine%0A    PROCESS:%0A        1.analyze commandline%0A        2.get api_token%0A        3.post to slack%0A    %22%22%22%0A    # parse commandline arguments%0A    argparser = make_argparser()%0A    argument = argparser.parse_args(sys.argv)%0A    # get api token%0A    api_token = argument.APITOKEN%0A    slack = slacker.Slacker(api_token)%0A    channel_id = get_channel(slack, argument.channel_name)%0A    slack.chat.post_message(channel_id, 'Hello!')%0Aif __name__ == %22__main__%22:%0A    main()%0A

create bot app to post hello!