forked from dgelessus/pythonista-scripts
-
Notifications
You must be signed in to change notification settings - Fork 0
/
filenav_plugin.py
26 lines (24 loc) · 850 Bytes
/
filenav_plugin.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# -*- coding: utf-8 -*-
###############################################################################
# filenav_plugin for ShellistaExt
# http://github.com/dgelessus/pythonista-scripts/blob/master/filenav_plugin.py
# requires filenav by dgelessus (has to be importable, i. e. in PATH)
# http://github.com/dgelessus/pythonista-scripts/blob/master/filenav.py
# and ShellistaExt by briarfox
# http://github.com/briarfox/ShellistaExt
###############################################################################
from .. tools.toolbox import bash
import os.path
def main(line):
try:
import filenav
except ImportError as err:
print("Failed to load filenav: " + err.message)
return
print(list)
b = bash(list)
print(b)
if b:
filenav.run(b[0])
else:
filenav.run(os.path.fullpath("."))