Permalink
Browse files

Simple wrapper around the elfinder file browser and python cgi connector

  • Loading branch information...
josephtate committed Mar 2, 2011
1 parent b16d820 commit 717431512877489d93476a39a60e1019857a7c79
View
@@ -0,0 +1,25 @@
+SHELL:= $(shell which bash)
+
+ELFINDERDIR=elFinder
+ELFINDERLOC=git://github.com/josephtate/elFinder.git
+TRUNKVER=trunk
+BASEDIR=tw2/jqplugins/elfinder
+STATICDIR=$(BASEDIR)/static/jquery/plugins/elfinder/$(TRUNKVER)
+
+update: $(ELFINDERDIR)
+ cd $(ELFINDERDIR) && git pull -u $(ELFINDERLOC)
+ cd $(ELFINDERDIR)/src && $(MAKE) elfinder
+ cp $(ELFINDERDIR)/src/connectors/python/elFinder.py $(BASEDIR)/connector
+ cp $(ELFINDERDIR)/src/connectors/python/connector.py $(BASEDIR)/connector/cgi.py
+ mkdir -p $(STATICDIR)/js
+ mkdir -p $(STATICDIR)/css
+ mkdir -p $(STATICDIR)/images
+ cp $(ELFINDERDIR)/src/elfinder.css $(STATICDIR)/css
+ cp $(ELFINDERDIR)/src/elfinder.full.js $(STATICDIR)/js
+ cp $(ELFINDERDIR)/src/elfinder.min.js $(STATICDIR)/js
+ rsync -r --delete $(ELFINDERDIR)/src/images/ $(STATICDIR)/images/
+
+$(ELFINDERDIR):
+ @[ -d $(ELFINDERDIR) ] || { git clone $(ELFINDERLOC) $(ELFINDERDIR); }
+
+clone: $(ELFINDERDIR)
@@ -106,4 +106,4 @@
# elf.httpResponse['file'].close()
# else:
# print json.dumps(elf.httpResponse, indent = True)
-#
+#
@@ -141,7 +141,6 @@ def _reset_run(self):
self._im = None
self._sp = None
-
self._time = time.time()
t = datetime.fromtimestamp(self._time)
self._today = time.mktime(datetime(t.year, t.month, t.day).timetuple())
@@ -1466,8 +1465,8 @@ def __runSubProcess(self, cmd, validReturn = [0]):
self._sp = subprocess
try:
- sp = self._sp.Popen(cmd, shell = False, stdout = self._sp.PIPE, stderr = self._sp.PIPE)
- out, err = sp.communicate()
+ sp = self._sp.Popen(cmd, shell = False, stdout = self._sp.PIPE, stderr = self._sp.PIPE, stdin = self._sp.PIPE)
+ out, err = sp.communicate('')
ret = sp.returncode
# print cmd, ret, out, err
except:
@@ -2,5 +2,5 @@
_plugin_css_dirname_ = 'static/jquery/plugins/%(name)s/%(version)s/%(subdir)s'
_elfinder_name_ = 'elfinder'
_elfinder_basename_ = 'elfinder'
-_elfinder_version_ = '1.1'
+_elfinder_version_ = 'trunk'
_elfinder_debug_ = 'full'
Oops, something went wrong.

0 comments on commit 7174315

Please sign in to comment.