コード例 #1
0
ファイル: run.py プロジェクト: euphoris/another-springnote
def convert_main():
    print (
'=' * 80 +
"""
Another Springnote > 변환
""" +
'=' * 80 +
"""
Choose option / 다음 중 선택하십시오:
1) Convert to HTML / HTML로 변환
0) Exit from this menu / 이 메뉴 나가기
""" +
'=' * 80)
    while True:
        cmd = input("> ")
        cmd = cmd.strip()
        if cmd in ['0']:
            return
        elif cmd in ['1']:
            import convert_html
            convert_html.main()
            print("Completed.")
            input("Press [enter]: ")
            return
        elif cmd in ['test']:
            import convert_dokuwiki_sabal
            convert_dokuwiki_sabal.main()
            print("Completed.")
            input("Press [enter]: ")
            return
コード例 #2
0
ファイル: run.py プロジェクト: sabal/another-springnote
def main():
    try:
        # Change IDLE encoding
        import sys
        sys.stdout.encoding = 'utf8'
    except TypeError:
        pass

    welcome_message = (
'=' * 80 +
"""
Springnote converter
""" +
'=' * 80 +
"""
Choose option / 다음 중 선택하십시오:
1) Convert to HTML / HTML로 변환
2) Convert to MediaWiki / MediaWiki로 변환
0) Quit / 종료
""" +
'=' * 80)
    print welcome_message
    while True:
        cmd = input("> ")
        cmd = cmd.strip()
        if cmd in ['0']:
            print("Closing the program.  Close the window or press ctrl-d.")
            return
        elif cmd in ['1']:
            import convert_html
            convert_html.main()
        elif cmd in ['2']:
            import convert_mediawiki
            convert_mediawiki.main()
        elif cmd in ['test']:
            import convert_dokuwiki_sabal
            convert_dokuwiki_sabal.main()
        else:
            continue
        print("Completed.")
        input("Press [enter]: ")
        print welcome_message