Improving the readme.

This commit is contained in:
David Diaz 2017-10-21 14:35:04 -06:00
parent 3110bf6201
commit 85c6f15626
3 changed files with 10 additions and 8 deletions

View File

@ -1,4 +1,6 @@
# Beau # Sublime Beau
![Usage Example](/images/demo.gif?raw=true)
## Description ## Description
This plugin allows you to use beau on your beau files without having to leave sublime. This plugin allows you to use beau on your beau files without having to leave sublime.

14
beau.py
View File

@ -26,13 +26,7 @@ class BeauCommand(sublime_plugin.TextCommand):
active_window.status_message('Beau can only be ran on yaml files.') active_window.status_message('Beau can only be ran on yaml files.')
return return
print([ print('Using ' + self.path)
settings,
self.path,
'-c',
active_view.file_name(),
'--clean-list'
])
proc = Popen([ proc = Popen([
self.path, self.path,
@ -91,10 +85,16 @@ class BeauCommand(sublime_plugin.TextCommand):
alias alias
], stdin=PIPE, stdout=PIPE, stderr=PIPE, shell=True) ], stdin=PIPE, stdout=PIPE, stderr=PIPE, shell=True)
for line in iter(proc.stderr.readline, b''):
print(line)
active_window.status_message(line.decode("utf-8"))
response = [] response = []
for line in iter(proc.stdout.readline, b''): for line in iter(proc.stdout.readline, b''):
response.append(line.rstrip()) response.append(line.rstrip())
active_window.status_message('')
status, endpoint, headers, body = response status, endpoint, headers, body = response
status = status.decode('utf-8') status = status.decode('utf-8')

BIN
images/demo.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 269 KiB