Module Import alias Import alias Import alias Import alias Import alias Import alias Import alias Assign NameStore Str Assign NameStore ListLoad ListLoad Str Str Str ListLoad Str Str Str Assign NameStore Str ClassDef bases body Expr Str FunctionDef arguments args NameParam NameParam defaults body Assign AttributeStore NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults body Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str Assign NameStore Str With Call NameLoad NameLoad body If Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad If CompareEq AttributeLoad NameLoad attr Str body Expr Call AttributeLoad NameLoad attr Str keyword NameLoad Expr Call AttributeLoad NameLoad attr Str keyword NameLoad Expr Call AttributeLoad NameLoad attr Str keyword NameLoad Expr Call AttributeLoad NameLoad attr Str keyword NameLoad Expr Call AttributeLoad NameLoad attr Str keyword NameLoad Expr Call AttributeLoad NameLoad attr Str keyword NameLoad Expr Call AttributeLoad NameLoad attr Str keyword NameLoad Assign NameStore Call AttributeLoad NameLoad attr Str keyword NameLoad keyword AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad Call AttributeLoad SubscriptLoad Call AttributeLoad NameLoad attr Index Num attr Str attr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Str keyword NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad If UnaryOpNot Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad With Call NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr Str keyword NameLoad For NameStore NameLoad body Expr Call AttributeLoad NameLoad attr Call AttributeLoad Str attr SubscriptLoad NameLoad Index Num SubscriptLoad NameLoad Index Num keyword NameLoad orelse If CompareEq AttributeLoad NameLoad attr Str body With Call NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr Str keyword NameLoad For NameStore NameLoad body Expr Call AttributeLoad NameLoad attr Call AttributeLoad Str attr SubscriptLoad NameLoad Index Num SubscriptLoad NameLoad Index Num keyword NameLoad With Call NameLoad NameLoad body If CompareGt Call NameLoad NameLoad Num body Expr Call AttributeLoad NameLoad attr Call AttributeLoad Str attr SubscriptLoad SubscriptLoad NameLoad Index Num Index Num keyword NameLoad If CompareEq AttributeLoad NameLoad attr Str body Expr Call AttributeLoad NameLoad attr Str keyword NameLoad Expr Call AttributeLoad NameLoad attr Str keyword NameLoad Expr Call AttributeLoad NameLoad attr Str keyword NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad Str attr SubscriptLoad SubscriptLoad NameLoad Index Num Index Num keyword NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad Str attr SubscriptLoad SubscriptLoad NameLoad Index Num Index Num keyword NameLoad orelse Expr Call AttributeLoad NameLoad attr Call AttributeLoad Str attr SubscriptLoad SubscriptLoad NameLoad Index Num Index Num keyword NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad Str attr SubscriptLoad SubscriptLoad NameLoad Index Num Index Num SubscriptLoad SubscriptLoad NameLoad Index Num Index Num keyword NameLoad Expr Call AttributeLoad NameLoad attr Str keyword NameLoad For NameStore Call AttributeLoad NameLoad attr Str body If CompareNotEq NameLoad Str body If Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad orelse If Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad For NameStore Call AttributeLoad NameLoad attr NameLoad body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad If Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad Str orelse If Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad NameLoad If CompareGt Call NameLoad NameLoad Num body Expr Call AttributeLoad NameLoad attr Str keyword NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad Str attr NameLoad keyword NameLoad For NameStore NameLoad body If AttributeLoad NameLoad attr body Print Call AttributeLoad Str attr SubscriptLoad NameLoad Index Num SubscriptLoad SubscriptLoad NameLoad Index Num Index Num SubscriptLoad NameLoad Index Num orelse Expr Call AttributeLoad NameLoad attr Call AttributeLoad Str attr SubscriptLoad NameLoad Index Num SubscriptLoad SubscriptLoad NameLoad Index Num Index Num SubscriptLoad NameLoad Index Num keyword NameLoad decorator_list If CompareEq NameLoad Str body Assign NameStore Call AttributeLoad NameLoad attr keyword Str Expr Call AttributeLoad NameLoad attr Str keyword Str Expr Call AttributeLoad NameLoad attr Str keyword Str keyword Str keyword Str Assign NameStore Call AttributeLoad NameLoad attr If CompareIn AttributeLoad NameLoad attr ListLoad Str Str Str body Expr Call NameLoad NameLoad
N/A N/A os N/A sys N/A glob N/A locale N/A shutil N/A argparse N/A subprocess N/A __author__ coderzh N/A GIT_REPO N/A N/A origin gh-pages git@github.com:coderzh/hugo-blog-deployed.git N/A gitcafe gh-pages git@gitcafe.com:coderzh/coderzh-hugo-blog.git N/A DEPLOY_DIR gh-pages ChDir N/A N/A N/A Context manager for changing the current working directory __init__ N/A N/A self new_path N/A N/A N/A N/A self newPath N/A N/A N/A os path expanduser new_path N/A __enter__ N/A N/A self N/A N/A N/A N/A self savedPath N/A N/A os getcwd N/A N/A N/A os chdir N/A self newPath N/A __exit__ N/A N/A self exception_type exception_value traceback N/A N/A N/A N/A N/A os chdir N/A self savedPath N/A N/A deploy N/A N/A args N/A N/A N/A current_dir N/A N/A N/A os path dirname N/A N/A N/A os path abspath __file__ N/A parent_dir N/A N/A N/A os path abspath N/A N/A N/A os path join current_dir .. N/A public_dir N/A N/A N/A os path join current_dir public N/A commit_msg N/A N/A ChDir current_dir N/A N/A N/A N/A N/A os path exists public_dir N/A N/A N/A N/A shutil rmtree public_dir N/A N/A N/A args type auto N/A N/A N/A N/A subprocess call git fetch origin shell True N/A N/A N/A subprocess call git checkout master shell True N/A N/A N/A subprocess call git reset --hard origin/master shell True N/A N/A N/A subprocess call git clean -fdx shell True N/A N/A N/A subprocess call git submodule init shell True N/A N/A N/A subprocess call git submodule update shell True N/A N/A N/A subprocess call git submodule foreach git pull --rebase origin master shell True N/A s N/A N/A subprocess Popen git log -1 --pretty=format:"%s" shell True stdout N/A subprocess PIPE N/A commit_msg N/A N/A N/A N/A N/A N/A N/A s communicate N/A 0 decode utf-8 encode N/A N/A locale getpreferredencoding N/A N/A N/A subprocess call hugo -v --cacheDir="./cache" shell True N/A deploy_dir N/A N/A N/A os path join parent_dir DEPLOY_DIR N/A N/A N/A N/A N/A os path exists deploy_dir N/A N/A N/A N/A os makedirs deploy_dir N/A N/A ChDir deploy_dir N/A N/A N/A N/A subprocess call git init shell True N/A repo GIT_REPO N/A N/A N/A N/A subprocess call N/A N/A git remote add {0} {1} format N/A repo N/A 0 N/A repo N/A 2 shell True N/A N/A N/A N/A args type first N/A N/A N/A ChDir deploy_dir N/A N/A N/A N/A subprocess call git init shell True N/A repo GIT_REPO N/A N/A N/A N/A subprocess call N/A N/A git remote add {0} {1} format N/A repo N/A 0 N/A repo N/A 2 shell True N/A N/A ChDir deploy_dir N/A N/A N/A N/A len GIT_REPO 0 N/A N/A N/A N/A subprocess call N/A N/A git fetch {0} format N/A N/A GIT_REPO N/A 0 N/A 0 shell True N/A N/A N/A args type first N/A N/A N/A N/A subprocess call git checkout --orphan temp shell True N/A N/A N/A subprocess call git rm --cached -r . shell True N/A N/A N/A subprocess call git clean -fdx shell True N/A N/A N/A subprocess call N/A N/A git branch -D {0} format N/A N/A GIT_REPO N/A 0 N/A 1 shell True N/A N/A N/A subprocess call N/A N/A git checkout -b {0} format N/A N/A GIT_REPO N/A 0 N/A 1 shell True N/A N/A N/A N/A subprocess call N/A N/A git checkout {0} format N/A N/A GIT_REPO N/A 0 N/A 1 shell True N/A N/A N/A subprocess call N/A N/A git reset --hard {0}/{1} format N/A N/A GIT_REPO N/A 0 N/A 0 N/A N/A GIT_REPO N/A 0 N/A 1 shell True N/A N/A N/A subprocess call git clean -fdx shell True N/A f N/A N/A os listdir . N/A N/A N/A f .git N/A N/A N/A N/A N/A os path isfile f N/A N/A N/A N/A os remove f N/A N/A N/A N/A N/A os path isdir f N/A N/A N/A N/A shutil rmtree f N/A f N/A N/A os listdir public_dir N/A N/A file_path N/A N/A N/A os path join public_dir f N/A N/A N/A N/A os path isfile file_path N/A N/A N/A N/A shutil copy file_path . N/A N/A N/A N/A N/A os path isdir file_path N/A N/A N/A N/A shutil copytree file_path f N/A N/A N/A len GIT_REPO 0 N/A N/A N/A N/A subprocess call git add --all shell True N/A N/A N/A subprocess call N/A N/A git commit -a -m "{0}" format commit_msg shell True N/A repo GIT_REPO N/A N/A N/A args test N/A N/A N/A N/A git push {0} {1}:{2} -u format N/A repo N/A 0 N/A N/A GIT_REPO N/A 0 N/A 1 N/A repo N/A 1 N/A N/A N/A N/A subprocess call N/A N/A git push {0} {1}:{2} -u format N/A repo N/A 0 N/A N/A GIT_REPO N/A 0 N/A 1 N/A repo N/A 1 shell True N/A N/A N/A __name__ __main__ N/A N/A parser N/A N/A argparse ArgumentParser description deploy hugo N/A N/A N/A parser add_argument type help auto or manual N/A N/A N/A parser add_argument -t dest test action store_true help for test N/A args N/A N/A parser parse_args N/A N/A N/A args type N/A auto manual first N/A N/A N/A deploy args