Skip to content

Commit

Permalink
Updated command syntax (#8)
Browse files Browse the repository at this point in the history
  • Loading branch information
dogversioning authored Dec 17, 2022
1 parent cde6176 commit f455641
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,6 @@ Reads Apache Parquet files in Sublime Text using they python parquet-tools packa

# Requirements

You'll need to have a python environment in your path, and then install [parquet-tools](https://github.com/ktrueda/parquet-tools) with `pip install parquet-tools`.
- Install [parquet-tools](https://github.com/ktrueda/parquet-tools) with `pip install parquet-tools`.
- On Windows: make sure your python environment is in your path
- On Mac/Linux: create a symlink from your python bin folder to the parquet-tools binary someplace on the system path, like `/usr/local/bin`
5 changes: 3 additions & 2 deletions parquet.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
COMMAND_NOT_FOUND_MSG = """'parquet-tools' not found.\n
Make sure python is in your PATH and install with 'pip install parquet-tools'
"""
PYTHON_COMMAND_LINE = "parquet-tools csv {0}"
PYTHON_COMMAND = ["parquet-tools", "csv"]
UNICODE_ERROR = "Non-unicode characters prevented rendering: \n"


Expand All @@ -32,7 +32,8 @@ class ParquetCommand(sublime_plugin.TextCommand):
def run(self, edit, filename=None):
if filename is None or not filename.endswith(".parquet"):
return
command = PYTHON_COMMAND_LINE.format('"' + filename + '"')
command = PYTHON_COMMAND
command.append(filename)
pos = 0
try:
for line in run_command(command):
Expand Down

0 comments on commit f455641

Please sign in to comment.