1
0
mirror of https://github.com/danog/MadelineProto.git synced 2024-12-02 13:17:47 +01:00
MadelineProto/telepy.php
2016-06-23 23:51:08 +02:00

15 lines
749 B
PHP

<?php
set_include_path(get_include_path() . PATH_SEPARATOR . dirname(__FILE__) . DIRECTORY_SEPARATOR . 'libpy2php');
require_once ('libpy2php.php');
require_once ('argparse.php');
if (($__name__ == '__main__')) {
$parser = py2php_kwargs_function_call('argparse::ArgumentParser', ['telepy'], ["description" => 'Python implementation of telegram API.']);
py2php_kwargs_method_call($parser, 'add_argument', ['command'], ["nargs" => '?', "choices" => (['cmd', 'dialog_list', 'contact_list'] + /* py2php.fixme listcomp unsupported. */
) ]);
py2php_kwargs_method_call($parser, 'add_argument', ['args'], ["nargs" => '*']);
$args = $parser->parse_args();
if (($args->command == null)) {
new TelepyShell()->cmdloop();
}
}