comparison my-enso-commands.py @ 15:e96c724d3c7a

Removed kiritsu-related commands.
author Atul Varma <varmaa@toolness.com>
date Sat, 27 Mar 2010 15:13:15 -0700
parents 9ca05d02bc3a
children 1fee5287e956
comparison
equal deleted inserted replaced
14:9ca05d02bc3a 15:e96c724d3c7a
857 857
858 _runAppleScript( 858 _runAppleScript(
859 "tell application \"iTunes\" to back track" 859 "tell application \"iTunes\" to back track"
860 ) 860 )
861 861
862 KIRITSU_DIR = "/Users/varmaa/Documents/kiritsu"
863 KIRITSU_MAKE_SCRIPT = "%s/MakeEverything.py" % KIRITSU_DIR
864 KIRITSU_VIEW_TEMPLATE = "file://%s/%s.html"
865 KIRITSU_VIEWS = ["work", "play", "chores"]
866
867 def cmd_refresh_kiritsu(ensoapi):
868 """
869 Refreshes all kiritsu feeds.
870 """
871
872 popen = subprocess.Popen(
873 [sys.executable,
874 KIRITSU_MAKE_SCRIPT],
875 cwd = KIRITSU_DIR
876 )
877
878 ensoapi.display_message( "Please wait while kiritsu retrieves "
879 "new feeds." )
880
881 while popen.poll() is None:
882 yield
883
884 if popen.returncode != 0:
885 ensoapi.display_message( "An error occurred in Kiritsu." )
886 else:
887 ensoapi.display_message( "Kiritsu is done." )
888
889 def cmd_view( ensoapi, viewname ):
890 """
891 Opens the given kiritsu view.
892 """
893
894 webbrowser.open( KIRITSU_VIEW_TEMPLATE % (KIRITSU_DIR, viewname) )
895
896 cmd_view.valid_args = KIRITSU_VIEWS
897
898 def cmd_html_template(ensoapi): 862 def cmd_html_template(ensoapi):
899 ensoapi.set_selection({"text" : HTML_TEMPLATE}) 863 ensoapi.set_selection({"text" : HTML_TEMPLATE})
900 864
901 HTML_TEMPLATE = """\ 865 HTML_TEMPLATE = """\
902 <html> 866 <html>