diff --git a/Exporter-app.xml b/Exporter-app.xml old mode 100644 new mode 100755 index 7deb7c5..dbb9ba7 --- a/Exporter-app.xml +++ b/Exporter-app.xml @@ -16,7 +16,7 @@ Japanese App name goes here --> - + Exporter 1.0 Exporter diff --git a/Exporter-app.xml b/Exporter-app.xml old mode 100644 new mode 100755 index 7deb7c5..dbb9ba7 --- a/Exporter-app.xml +++ b/Exporter-app.xml @@ -16,7 +16,7 @@ Japanese App name goes here --> - + Exporter 1.0 Exporter diff --git a/Exporter.as b/Exporter.as index 7a2a149..c520e93 100644 --- a/Exporter.as +++ b/Exporter.as @@ -79,43 +79,88 @@ } } - - private function DispatchCommand(msg) + + private var jobQueue:Array = new Array(); + private var activeJob:Job = null; + private function QueueJob(jobParams) { - if (msg.hasOwnProperty("command")) + var job:Job = new Job(jobParams); + jobQueue.push(job); + CheckNewJob(); + } + + private function CheckNewJob() + { + if (activeJob == null && jobQueue.length > 0) { - var cmd = "" + msg.command; - switch (cmd) + activeJob = jobQueue.shift(); + activeJob.Go(JobComplete); + } + } + + private function JobComplete() + { + Trace("Done: " + activeJob.GetID()); + DriverCommand("done", activeJob.GetCompletedData()); + + activeJob = null; + CheckNewJob(); + } + + private function DispatchCommand(cmdData) + { + try + { + Trace("recv: " + typeof(cmdData) + " " + cmdData + " " + cmdData.hasOwnProperty("command")); + if (cmdData.hasOwnProperty("command")) { - case "trace": - Trace(msg.command); - break; - case "quit": - Quit(); - break; - default: - Trace("Recv: " + JSON.stringify(msg)); - break; - } + var cmd = "" + cmdData.command; + Trace("cmd: " + cmd); + switch (cmd) + { + case "trace": + Trace(cmdData.string); + break; + case "exit": + Quit(); + break; + case "job": + QueueJob(cmdData); + break; + default: + Trace("Recv: " + JSON.stringify(cmdData)); + break; + } + } + } catch (e) + { + Print(e.toString()); } } private function DriverRecv(e) { + Trace("recv"); try { - var cmd = driver.readUTF(); - DispatchCommand(JSON.parse(cmd)); + Trace(e.target.bytesAvailable); + var msg = driver.readUTF(); + Trace("msg: " + msg); + Trace("avail: " + e.target.bytesAvailable); + var cmdData = JSON.parse(msg); + Trace("cmdData: " + cmdData + " " + typeof(cmdData)); + DispatchCommand(cmdData); } - catch (e:EOFError) + catch (eof:EOFError) { + Trace("Waiting for more data... " + e.target.bytesAvailable); // wait for more data } - catch (e:IOError) + catch (err:IOError) { Trace("Driver IO error"); } - catch (e) + catch (err) { Trace("Problem reading from driver"); } @@ -138,7 +183,9 @@ { if (driver != null) { - driver.writeUTF(str); + Trace(str); + driver.writeUTF(str); + driver.flush(); } } diff --git a/Exporter-app.xml b/Exporter-app.xml old mode 100644 new mode 100755 index 7deb7c5..dbb9ba7 --- a/Exporter-app.xml +++ b/Exporter-app.xml @@ -16,7 +16,7 @@ Japanese App name goes here --> - + Exporter 1.0 Exporter diff --git a/Exporter.as b/Exporter.as index 7a2a149..c520e93 100644 --- a/Exporter.as +++ b/Exporter.as @@ -79,43 +79,88 @@ } } - - private function DispatchCommand(msg) + + private var jobQueue:Array = new Array(); + private var activeJob:Job = null; + private function QueueJob(jobParams) { - if (msg.hasOwnProperty("command")) + var job:Job = new Job(jobParams); + jobQueue.push(job); + CheckNewJob(); + } + + private function CheckNewJob() + { + if (activeJob == null && jobQueue.length > 0) { - var cmd = "" + msg.command; - switch (cmd) + activeJob = jobQueue.shift(); + activeJob.Go(JobComplete); + } + } + + private function JobComplete() + { + Trace("Done: " + activeJob.GetID()); + DriverCommand("done", activeJob.GetCompletedData()); + + activeJob = null; + CheckNewJob(); + } + + private function DispatchCommand(cmdData) + { + try + { + Trace("recv: " + typeof(cmdData) + " " + cmdData + " " + cmdData.hasOwnProperty("command")); + if (cmdData.hasOwnProperty("command")) { - case "trace": - Trace(msg.command); - break; - case "quit": - Quit(); - break; - default: - Trace("Recv: " + JSON.stringify(msg)); - break; - } + var cmd = "" + cmdData.command; + Trace("cmd: " + cmd); + switch (cmd) + { + case "trace": + Trace(cmdData.string); + break; + case "exit": + Quit(); + break; + case "job": + QueueJob(cmdData); + break; + default: + Trace("Recv: " + JSON.stringify(cmdData)); + break; + } + } + } catch (e) + { + Print(e.toString()); } } private function DriverRecv(e) { + Trace("recv"); try { - var cmd = driver.readUTF(); - DispatchCommand(JSON.parse(cmd)); + Trace(e.target.bytesAvailable); + var msg = driver.readUTF(); + Trace("msg: " + msg); + Trace("avail: " + e.target.bytesAvailable); + var cmdData = JSON.parse(msg); + Trace("cmdData: " + cmdData + " " + typeof(cmdData)); + DispatchCommand(cmdData); } - catch (e:EOFError) + catch (eof:EOFError) { + Trace("Waiting for more data... " + e.target.bytesAvailable); // wait for more data } - catch (e:IOError) + catch (err:IOError) { Trace("Driver IO error"); } - catch (e) + catch (err) { Trace("Problem reading from driver"); } @@ -138,7 +183,9 @@ { if (driver != null) { - driver.writeUTF(str); + Trace(str); + driver.writeUTF(str); + driver.flush(); } } diff --git a/Exporter.exe b/Exporter.exe old mode 100644 new mode 100755 index 829fdd0..745928e --- a/Exporter.exe +++ b/Exporter.exe Binary files differ diff --git a/Exporter-app.xml b/Exporter-app.xml old mode 100644 new mode 100755 index 7deb7c5..dbb9ba7 --- a/Exporter-app.xml +++ b/Exporter-app.xml @@ -16,7 +16,7 @@ Japanese App name goes here --> - + Exporter 1.0 Exporter diff --git a/Exporter.as b/Exporter.as index 7a2a149..c520e93 100644 --- a/Exporter.as +++ b/Exporter.as @@ -79,43 +79,88 @@ } } - - private function DispatchCommand(msg) + + private var jobQueue:Array = new Array(); + private var activeJob:Job = null; + private function QueueJob(jobParams) { - if (msg.hasOwnProperty("command")) + var job:Job = new Job(jobParams); + jobQueue.push(job); + CheckNewJob(); + } + + private function CheckNewJob() + { + if (activeJob == null && jobQueue.length > 0) { - var cmd = "" + msg.command; - switch (cmd) + activeJob = jobQueue.shift(); + activeJob.Go(JobComplete); + } + } + + private function JobComplete() + { + Trace("Done: " + activeJob.GetID()); + DriverCommand("done", activeJob.GetCompletedData()); + + activeJob = null; + CheckNewJob(); + } + + private function DispatchCommand(cmdData) + { + try + { + Trace("recv: " + typeof(cmdData) + " " + cmdData + " " + cmdData.hasOwnProperty("command")); + if (cmdData.hasOwnProperty("command")) { - case "trace": - Trace(msg.command); - break; - case "quit": - Quit(); - break; - default: - Trace("Recv: " + JSON.stringify(msg)); - break; - } + var cmd = "" + cmdData.command; + Trace("cmd: " + cmd); + switch (cmd) + { + case "trace": + Trace(cmdData.string); + break; + case "exit": + Quit(); + break; + case "job": + QueueJob(cmdData); + break; + default: + Trace("Recv: " + JSON.stringify(cmdData)); + break; + } + } + } catch (e) + { + Print(e.toString()); } } private function DriverRecv(e) { + Trace("recv"); try { - var cmd = driver.readUTF(); - DispatchCommand(JSON.parse(cmd)); + Trace(e.target.bytesAvailable); + var msg = driver.readUTF(); + Trace("msg: " + msg); + Trace("avail: " + e.target.bytesAvailable); + var cmdData = JSON.parse(msg); + Trace("cmdData: " + cmdData + " " + typeof(cmdData)); + DispatchCommand(cmdData); } - catch (e:EOFError) + catch (eof:EOFError) { + Trace("Waiting for more data... " + e.target.bytesAvailable); // wait for more data } - catch (e:IOError) + catch (err:IOError) { Trace("Driver IO error"); } - catch (e) + catch (err) { Trace("Problem reading from driver"); } @@ -138,7 +183,9 @@ { if (driver != null) { - driver.writeUTF(str); + Trace(str); + driver.writeUTF(str); + driver.flush(); } } diff --git a/Exporter.exe b/Exporter.exe old mode 100644 new mode 100755 index 829fdd0..745928e --- a/Exporter.exe +++ b/Exporter.exe Binary files differ diff --git a/Exporter.fla b/Exporter.fla old mode 100644 new mode 100755 index 62c62d2..a0f0ea8 --- a/Exporter.fla +++ b/Exporter.fla Binary files differ diff --git a/Exporter-app.xml b/Exporter-app.xml old mode 100644 new mode 100755 index 7deb7c5..dbb9ba7 --- a/Exporter-app.xml +++ b/Exporter-app.xml @@ -16,7 +16,7 @@ Japanese App name goes here --> - + Exporter 1.0 Exporter diff --git a/Exporter.as b/Exporter.as index 7a2a149..c520e93 100644 --- a/Exporter.as +++ b/Exporter.as @@ -79,43 +79,88 @@ } } - - private function DispatchCommand(msg) + + private var jobQueue:Array = new Array(); + private var activeJob:Job = null; + private function QueueJob(jobParams) { - if (msg.hasOwnProperty("command")) + var job:Job = new Job(jobParams); + jobQueue.push(job); + CheckNewJob(); + } + + private function CheckNewJob() + { + if (activeJob == null && jobQueue.length > 0) { - var cmd = "" + msg.command; - switch (cmd) + activeJob = jobQueue.shift(); + activeJob.Go(JobComplete); + } + } + + private function JobComplete() + { + Trace("Done: " + activeJob.GetID()); + DriverCommand("done", activeJob.GetCompletedData()); + + activeJob = null; + CheckNewJob(); + } + + private function DispatchCommand(cmdData) + { + try + { + Trace("recv: " + typeof(cmdData) + " " + cmdData + " " + cmdData.hasOwnProperty("command")); + if (cmdData.hasOwnProperty("command")) { - case "trace": - Trace(msg.command); - break; - case "quit": - Quit(); - break; - default: - Trace("Recv: " + JSON.stringify(msg)); - break; - } + var cmd = "" + cmdData.command; + Trace("cmd: " + cmd); + switch (cmd) + { + case "trace": + Trace(cmdData.string); + break; + case "exit": + Quit(); + break; + case "job": + QueueJob(cmdData); + break; + default: + Trace("Recv: " + JSON.stringify(cmdData)); + break; + } + } + } catch (e) + { + Print(e.toString()); } } private function DriverRecv(e) { + Trace("recv"); try { - var cmd = driver.readUTF(); - DispatchCommand(JSON.parse(cmd)); + Trace(e.target.bytesAvailable); + var msg = driver.readUTF(); + Trace("msg: " + msg); + Trace("avail: " + e.target.bytesAvailable); + var cmdData = JSON.parse(msg); + Trace("cmdData: " + cmdData + " " + typeof(cmdData)); + DispatchCommand(cmdData); } - catch (e:EOFError) + catch (eof:EOFError) { + Trace("Waiting for more data... " + e.target.bytesAvailable); // wait for more data } - catch (e:IOError) + catch (err:IOError) { Trace("Driver IO error"); } - catch (e) + catch (err) { Trace("Problem reading from driver"); } @@ -138,7 +183,9 @@ { if (driver != null) { - driver.writeUTF(str); + Trace(str); + driver.writeUTF(str); + driver.flush(); } } diff --git a/Exporter.exe b/Exporter.exe old mode 100644 new mode 100755 index 829fdd0..745928e --- a/Exporter.exe +++ b/Exporter.exe Binary files differ diff --git a/Exporter.fla b/Exporter.fla old mode 100644 new mode 100755 index 62c62d2..a0f0ea8 --- a/Exporter.fla +++ b/Exporter.fla Binary files differ diff --git a/Exporter.swf b/Exporter.swf index 60adb24..df8c3fb 100644 --- a/Exporter.swf +++ b/Exporter.swf Binary files differ diff --git a/Exporter-app.xml b/Exporter-app.xml old mode 100644 new mode 100755 index 7deb7c5..dbb9ba7 --- a/Exporter-app.xml +++ b/Exporter-app.xml @@ -16,7 +16,7 @@ Japanese App name goes here --> - + Exporter 1.0 Exporter diff --git a/Exporter.as b/Exporter.as index 7a2a149..c520e93 100644 --- a/Exporter.as +++ b/Exporter.as @@ -79,43 +79,88 @@ } } - - private function DispatchCommand(msg) + + private var jobQueue:Array = new Array(); + private var activeJob:Job = null; + private function QueueJob(jobParams) { - if (msg.hasOwnProperty("command")) + var job:Job = new Job(jobParams); + jobQueue.push(job); + CheckNewJob(); + } + + private function CheckNewJob() + { + if (activeJob == null && jobQueue.length > 0) { - var cmd = "" + msg.command; - switch (cmd) + activeJob = jobQueue.shift(); + activeJob.Go(JobComplete); + } + } + + private function JobComplete() + { + Trace("Done: " + activeJob.GetID()); + DriverCommand("done", activeJob.GetCompletedData()); + + activeJob = null; + CheckNewJob(); + } + + private function DispatchCommand(cmdData) + { + try + { + Trace("recv: " + typeof(cmdData) + " " + cmdData + " " + cmdData.hasOwnProperty("command")); + if (cmdData.hasOwnProperty("command")) { - case "trace": - Trace(msg.command); - break; - case "quit": - Quit(); - break; - default: - Trace("Recv: " + JSON.stringify(msg)); - break; - } + var cmd = "" + cmdData.command; + Trace("cmd: " + cmd); + switch (cmd) + { + case "trace": + Trace(cmdData.string); + break; + case "exit": + Quit(); + break; + case "job": + QueueJob(cmdData); + break; + default: + Trace("Recv: " + JSON.stringify(cmdData)); + break; + } + } + } catch (e) + { + Print(e.toString()); } } private function DriverRecv(e) { + Trace("recv"); try { - var cmd = driver.readUTF(); - DispatchCommand(JSON.parse(cmd)); + Trace(e.target.bytesAvailable); + var msg = driver.readUTF(); + Trace("msg: " + msg); + Trace("avail: " + e.target.bytesAvailable); + var cmdData = JSON.parse(msg); + Trace("cmdData: " + cmdData + " " + typeof(cmdData)); + DispatchCommand(cmdData); } - catch (e:EOFError) + catch (eof:EOFError) { + Trace("Waiting for more data... " + e.target.bytesAvailable); // wait for more data } - catch (e:IOError) + catch (err:IOError) { Trace("Driver IO error"); } - catch (e) + catch (err) { Trace("Problem reading from driver"); } @@ -138,7 +183,9 @@ { if (driver != null) { - driver.writeUTF(str); + Trace(str); + driver.writeUTF(str); + driver.flush(); } } diff --git a/Exporter.exe b/Exporter.exe old mode 100644 new mode 100755 index 829fdd0..745928e --- a/Exporter.exe +++ b/Exporter.exe Binary files differ diff --git a/Exporter.fla b/Exporter.fla old mode 100644 new mode 100755 index 62c62d2..a0f0ea8 --- a/Exporter.fla +++ b/Exporter.fla Binary files differ diff --git a/Exporter.swf b/Exporter.swf index 60adb24..df8c3fb 100644 --- a/Exporter.swf +++ b/Exporter.swf Binary files differ diff --git a/Job.as b/Job.as new file mode 100755 index 0000000..859be61 --- /dev/null +++ b/Job.as @@ -0,0 +1,31 @@ +package +{ + import flash.utils.*; + public class Job + { + private var callback; + + private var id:int; + public function GetID():int { return this.id; } + public function Job(details) + { + id = parseInt(details["id"]); + Exporter.Instance.Trace("new job: " + id); + } + public function Go(callback) + { + Exporter.Instance.Trace("Job.Go() " + id); + this.callback = callback; + setTimeout(Done, 500); + } + public function Done() + { + Exporter.Instance.Trace("Job.Done() " + id); + this.callback(); + } + public function GetCompletedData() + { + return {id:id}; + } + } +} \ No newline at end of file diff --git a/Exporter-app.xml b/Exporter-app.xml old mode 100644 new mode 100755 index 7deb7c5..dbb9ba7 --- a/Exporter-app.xml +++ b/Exporter-app.xml @@ -16,7 +16,7 @@ Japanese App name goes here --> - + Exporter 1.0 Exporter diff --git a/Exporter.as b/Exporter.as index 7a2a149..c520e93 100644 --- a/Exporter.as +++ b/Exporter.as @@ -79,43 +79,88 @@ } } - - private function DispatchCommand(msg) + + private var jobQueue:Array = new Array(); + private var activeJob:Job = null; + private function QueueJob(jobParams) { - if (msg.hasOwnProperty("command")) + var job:Job = new Job(jobParams); + jobQueue.push(job); + CheckNewJob(); + } + + private function CheckNewJob() + { + if (activeJob == null && jobQueue.length > 0) { - var cmd = "" + msg.command; - switch (cmd) + activeJob = jobQueue.shift(); + activeJob.Go(JobComplete); + } + } + + private function JobComplete() + { + Trace("Done: " + activeJob.GetID()); + DriverCommand("done", activeJob.GetCompletedData()); + + activeJob = null; + CheckNewJob(); + } + + private function DispatchCommand(cmdData) + { + try + { + Trace("recv: " + typeof(cmdData) + " " + cmdData + " " + cmdData.hasOwnProperty("command")); + if (cmdData.hasOwnProperty("command")) { - case "trace": - Trace(msg.command); - break; - case "quit": - Quit(); - break; - default: - Trace("Recv: " + JSON.stringify(msg)); - break; - } + var cmd = "" + cmdData.command; + Trace("cmd: " + cmd); + switch (cmd) + { + case "trace": + Trace(cmdData.string); + break; + case "exit": + Quit(); + break; + case "job": + QueueJob(cmdData); + break; + default: + Trace("Recv: " + JSON.stringify(cmdData)); + break; + } + } + } catch (e) + { + Print(e.toString()); } } private function DriverRecv(e) { + Trace("recv"); try { - var cmd = driver.readUTF(); - DispatchCommand(JSON.parse(cmd)); + Trace(e.target.bytesAvailable); + var msg = driver.readUTF(); + Trace("msg: " + msg); + Trace("avail: " + e.target.bytesAvailable); + var cmdData = JSON.parse(msg); + Trace("cmdData: " + cmdData + " " + typeof(cmdData)); + DispatchCommand(cmdData); } - catch (e:EOFError) + catch (eof:EOFError) { + Trace("Waiting for more data... " + e.target.bytesAvailable); // wait for more data } - catch (e:IOError) + catch (err:IOError) { Trace("Driver IO error"); } - catch (e) + catch (err) { Trace("Problem reading from driver"); } @@ -138,7 +183,9 @@ { if (driver != null) { - driver.writeUTF(str); + Trace(str); + driver.writeUTF(str); + driver.flush(); } } diff --git a/Exporter.exe b/Exporter.exe old mode 100644 new mode 100755 index 829fdd0..745928e --- a/Exporter.exe +++ b/Exporter.exe Binary files differ diff --git a/Exporter.fla b/Exporter.fla old mode 100644 new mode 100755 index 62c62d2..a0f0ea8 --- a/Exporter.fla +++ b/Exporter.fla Binary files differ diff --git a/Exporter.swf b/Exporter.swf index 60adb24..df8c3fb 100644 --- a/Exporter.swf +++ b/Exporter.swf Binary files differ diff --git a/Job.as b/Job.as new file mode 100755 index 0000000..859be61 --- /dev/null +++ b/Job.as @@ -0,0 +1,31 @@ +package +{ + import flash.utils.*; + public class Job + { + private var callback; + + private var id:int; + public function GetID():int { return this.id; } + public function Job(details) + { + id = parseInt(details["id"]); + Exporter.Instance.Trace("new job: " + id); + } + public function Go(callback) + { + Exporter.Instance.Trace("Job.Go() " + id); + this.callback = callback; + setTimeout(Done, 500); + } + public function Done() + { + Exporter.Instance.Trace("Job.Done() " + id); + this.callback(); + } + public function GetCompletedData() + { + return {id:id}; + } + } +} \ No newline at end of file diff --git a/args.py b/args.py index ba9e26b..72e946d 100644 --- a/args.py +++ b/args.py @@ -78,4 +78,4 @@ path = abspath(path) if not os.path.isdir(path) or not os.path.isfile(file): return False - return os.path.commonprefix(path, file) == path + return os.path.commonprefix([path, file]) == path diff --git a/Exporter-app.xml b/Exporter-app.xml old mode 100644 new mode 100755 index 7deb7c5..dbb9ba7 --- a/Exporter-app.xml +++ b/Exporter-app.xml @@ -16,7 +16,7 @@ Japanese App name goes here --> - + Exporter 1.0 Exporter diff --git a/Exporter.as b/Exporter.as index 7a2a149..c520e93 100644 --- a/Exporter.as +++ b/Exporter.as @@ -79,43 +79,88 @@ } } - - private function DispatchCommand(msg) + + private var jobQueue:Array = new Array(); + private var activeJob:Job = null; + private function QueueJob(jobParams) { - if (msg.hasOwnProperty("command")) + var job:Job = new Job(jobParams); + jobQueue.push(job); + CheckNewJob(); + } + + private function CheckNewJob() + { + if (activeJob == null && jobQueue.length > 0) { - var cmd = "" + msg.command; - switch (cmd) + activeJob = jobQueue.shift(); + activeJob.Go(JobComplete); + } + } + + private function JobComplete() + { + Trace("Done: " + activeJob.GetID()); + DriverCommand("done", activeJob.GetCompletedData()); + + activeJob = null; + CheckNewJob(); + } + + private function DispatchCommand(cmdData) + { + try + { + Trace("recv: " + typeof(cmdData) + " " + cmdData + " " + cmdData.hasOwnProperty("command")); + if (cmdData.hasOwnProperty("command")) { - case "trace": - Trace(msg.command); - break; - case "quit": - Quit(); - break; - default: - Trace("Recv: " + JSON.stringify(msg)); - break; - } + var cmd = "" + cmdData.command; + Trace("cmd: " + cmd); + switch (cmd) + { + case "trace": + Trace(cmdData.string); + break; + case "exit": + Quit(); + break; + case "job": + QueueJob(cmdData); + break; + default: + Trace("Recv: " + JSON.stringify(cmdData)); + break; + } + } + } catch (e) + { + Print(e.toString()); } } private function DriverRecv(e) { + Trace("recv"); try { - var cmd = driver.readUTF(); - DispatchCommand(JSON.parse(cmd)); + Trace(e.target.bytesAvailable); + var msg = driver.readUTF(); + Trace("msg: " + msg); + Trace("avail: " + e.target.bytesAvailable); + var cmdData = JSON.parse(msg); + Trace("cmdData: " + cmdData + " " + typeof(cmdData)); + DispatchCommand(cmdData); } - catch (e:EOFError) + catch (eof:EOFError) { + Trace("Waiting for more data... " + e.target.bytesAvailable); // wait for more data } - catch (e:IOError) + catch (err:IOError) { Trace("Driver IO error"); } - catch (e) + catch (err) { Trace("Problem reading from driver"); } @@ -138,7 +183,9 @@ { if (driver != null) { - driver.writeUTF(str); + Trace(str); + driver.writeUTF(str); + driver.flush(); } } diff --git a/Exporter.exe b/Exporter.exe old mode 100644 new mode 100755 index 829fdd0..745928e --- a/Exporter.exe +++ b/Exporter.exe Binary files differ diff --git a/Exporter.fla b/Exporter.fla old mode 100644 new mode 100755 index 62c62d2..a0f0ea8 --- a/Exporter.fla +++ b/Exporter.fla Binary files differ diff --git a/Exporter.swf b/Exporter.swf index 60adb24..df8c3fb 100644 --- a/Exporter.swf +++ b/Exporter.swf Binary files differ diff --git a/Job.as b/Job.as new file mode 100755 index 0000000..859be61 --- /dev/null +++ b/Job.as @@ -0,0 +1,31 @@ +package +{ + import flash.utils.*; + public class Job + { + private var callback; + + private var id:int; + public function GetID():int { return this.id; } + public function Job(details) + { + id = parseInt(details["id"]); + Exporter.Instance.Trace("new job: " + id); + } + public function Go(callback) + { + Exporter.Instance.Trace("Job.Go() " + id); + this.callback = callback; + setTimeout(Done, 500); + } + public function Done() + { + Exporter.Instance.Trace("Job.Done() " + id); + this.callback(); + } + public function GetCompletedData() + { + return {id:id}; + } + } +} \ No newline at end of file diff --git a/args.py b/args.py index ba9e26b..72e946d 100644 --- a/args.py +++ b/args.py @@ -78,4 +78,4 @@ path = abspath(path) if not os.path.isdir(path) or not os.path.isfile(file): return False - return os.path.commonprefix(path, file) == path + return os.path.commonprefix([path, file]) == path diff --git a/driver.py b/driver.py index d8becd0..53a67ea 100644 --- a/driver.py +++ b/driver.py @@ -4,6 +4,9 @@ import sys import threading import Queue +import errno +import json +import struct class Driver: def __init__(self, port, use_stdin, use_air = False): @@ -42,17 +45,17 @@ self.sock.close() self.proc.wait() sys.exit(1) - self.conn.poll() + self.proc.poll() if self.conn: self.conn.setblocking(False) return self.conn != None - def send_msg(self, msg): - data = json.dumps(msg) + def send_json(self, jsonObj): + data = json.dumps(jsonObj) datalen = struct.pack(">H", len(data)) - self.sock.send(datalen) - self.sock.send(data) + self.conn.send(datalen) + self.conn.send(data) def loop(self, msg_callback, stdin_callback = None): buf = "" @@ -80,9 +83,10 @@ if line == "": quit = True elif stdin_callback: - stdin_callback(line) + if not stdin_callback(line): + quit = True if quit: - self.send_msg(self.conn, {"command":"quit"}) + self.send_json({"command":"exit"}) self.conn.close() self.sock.close() self.proc.kill() diff --git a/Exporter-app.xml b/Exporter-app.xml old mode 100644 new mode 100755 index 7deb7c5..dbb9ba7 --- a/Exporter-app.xml +++ b/Exporter-app.xml @@ -16,7 +16,7 @@ Japanese App name goes here --> - + Exporter 1.0 Exporter diff --git a/Exporter.as b/Exporter.as index 7a2a149..c520e93 100644 --- a/Exporter.as +++ b/Exporter.as @@ -79,43 +79,88 @@ } } - - private function DispatchCommand(msg) + + private var jobQueue:Array = new Array(); + private var activeJob:Job = null; + private function QueueJob(jobParams) { - if (msg.hasOwnProperty("command")) + var job:Job = new Job(jobParams); + jobQueue.push(job); + CheckNewJob(); + } + + private function CheckNewJob() + { + if (activeJob == null && jobQueue.length > 0) { - var cmd = "" + msg.command; - switch (cmd) + activeJob = jobQueue.shift(); + activeJob.Go(JobComplete); + } + } + + private function JobComplete() + { + Trace("Done: " + activeJob.GetID()); + DriverCommand("done", activeJob.GetCompletedData()); + + activeJob = null; + CheckNewJob(); + } + + private function DispatchCommand(cmdData) + { + try + { + Trace("recv: " + typeof(cmdData) + " " + cmdData + " " + cmdData.hasOwnProperty("command")); + if (cmdData.hasOwnProperty("command")) { - case "trace": - Trace(msg.command); - break; - case "quit": - Quit(); - break; - default: - Trace("Recv: " + JSON.stringify(msg)); - break; - } + var cmd = "" + cmdData.command; + Trace("cmd: " + cmd); + switch (cmd) + { + case "trace": + Trace(cmdData.string); + break; + case "exit": + Quit(); + break; + case "job": + QueueJob(cmdData); + break; + default: + Trace("Recv: " + JSON.stringify(cmdData)); + break; + } + } + } catch (e) + { + Print(e.toString()); } } private function DriverRecv(e) { + Trace("recv"); try { - var cmd = driver.readUTF(); - DispatchCommand(JSON.parse(cmd)); + Trace(e.target.bytesAvailable); + var msg = driver.readUTF(); + Trace("msg: " + msg); + Trace("avail: " + e.target.bytesAvailable); + var cmdData = JSON.parse(msg); + Trace("cmdData: " + cmdData + " " + typeof(cmdData)); + DispatchCommand(cmdData); } - catch (e:EOFError) + catch (eof:EOFError) { + Trace("Waiting for more data... " + e.target.bytesAvailable); // wait for more data } - catch (e:IOError) + catch (err:IOError) { Trace("Driver IO error"); } - catch (e) + catch (err) { Trace("Problem reading from driver"); } @@ -138,7 +183,9 @@ { if (driver != null) { - driver.writeUTF(str); + Trace(str); + driver.writeUTF(str); + driver.flush(); } } diff --git a/Exporter.exe b/Exporter.exe old mode 100644 new mode 100755 index 829fdd0..745928e --- a/Exporter.exe +++ b/Exporter.exe Binary files differ diff --git a/Exporter.fla b/Exporter.fla old mode 100644 new mode 100755 index 62c62d2..a0f0ea8 --- a/Exporter.fla +++ b/Exporter.fla Binary files differ diff --git a/Exporter.swf b/Exporter.swf index 60adb24..df8c3fb 100644 --- a/Exporter.swf +++ b/Exporter.swf Binary files differ diff --git a/Job.as b/Job.as new file mode 100755 index 0000000..859be61 --- /dev/null +++ b/Job.as @@ -0,0 +1,31 @@ +package +{ + import flash.utils.*; + public class Job + { + private var callback; + + private var id:int; + public function GetID():int { return this.id; } + public function Job(details) + { + id = parseInt(details["id"]); + Exporter.Instance.Trace("new job: " + id); + } + public function Go(callback) + { + Exporter.Instance.Trace("Job.Go() " + id); + this.callback = callback; + setTimeout(Done, 500); + } + public function Done() + { + Exporter.Instance.Trace("Job.Done() " + id); + this.callback(); + } + public function GetCompletedData() + { + return {id:id}; + } + } +} \ No newline at end of file diff --git a/args.py b/args.py index ba9e26b..72e946d 100644 --- a/args.py +++ b/args.py @@ -78,4 +78,4 @@ path = abspath(path) if not os.path.isdir(path) or not os.path.isfile(file): return False - return os.path.commonprefix(path, file) == path + return os.path.commonprefix([path, file]) == path diff --git a/driver.py b/driver.py index d8becd0..53a67ea 100644 --- a/driver.py +++ b/driver.py @@ -4,6 +4,9 @@ import sys import threading import Queue +import errno +import json +import struct class Driver: def __init__(self, port, use_stdin, use_air = False): @@ -42,17 +45,17 @@ self.sock.close() self.proc.wait() sys.exit(1) - self.conn.poll() + self.proc.poll() if self.conn: self.conn.setblocking(False) return self.conn != None - def send_msg(self, msg): - data = json.dumps(msg) + def send_json(self, jsonObj): + data = json.dumps(jsonObj) datalen = struct.pack(">H", len(data)) - self.sock.send(datalen) - self.sock.send(data) + self.conn.send(datalen) + self.conn.send(data) def loop(self, msg_callback, stdin_callback = None): buf = "" @@ -80,9 +83,10 @@ if line == "": quit = True elif stdin_callback: - stdin_callback(line) + if not stdin_callback(line): + quit = True if quit: - self.send_msg(self.conn, {"command":"quit"}) + self.send_json({"command":"exit"}) self.conn.close() self.sock.close() self.proc.kill() diff --git a/exporter.py b/exporter.py index 6de7805..027380d 100755 --- a/exporter.py +++ b/exporter.py @@ -1,14 +1,12 @@ #! /usr/bin/python import socket -import errno import sys import os import os.path import json import traceback import shlex -import struct from args import * from job import * from driver import * @@ -52,33 +50,66 @@ "scale": args["scale"] if "scale" in args else 1} jobs = {} -driver = Driver(port) +sent_all_jobs = False +driver = Driver(port, from_stdin) -if driver.start(): +def send_cmd(cmd, **kwargs): + global driver + kwargs["command"] = cmd + driver.send_json(kwargs) + +def send_job(job): + send_cmd("job", **job.get_cmd()) + +def check_jobs_done(): + global sent_all_, jobs + return sent_all_jobs and not len(jobs) + +if not from_stdin: + base_args = make_base_job_args(args) + for i in args["input"]: + try: + job = Job(input = i, **base_args) + jobs[job.id] = job + except Exception, e: + print e + sent_all_jobs = True + if check_jobs_done(): + sys.exit(0) + +driver_started = driver.start() + +if driver_started: if not from_stdin: - base_args = make_base_job_args(args) - for i in args["input"]: - try: - job = Job(base_args, input = i) - jobs[job.id] = job - except Exception, e: - print e - -driver.loop(handle_command, handle_stdin) + for id in jobs: + send_job(jobs[id]) def handle_stdin(line): + global sent_all_jobs, jobs + if line is None: + sent_all_jobs = True + if check_jobs_done(): + return False + return True parts = shlex.split(line) (err, line_args) = ArgParser.parse_args(parts) if err is not None: print err else: - base_args= make_base_job_args(line_args) + base_args = make_base_job_args(dict(args.items() + line_args.items())) for i in line_args["input"]: - pass - #send_job(conn, base_cmd, i) + try: + job = Job(input = i, **base_args) + jobs[job.id] = job + except Exception, e: + print e + send_job(job) + return True def handle_command(msg_str): + # return False to quit the driver loop msg = json.loads(msg_str) + print msg if "command" in msg: cmd = msg["command"] if cmd == "exit": @@ -86,10 +117,14 @@ if cmd == "print" and "string" in msg: sys.stdout.write(msg["string"]) sys.stdout.flush() - if cmd == "done" and "job_num" in msg: - job_num = int(cmd["job_num"]) - if job_num == num_jobs_sent: - return False + if cmd == "done" and "id" in msg: + id = int(msg["id"]) + if id in jobs: + jobs.pop(id) + if check_jobs_done(): + return False return True - +# still have to loop() even if we didn't start succesfully, +# as we may be waiting for the exporter process to close +driver.loop(handle_command, handle_stdin) diff --git a/Exporter-app.xml b/Exporter-app.xml old mode 100644 new mode 100755 index 7deb7c5..dbb9ba7 --- a/Exporter-app.xml +++ b/Exporter-app.xml @@ -16,7 +16,7 @@ Japanese App name goes here --> - + Exporter 1.0 Exporter diff --git a/Exporter.as b/Exporter.as index 7a2a149..c520e93 100644 --- a/Exporter.as +++ b/Exporter.as @@ -79,43 +79,88 @@ } } - - private function DispatchCommand(msg) + + private var jobQueue:Array = new Array(); + private var activeJob:Job = null; + private function QueueJob(jobParams) { - if (msg.hasOwnProperty("command")) + var job:Job = new Job(jobParams); + jobQueue.push(job); + CheckNewJob(); + } + + private function CheckNewJob() + { + if (activeJob == null && jobQueue.length > 0) { - var cmd = "" + msg.command; - switch (cmd) + activeJob = jobQueue.shift(); + activeJob.Go(JobComplete); + } + } + + private function JobComplete() + { + Trace("Done: " + activeJob.GetID()); + DriverCommand("done", activeJob.GetCompletedData()); + + activeJob = null; + CheckNewJob(); + } + + private function DispatchCommand(cmdData) + { + try + { + Trace("recv: " + typeof(cmdData) + " " + cmdData + " " + cmdData.hasOwnProperty("command")); + if (cmdData.hasOwnProperty("command")) { - case "trace": - Trace(msg.command); - break; - case "quit": - Quit(); - break; - default: - Trace("Recv: " + JSON.stringify(msg)); - break; - } + var cmd = "" + cmdData.command; + Trace("cmd: " + cmd); + switch (cmd) + { + case "trace": + Trace(cmdData.string); + break; + case "exit": + Quit(); + break; + case "job": + QueueJob(cmdData); + break; + default: + Trace("Recv: " + JSON.stringify(cmdData)); + break; + } + } + } catch (e) + { + Print(e.toString()); } } private function DriverRecv(e) { + Trace("recv"); try { - var cmd = driver.readUTF(); - DispatchCommand(JSON.parse(cmd)); + Trace(e.target.bytesAvailable); + var msg = driver.readUTF(); + Trace("msg: " + msg); + Trace("avail: " + e.target.bytesAvailable); + var cmdData = JSON.parse(msg); + Trace("cmdData: " + cmdData + " " + typeof(cmdData)); + DispatchCommand(cmdData); } - catch (e:EOFError) + catch (eof:EOFError) { + Trace("Waiting for more data... " + e.target.bytesAvailable); // wait for more data } - catch (e:IOError) + catch (err:IOError) { Trace("Driver IO error"); } - catch (e) + catch (err) { Trace("Problem reading from driver"); } @@ -138,7 +183,9 @@ { if (driver != null) { - driver.writeUTF(str); + Trace(str); + driver.writeUTF(str); + driver.flush(); } } diff --git a/Exporter.exe b/Exporter.exe old mode 100644 new mode 100755 index 829fdd0..745928e --- a/Exporter.exe +++ b/Exporter.exe Binary files differ diff --git a/Exporter.fla b/Exporter.fla old mode 100644 new mode 100755 index 62c62d2..a0f0ea8 --- a/Exporter.fla +++ b/Exporter.fla Binary files differ diff --git a/Exporter.swf b/Exporter.swf index 60adb24..df8c3fb 100644 --- a/Exporter.swf +++ b/Exporter.swf Binary files differ diff --git a/Job.as b/Job.as new file mode 100755 index 0000000..859be61 --- /dev/null +++ b/Job.as @@ -0,0 +1,31 @@ +package +{ + import flash.utils.*; + public class Job + { + private var callback; + + private var id:int; + public function GetID():int { return this.id; } + public function Job(details) + { + id = parseInt(details["id"]); + Exporter.Instance.Trace("new job: " + id); + } + public function Go(callback) + { + Exporter.Instance.Trace("Job.Go() " + id); + this.callback = callback; + setTimeout(Done, 500); + } + public function Done() + { + Exporter.Instance.Trace("Job.Done() " + id); + this.callback(); + } + public function GetCompletedData() + { + return {id:id}; + } + } +} \ No newline at end of file diff --git a/args.py b/args.py index ba9e26b..72e946d 100644 --- a/args.py +++ b/args.py @@ -78,4 +78,4 @@ path = abspath(path) if not os.path.isdir(path) or not os.path.isfile(file): return False - return os.path.commonprefix(path, file) == path + return os.path.commonprefix([path, file]) == path diff --git a/driver.py b/driver.py index d8becd0..53a67ea 100644 --- a/driver.py +++ b/driver.py @@ -4,6 +4,9 @@ import sys import threading import Queue +import errno +import json +import struct class Driver: def __init__(self, port, use_stdin, use_air = False): @@ -42,17 +45,17 @@ self.sock.close() self.proc.wait() sys.exit(1) - self.conn.poll() + self.proc.poll() if self.conn: self.conn.setblocking(False) return self.conn != None - def send_msg(self, msg): - data = json.dumps(msg) + def send_json(self, jsonObj): + data = json.dumps(jsonObj) datalen = struct.pack(">H", len(data)) - self.sock.send(datalen) - self.sock.send(data) + self.conn.send(datalen) + self.conn.send(data) def loop(self, msg_callback, stdin_callback = None): buf = "" @@ -80,9 +83,10 @@ if line == "": quit = True elif stdin_callback: - stdin_callback(line) + if not stdin_callback(line): + quit = True if quit: - self.send_msg(self.conn, {"command":"quit"}) + self.send_json({"command":"exit"}) self.conn.close() self.sock.close() self.proc.kill() diff --git a/exporter.py b/exporter.py index 6de7805..027380d 100755 --- a/exporter.py +++ b/exporter.py @@ -1,14 +1,12 @@ #! /usr/bin/python import socket -import errno import sys import os import os.path import json import traceback import shlex -import struct from args import * from job import * from driver import * @@ -52,33 +50,66 @@ "scale": args["scale"] if "scale" in args else 1} jobs = {} -driver = Driver(port) +sent_all_jobs = False +driver = Driver(port, from_stdin) -if driver.start(): +def send_cmd(cmd, **kwargs): + global driver + kwargs["command"] = cmd + driver.send_json(kwargs) + +def send_job(job): + send_cmd("job", **job.get_cmd()) + +def check_jobs_done(): + global sent_all_, jobs + return sent_all_jobs and not len(jobs) + +if not from_stdin: + base_args = make_base_job_args(args) + for i in args["input"]: + try: + job = Job(input = i, **base_args) + jobs[job.id] = job + except Exception, e: + print e + sent_all_jobs = True + if check_jobs_done(): + sys.exit(0) + +driver_started = driver.start() + +if driver_started: if not from_stdin: - base_args = make_base_job_args(args) - for i in args["input"]: - try: - job = Job(base_args, input = i) - jobs[job.id] = job - except Exception, e: - print e - -driver.loop(handle_command, handle_stdin) + for id in jobs: + send_job(jobs[id]) def handle_stdin(line): + global sent_all_jobs, jobs + if line is None: + sent_all_jobs = True + if check_jobs_done(): + return False + return True parts = shlex.split(line) (err, line_args) = ArgParser.parse_args(parts) if err is not None: print err else: - base_args= make_base_job_args(line_args) + base_args = make_base_job_args(dict(args.items() + line_args.items())) for i in line_args["input"]: - pass - #send_job(conn, base_cmd, i) + try: + job = Job(input = i, **base_args) + jobs[job.id] = job + except Exception, e: + print e + send_job(job) + return True def handle_command(msg_str): + # return False to quit the driver loop msg = json.loads(msg_str) + print msg if "command" in msg: cmd = msg["command"] if cmd == "exit": @@ -86,10 +117,14 @@ if cmd == "print" and "string" in msg: sys.stdout.write(msg["string"]) sys.stdout.flush() - if cmd == "done" and "job_num" in msg: - job_num = int(cmd["job_num"]) - if job_num == num_jobs_sent: - return False + if cmd == "done" and "id" in msg: + id = int(msg["id"]) + if id in jobs: + jobs.pop(id) + if check_jobs_done(): + return False return True - +# still have to loop() even if we didn't start succesfully, +# as we may be waiting for the exporter process to close +driver.loop(handle_command, handle_stdin) diff --git a/files.txt b/files.txt new file mode 100755 index 0000000..0bfe689 --- /dev/null +++ b/files.txt @@ -0,0 +1,29 @@ +AnimationPiece.as // represents single skeletal piece (stores graphic, or frames, + name) +AnimationPieceSet.as // +AnimPieceExportBuilder.as +AnimSetExportBuilder.as +CharacterExporter.as +CharacterSequence.as +CharacterTypeGraphic.as +ExportBuilder.as +JSONPNGSetSaver.as +Piece.as +PieceFrameInfo.as +PieceLibrary.as +PieceSequence.as +AnimPiecePacker.as +AnimSetPacker.as +IconPacker.as +ScenePacker.as +SkelAnimPacker.as +AsyncGraphicPacker.as +BitmapFont.as +BitmapFontCopy.as +FontCodepointData.as +GraphicDefClipCollection.as +GraphicPacker.as +JSONPNGSetSaver.as +ChunkedGraphic.as +FileExportSet.as +JSONPNGSet.as +PNGExportHelper.as diff --git a/Exporter-app.xml b/Exporter-app.xml old mode 100644 new mode 100755 index 7deb7c5..dbb9ba7 --- a/Exporter-app.xml +++ b/Exporter-app.xml @@ -16,7 +16,7 @@ Japanese App name goes here --> - + Exporter 1.0 Exporter diff --git a/Exporter.as b/Exporter.as index 7a2a149..c520e93 100644 --- a/Exporter.as +++ b/Exporter.as @@ -79,43 +79,88 @@ } } - - private function DispatchCommand(msg) + + private var jobQueue:Array = new Array(); + private var activeJob:Job = null; + private function QueueJob(jobParams) { - if (msg.hasOwnProperty("command")) + var job:Job = new Job(jobParams); + jobQueue.push(job); + CheckNewJob(); + } + + private function CheckNewJob() + { + if (activeJob == null && jobQueue.length > 0) { - var cmd = "" + msg.command; - switch (cmd) + activeJob = jobQueue.shift(); + activeJob.Go(JobComplete); + } + } + + private function JobComplete() + { + Trace("Done: " + activeJob.GetID()); + DriverCommand("done", activeJob.GetCompletedData()); + + activeJob = null; + CheckNewJob(); + } + + private function DispatchCommand(cmdData) + { + try + { + Trace("recv: " + typeof(cmdData) + " " + cmdData + " " + cmdData.hasOwnProperty("command")); + if (cmdData.hasOwnProperty("command")) { - case "trace": - Trace(msg.command); - break; - case "quit": - Quit(); - break; - default: - Trace("Recv: " + JSON.stringify(msg)); - break; - } + var cmd = "" + cmdData.command; + Trace("cmd: " + cmd); + switch (cmd) + { + case "trace": + Trace(cmdData.string); + break; + case "exit": + Quit(); + break; + case "job": + QueueJob(cmdData); + break; + default: + Trace("Recv: " + JSON.stringify(cmdData)); + break; + } + } + } catch (e) + { + Print(e.toString()); } } private function DriverRecv(e) { + Trace("recv"); try { - var cmd = driver.readUTF(); - DispatchCommand(JSON.parse(cmd)); + Trace(e.target.bytesAvailable); + var msg = driver.readUTF(); + Trace("msg: " + msg); + Trace("avail: " + e.target.bytesAvailable); + var cmdData = JSON.parse(msg); + Trace("cmdData: " + cmdData + " " + typeof(cmdData)); + DispatchCommand(cmdData); } - catch (e:EOFError) + catch (eof:EOFError) { + Trace("Waiting for more data... " + e.target.bytesAvailable); // wait for more data } - catch (e:IOError) + catch (err:IOError) { Trace("Driver IO error"); } - catch (e) + catch (err) { Trace("Problem reading from driver"); } @@ -138,7 +183,9 @@ { if (driver != null) { - driver.writeUTF(str); + Trace(str); + driver.writeUTF(str); + driver.flush(); } } diff --git a/Exporter.exe b/Exporter.exe old mode 100644 new mode 100755 index 829fdd0..745928e --- a/Exporter.exe +++ b/Exporter.exe Binary files differ diff --git a/Exporter.fla b/Exporter.fla old mode 100644 new mode 100755 index 62c62d2..a0f0ea8 --- a/Exporter.fla +++ b/Exporter.fla Binary files differ diff --git a/Exporter.swf b/Exporter.swf index 60adb24..df8c3fb 100644 --- a/Exporter.swf +++ b/Exporter.swf Binary files differ diff --git a/Job.as b/Job.as new file mode 100755 index 0000000..859be61 --- /dev/null +++ b/Job.as @@ -0,0 +1,31 @@ +package +{ + import flash.utils.*; + public class Job + { + private var callback; + + private var id:int; + public function GetID():int { return this.id; } + public function Job(details) + { + id = parseInt(details["id"]); + Exporter.Instance.Trace("new job: " + id); + } + public function Go(callback) + { + Exporter.Instance.Trace("Job.Go() " + id); + this.callback = callback; + setTimeout(Done, 500); + } + public function Done() + { + Exporter.Instance.Trace("Job.Done() " + id); + this.callback(); + } + public function GetCompletedData() + { + return {id:id}; + } + } +} \ No newline at end of file diff --git a/args.py b/args.py index ba9e26b..72e946d 100644 --- a/args.py +++ b/args.py @@ -78,4 +78,4 @@ path = abspath(path) if not os.path.isdir(path) or not os.path.isfile(file): return False - return os.path.commonprefix(path, file) == path + return os.path.commonprefix([path, file]) == path diff --git a/driver.py b/driver.py index d8becd0..53a67ea 100644 --- a/driver.py +++ b/driver.py @@ -4,6 +4,9 @@ import sys import threading import Queue +import errno +import json +import struct class Driver: def __init__(self, port, use_stdin, use_air = False): @@ -42,17 +45,17 @@ self.sock.close() self.proc.wait() sys.exit(1) - self.conn.poll() + self.proc.poll() if self.conn: self.conn.setblocking(False) return self.conn != None - def send_msg(self, msg): - data = json.dumps(msg) + def send_json(self, jsonObj): + data = json.dumps(jsonObj) datalen = struct.pack(">H", len(data)) - self.sock.send(datalen) - self.sock.send(data) + self.conn.send(datalen) + self.conn.send(data) def loop(self, msg_callback, stdin_callback = None): buf = "" @@ -80,9 +83,10 @@ if line == "": quit = True elif stdin_callback: - stdin_callback(line) + if not stdin_callback(line): + quit = True if quit: - self.send_msg(self.conn, {"command":"quit"}) + self.send_json({"command":"exit"}) self.conn.close() self.sock.close() self.proc.kill() diff --git a/exporter.py b/exporter.py index 6de7805..027380d 100755 --- a/exporter.py +++ b/exporter.py @@ -1,14 +1,12 @@ #! /usr/bin/python import socket -import errno import sys import os import os.path import json import traceback import shlex -import struct from args import * from job import * from driver import * @@ -52,33 +50,66 @@ "scale": args["scale"] if "scale" in args else 1} jobs = {} -driver = Driver(port) +sent_all_jobs = False +driver = Driver(port, from_stdin) -if driver.start(): +def send_cmd(cmd, **kwargs): + global driver + kwargs["command"] = cmd + driver.send_json(kwargs) + +def send_job(job): + send_cmd("job", **job.get_cmd()) + +def check_jobs_done(): + global sent_all_, jobs + return sent_all_jobs and not len(jobs) + +if not from_stdin: + base_args = make_base_job_args(args) + for i in args["input"]: + try: + job = Job(input = i, **base_args) + jobs[job.id] = job + except Exception, e: + print e + sent_all_jobs = True + if check_jobs_done(): + sys.exit(0) + +driver_started = driver.start() + +if driver_started: if not from_stdin: - base_args = make_base_job_args(args) - for i in args["input"]: - try: - job = Job(base_args, input = i) - jobs[job.id] = job - except Exception, e: - print e - -driver.loop(handle_command, handle_stdin) + for id in jobs: + send_job(jobs[id]) def handle_stdin(line): + global sent_all_jobs, jobs + if line is None: + sent_all_jobs = True + if check_jobs_done(): + return False + return True parts = shlex.split(line) (err, line_args) = ArgParser.parse_args(parts) if err is not None: print err else: - base_args= make_base_job_args(line_args) + base_args = make_base_job_args(dict(args.items() + line_args.items())) for i in line_args["input"]: - pass - #send_job(conn, base_cmd, i) + try: + job = Job(input = i, **base_args) + jobs[job.id] = job + except Exception, e: + print e + send_job(job) + return True def handle_command(msg_str): + # return False to quit the driver loop msg = json.loads(msg_str) + print msg if "command" in msg: cmd = msg["command"] if cmd == "exit": @@ -86,10 +117,14 @@ if cmd == "print" and "string" in msg: sys.stdout.write(msg["string"]) sys.stdout.flush() - if cmd == "done" and "job_num" in msg: - job_num = int(cmd["job_num"]) - if job_num == num_jobs_sent: - return False + if cmd == "done" and "id" in msg: + id = int(msg["id"]) + if id in jobs: + jobs.pop(id) + if check_jobs_done(): + return False return True - +# still have to loop() even if we didn't start succesfully, +# as we may be waiting for the exporter process to close +driver.loop(handle_command, handle_stdin) diff --git a/files.txt b/files.txt new file mode 100755 index 0000000..0bfe689 --- /dev/null +++ b/files.txt @@ -0,0 +1,29 @@ +AnimationPiece.as // represents single skeletal piece (stores graphic, or frames, + name) +AnimationPieceSet.as // +AnimPieceExportBuilder.as +AnimSetExportBuilder.as +CharacterExporter.as +CharacterSequence.as +CharacterTypeGraphic.as +ExportBuilder.as +JSONPNGSetSaver.as +Piece.as +PieceFrameInfo.as +PieceLibrary.as +PieceSequence.as +AnimPiecePacker.as +AnimSetPacker.as +IconPacker.as +ScenePacker.as +SkelAnimPacker.as +AsyncGraphicPacker.as +BitmapFont.as +BitmapFontCopy.as +FontCodepointData.as +GraphicDefClipCollection.as +GraphicPacker.as +JSONPNGSetSaver.as +ChunkedGraphic.as +FileExportSet.as +JSONPNGSet.as +PNGExportHelper.as diff --git a/job.py b/job.py index 4385544..d100368 100644 --- a/job.py +++ b/job.py @@ -1,16 +1,18 @@ import os.path +from args import * class Job: next_id = 0 def __init__(self, input, type = 1, scale = 1, base = None): if not os.path.isfile(input): raise Exception("Failed: couldn't open " + input) - self.id = next_id - next_id += 1 + self.id = Job.next_id + Job.next_id += 1 self.input = abspath(input) self.base = base if base is not None else os.path.split(input)[0] if not file_in_path(self.input, self.base): raise Exception("Failed: " + input + " is not in base dir " + self.base) self.type = type self.scale = scale - self.done = False + def get_cmd(self): + return {"type":self.type, "scale":self.scale, "id":self.id} diff --git a/Exporter-app.xml b/Exporter-app.xml old mode 100644 new mode 100755 index 7deb7c5..dbb9ba7 --- a/Exporter-app.xml +++ b/Exporter-app.xml @@ -16,7 +16,7 @@ Japanese App name goes here --> - + Exporter 1.0 Exporter diff --git a/Exporter.as b/Exporter.as index 7a2a149..c520e93 100644 --- a/Exporter.as +++ b/Exporter.as @@ -79,43 +79,88 @@ } } - - private function DispatchCommand(msg) + + private var jobQueue:Array = new Array(); + private var activeJob:Job = null; + private function QueueJob(jobParams) { - if (msg.hasOwnProperty("command")) + var job:Job = new Job(jobParams); + jobQueue.push(job); + CheckNewJob(); + } + + private function CheckNewJob() + { + if (activeJob == null && jobQueue.length > 0) { - var cmd = "" + msg.command; - switch (cmd) + activeJob = jobQueue.shift(); + activeJob.Go(JobComplete); + } + } + + private function JobComplete() + { + Trace("Done: " + activeJob.GetID()); + DriverCommand("done", activeJob.GetCompletedData()); + + activeJob = null; + CheckNewJob(); + } + + private function DispatchCommand(cmdData) + { + try + { + Trace("recv: " + typeof(cmdData) + " " + cmdData + " " + cmdData.hasOwnProperty("command")); + if (cmdData.hasOwnProperty("command")) { - case "trace": - Trace(msg.command); - break; - case "quit": - Quit(); - break; - default: - Trace("Recv: " + JSON.stringify(msg)); - break; - } + var cmd = "" + cmdData.command; + Trace("cmd: " + cmd); + switch (cmd) + { + case "trace": + Trace(cmdData.string); + break; + case "exit": + Quit(); + break; + case "job": + QueueJob(cmdData); + break; + default: + Trace("Recv: " + JSON.stringify(cmdData)); + break; + } + } + } catch (e) + { + Print(e.toString()); } } private function DriverRecv(e) { + Trace("recv"); try { - var cmd = driver.readUTF(); - DispatchCommand(JSON.parse(cmd)); + Trace(e.target.bytesAvailable); + var msg = driver.readUTF(); + Trace("msg: " + msg); + Trace("avail: " + e.target.bytesAvailable); + var cmdData = JSON.parse(msg); + Trace("cmdData: " + cmdData + " " + typeof(cmdData)); + DispatchCommand(cmdData); } - catch (e:EOFError) + catch (eof:EOFError) { + Trace("Waiting for more data... " + e.target.bytesAvailable); // wait for more data } - catch (e:IOError) + catch (err:IOError) { Trace("Driver IO error"); } - catch (e) + catch (err) { Trace("Problem reading from driver"); } @@ -138,7 +183,9 @@ { if (driver != null) { - driver.writeUTF(str); + Trace(str); + driver.writeUTF(str); + driver.flush(); } } diff --git a/Exporter.exe b/Exporter.exe old mode 100644 new mode 100755 index 829fdd0..745928e --- a/Exporter.exe +++ b/Exporter.exe Binary files differ diff --git a/Exporter.fla b/Exporter.fla old mode 100644 new mode 100755 index 62c62d2..a0f0ea8 --- a/Exporter.fla +++ b/Exporter.fla Binary files differ diff --git a/Exporter.swf b/Exporter.swf index 60adb24..df8c3fb 100644 --- a/Exporter.swf +++ b/Exporter.swf Binary files differ diff --git a/Job.as b/Job.as new file mode 100755 index 0000000..859be61 --- /dev/null +++ b/Job.as @@ -0,0 +1,31 @@ +package +{ + import flash.utils.*; + public class Job + { + private var callback; + + private var id:int; + public function GetID():int { return this.id; } + public function Job(details) + { + id = parseInt(details["id"]); + Exporter.Instance.Trace("new job: " + id); + } + public function Go(callback) + { + Exporter.Instance.Trace("Job.Go() " + id); + this.callback = callback; + setTimeout(Done, 500); + } + public function Done() + { + Exporter.Instance.Trace("Job.Done() " + id); + this.callback(); + } + public function GetCompletedData() + { + return {id:id}; + } + } +} \ No newline at end of file diff --git a/args.py b/args.py index ba9e26b..72e946d 100644 --- a/args.py +++ b/args.py @@ -78,4 +78,4 @@ path = abspath(path) if not os.path.isdir(path) or not os.path.isfile(file): return False - return os.path.commonprefix(path, file) == path + return os.path.commonprefix([path, file]) == path diff --git a/driver.py b/driver.py index d8becd0..53a67ea 100644 --- a/driver.py +++ b/driver.py @@ -4,6 +4,9 @@ import sys import threading import Queue +import errno +import json +import struct class Driver: def __init__(self, port, use_stdin, use_air = False): @@ -42,17 +45,17 @@ self.sock.close() self.proc.wait() sys.exit(1) - self.conn.poll() + self.proc.poll() if self.conn: self.conn.setblocking(False) return self.conn != None - def send_msg(self, msg): - data = json.dumps(msg) + def send_json(self, jsonObj): + data = json.dumps(jsonObj) datalen = struct.pack(">H", len(data)) - self.sock.send(datalen) - self.sock.send(data) + self.conn.send(datalen) + self.conn.send(data) def loop(self, msg_callback, stdin_callback = None): buf = "" @@ -80,9 +83,10 @@ if line == "": quit = True elif stdin_callback: - stdin_callback(line) + if not stdin_callback(line): + quit = True if quit: - self.send_msg(self.conn, {"command":"quit"}) + self.send_json({"command":"exit"}) self.conn.close() self.sock.close() self.proc.kill() diff --git a/exporter.py b/exporter.py index 6de7805..027380d 100755 --- a/exporter.py +++ b/exporter.py @@ -1,14 +1,12 @@ #! /usr/bin/python import socket -import errno import sys import os import os.path import json import traceback import shlex -import struct from args import * from job import * from driver import * @@ -52,33 +50,66 @@ "scale": args["scale"] if "scale" in args else 1} jobs = {} -driver = Driver(port) +sent_all_jobs = False +driver = Driver(port, from_stdin) -if driver.start(): +def send_cmd(cmd, **kwargs): + global driver + kwargs["command"] = cmd + driver.send_json(kwargs) + +def send_job(job): + send_cmd("job", **job.get_cmd()) + +def check_jobs_done(): + global sent_all_, jobs + return sent_all_jobs and not len(jobs) + +if not from_stdin: + base_args = make_base_job_args(args) + for i in args["input"]: + try: + job = Job(input = i, **base_args) + jobs[job.id] = job + except Exception, e: + print e + sent_all_jobs = True + if check_jobs_done(): + sys.exit(0) + +driver_started = driver.start() + +if driver_started: if not from_stdin: - base_args = make_base_job_args(args) - for i in args["input"]: - try: - job = Job(base_args, input = i) - jobs[job.id] = job - except Exception, e: - print e - -driver.loop(handle_command, handle_stdin) + for id in jobs: + send_job(jobs[id]) def handle_stdin(line): + global sent_all_jobs, jobs + if line is None: + sent_all_jobs = True + if check_jobs_done(): + return False + return True parts = shlex.split(line) (err, line_args) = ArgParser.parse_args(parts) if err is not None: print err else: - base_args= make_base_job_args(line_args) + base_args = make_base_job_args(dict(args.items() + line_args.items())) for i in line_args["input"]: - pass - #send_job(conn, base_cmd, i) + try: + job = Job(input = i, **base_args) + jobs[job.id] = job + except Exception, e: + print e + send_job(job) + return True def handle_command(msg_str): + # return False to quit the driver loop msg = json.loads(msg_str) + print msg if "command" in msg: cmd = msg["command"] if cmd == "exit": @@ -86,10 +117,14 @@ if cmd == "print" and "string" in msg: sys.stdout.write(msg["string"]) sys.stdout.flush() - if cmd == "done" and "job_num" in msg: - job_num = int(cmd["job_num"]) - if job_num == num_jobs_sent: - return False + if cmd == "done" and "id" in msg: + id = int(msg["id"]) + if id in jobs: + jobs.pop(id) + if check_jobs_done(): + return False return True - +# still have to loop() even if we didn't start succesfully, +# as we may be waiting for the exporter process to close +driver.loop(handle_command, handle_stdin) diff --git a/files.txt b/files.txt new file mode 100755 index 0000000..0bfe689 --- /dev/null +++ b/files.txt @@ -0,0 +1,29 @@ +AnimationPiece.as // represents single skeletal piece (stores graphic, or frames, + name) +AnimationPieceSet.as // +AnimPieceExportBuilder.as +AnimSetExportBuilder.as +CharacterExporter.as +CharacterSequence.as +CharacterTypeGraphic.as +ExportBuilder.as +JSONPNGSetSaver.as +Piece.as +PieceFrameInfo.as +PieceLibrary.as +PieceSequence.as +AnimPiecePacker.as +AnimSetPacker.as +IconPacker.as +ScenePacker.as +SkelAnimPacker.as +AsyncGraphicPacker.as +BitmapFont.as +BitmapFontCopy.as +FontCodepointData.as +GraphicDefClipCollection.as +GraphicPacker.as +JSONPNGSetSaver.as +ChunkedGraphic.as +FileExportSet.as +JSONPNGSet.as +PNGExportHelper.as diff --git a/job.py b/job.py index 4385544..d100368 100644 --- a/job.py +++ b/job.py @@ -1,16 +1,18 @@ import os.path +from args import * class Job: next_id = 0 def __init__(self, input, type = 1, scale = 1, base = None): if not os.path.isfile(input): raise Exception("Failed: couldn't open " + input) - self.id = next_id - next_id += 1 + self.id = Job.next_id + Job.next_id += 1 self.input = abspath(input) self.base = base if base is not None else os.path.split(input)[0] if not file_in_path(self.input, self.base): raise Exception("Failed: " + input + " is not in base dir " + self.base) self.type = type self.scale = scale - self.done = False + def get_cmd(self): + return {"type":self.type, "scale":self.scale, "id":self.id} diff --git a/session.vim b/session.vim new file mode 100644 index 0000000..88e63d7 --- /dev/null +++ b/session.vim @@ -0,0 +1,564 @@ +let SessionLoad = 1 +if &cp | set nocp | endif +let s:cpo_save=&cpo +set cpo&vim +imap +inoremap pumvisible() ? "\" : "\" +inoremap pumvisible() ? "\" : "\" +inoremap pumvisible() ? "\" : "\" +nnoremap  :TmuxNavigateLeft +nnoremap :TmuxNavigateDown +nnoremap  :TmuxNavigateUp +nnoremap  :TmuxNavigateRight +nnoremap  :TmuxNavigatePrevious +nnoremap \d :YcmShowDetailedDiagnostic +map \\ (easymotion-prefix) +vnoremap \c :call CopyMarkWithCursor("<", ">") +nnoremap \c :set opfunc=OpSysCopyMark g@ +vmap gx NetrwBrowseXVis +nmap gx NetrwBrowseX +vnoremap NetrwBrowseXVis :call netrw#BrowseXVis() +nnoremap NetrwBrowseX :call netrw#BrowseX(expand((exists("g:netrw_gx")? g:netrw_gx : '')),netrw#CheckIfRemote()) +map (easymotion-prefix)N (easymotion-N) +map (easymotion-prefix)n (easymotion-n) +map (easymotion-prefix)k (easymotion-k) +map (easymotion-prefix)j (easymotion-j) +map (easymotion-prefix)gE (easymotion-gE) +map (easymotion-prefix)ge (easymotion-ge) +map (easymotion-prefix)E (easymotion-E) +map (easymotion-prefix)e (easymotion-e) +map (easymotion-prefix)B (easymotion-B) +map (easymotion-prefix)b (easymotion-b) +map (easymotion-prefix)W (easymotion-W) +map (easymotion-prefix)w (easymotion-w) +map (easymotion-prefix)T (easymotion-T) +map (easymotion-prefix)t (easymotion-t) +map (easymotion-prefix)s (easymotion-s) +map (easymotion-prefix)F (easymotion-F) +map (easymotion-prefix)f (easymotion-f) +xnoremap (easymotion-activate) :call EasyMotion#activate(1) +nnoremap (easymotion-activate) :call EasyMotion#activate(0) +snoremap (easymotion-activate) :call EasyMotion#activate(0) +onoremap (easymotion-activate) :call EasyMotion#activate(0) +noremap (easymotion-dotrepeat) :call EasyMotion#DotRepeat() +xnoremap (easymotion-repeat) :call EasyMotion#Repeat(1) +nnoremap (easymotion-repeat) :call EasyMotion#Repeat(0) +snoremap (easymotion-repeat) :call EasyMotion#Repeat(0) +onoremap (easymotion-repeat) :call EasyMotion#Repeat(0) +xnoremap (easymotion-prev) :call EasyMotion#NextPrevious(1,1) +nnoremap (easymotion-prev) :call EasyMotion#NextPrevious(0,1) +snoremap (easymotion-prev) :call EasyMotion#NextPrevious(0,1) +onoremap (easymotion-prev) :call EasyMotion#NextPrevious(0,1) +xnoremap (easymotion-next) :call EasyMotion#NextPrevious(1,0) +nnoremap (easymotion-next) :call EasyMotion#NextPrevious(0,0) +snoremap (easymotion-next) :call EasyMotion#NextPrevious(0,0) +onoremap (easymotion-next) :call EasyMotion#NextPrevious(0,0) +xnoremap (easymotion-wl) :call EasyMotion#WBL(1,0) +nnoremap (easymotion-wl) :call EasyMotion#WBL(0,0) +snoremap (easymotion-wl) :call EasyMotion#WBL(0,0) +onoremap (easymotion-wl) :call EasyMotion#WBL(0,0) +xnoremap (easymotion-lineforward) :call EasyMotion#LineAnywhere(1,0) +nnoremap (easymotion-lineforward) :call EasyMotion#LineAnywhere(0,0) +snoremap (easymotion-lineforward) :call EasyMotion#LineAnywhere(0,0) +onoremap (easymotion-lineforward) :call EasyMotion#LineAnywhere(0,0) +xnoremap (easymotion-lineanywhere) :call EasyMotion#LineAnywhere(1,2) +nnoremap (easymotion-lineanywhere) :call EasyMotion#LineAnywhere(0,2) +snoremap (easymotion-lineanywhere) :call EasyMotion#LineAnywhere(0,2) +onoremap (easymotion-lineanywhere) :call EasyMotion#LineAnywhere(0,2) +xnoremap (easymotion-bd-wl) :call EasyMotion#WBL(1,2) +nnoremap (easymotion-bd-wl) :call EasyMotion#WBL(0,2) +snoremap (easymotion-bd-wl) :call EasyMotion#WBL(0,2) +onoremap (easymotion-bd-wl) :call EasyMotion#WBL(0,2) +xnoremap (easymotion-linebackward) :call EasyMotion#LineAnywhere(1,1) +nnoremap (easymotion-linebackward) :call EasyMotion#LineAnywhere(0,1) +snoremap (easymotion-linebackward) :call EasyMotion#LineAnywhere(0,1) +onoremap (easymotion-linebackward) :call EasyMotion#LineAnywhere(0,1) +xnoremap (easymotion-bl) :call EasyMotion#WBL(1,1) +nnoremap (easymotion-bl) :call EasyMotion#WBL(0,1) +snoremap (easymotion-bl) :call EasyMotion#WBL(0,1) +onoremap (easymotion-bl) :call EasyMotion#WBL(0,1) +xnoremap (easymotion-el) :call EasyMotion#EL(1,0) +nnoremap (easymotion-el) :call EasyMotion#EL(0,0) +snoremap (easymotion-el) :call EasyMotion#EL(0,0) +onoremap (easymotion-el) :call EasyMotion#EL(0,0) +xnoremap (easymotion-gel) :call EasyMotion#EL(1,1) +nnoremap (easymotion-gel) :call EasyMotion#EL(0,1) +snoremap (easymotion-gel) :call EasyMotion#EL(0,1) +onoremap (easymotion-gel) :call EasyMotion#EL(0,1) +xnoremap (easymotion-bd-el) :call EasyMotion#EL(1,2) +nnoremap (easymotion-bd-el) :call EasyMotion#EL(0,2) +snoremap (easymotion-bd-el) :call EasyMotion#EL(0,2) +onoremap (easymotion-bd-el) :call EasyMotion#EL(0,2) +xnoremap (easymotion-jumptoanywhere) :call EasyMotion#JumpToAnywhere(1,2) +nnoremap (easymotion-jumptoanywhere) :call EasyMotion#JumpToAnywhere(0,2) +snoremap (easymotion-jumptoanywhere) :call EasyMotion#JumpToAnywhere(0,2) +onoremap (easymotion-jumptoanywhere) :call EasyMotion#JumpToAnywhere(0,2) +xnoremap (easymotion-vim-n) :call EasyMotion#Search(1,0,1) +nnoremap (easymotion-vim-n) :call EasyMotion#Search(0,0,1) +snoremap (easymotion-vim-n) :call EasyMotion#Search(0,0,1) +onoremap (easymotion-vim-n) :call EasyMotion#Search(0,0,1) +xnoremap (easymotion-n) :call EasyMotion#Search(1,0,0) +nnoremap (easymotion-n) :call EasyMotion#Search(0,0,0) +snoremap (easymotion-n) :call EasyMotion#Search(0,0,0) +onoremap (easymotion-n) :call EasyMotion#Search(0,0,0) +xnoremap (easymotion-bd-n) :call EasyMotion#Search(1,2,0) +nnoremap (easymotion-bd-n) :call EasyMotion#Search(0,2,0) +snoremap (easymotion-bd-n) :call EasyMotion#Search(0,2,0) +onoremap (easymotion-bd-n) :call EasyMotion#Search(0,2,0) +xnoremap (easymotion-vim-N) :call EasyMotion#Search(1,1,1) +nnoremap (easymotion-vim-N) :call EasyMotion#Search(0,1,1) +snoremap (easymotion-vim-N) :call EasyMotion#Search(0,1,1) +onoremap (easymotion-vim-N) :call EasyMotion#Search(0,1,1) +xnoremap (easymotion-N) :call EasyMotion#Search(1,1,0) +nnoremap (easymotion-N) :call EasyMotion#Search(0,1,0) +snoremap (easymotion-N) :call EasyMotion#Search(0,1,0) +onoremap (easymotion-N) :call EasyMotion#Search(0,1,0) +xnoremap (easymotion-eol-j) :call EasyMotion#Eol(1,0) +nnoremap (easymotion-eol-j) :call EasyMotion#Eol(0,0) +snoremap (easymotion-eol-j) :call EasyMotion#Eol(0,0) +onoremap (easymotion-eol-j) :call EasyMotion#Eol(0,0) +xnoremap (easymotion-sol-k) :call EasyMotion#Sol(1,1) +nnoremap (easymotion-sol-k) :call EasyMotion#Sol(0,1) +snoremap (easymotion-sol-k) :call EasyMotion#Sol(0,1) +onoremap (easymotion-sol-k) :call EasyMotion#Sol(0,1) +xnoremap (easymotion-sol-j) :call EasyMotion#Sol(1,0) +nnoremap (easymotion-sol-j) :call EasyMotion#Sol(0,0) +snoremap (easymotion-sol-j) :call EasyMotion#Sol(0,0) +onoremap (easymotion-sol-j) :call EasyMotion#Sol(0,0) +xnoremap (easymotion-k) :call EasyMotion#JK(1,1) +nnoremap (easymotion-k) :call EasyMotion#JK(0,1) +snoremap (easymotion-k) :call EasyMotion#JK(0,1) +onoremap (easymotion-k) :call EasyMotion#JK(0,1) +xnoremap (easymotion-j) :call EasyMotion#JK(1,0) +nnoremap (easymotion-j) :call EasyMotion#JK(0,0) +snoremap (easymotion-j) :call EasyMotion#JK(0,0) +onoremap (easymotion-j) :call EasyMotion#JK(0,0) +xnoremap (easymotion-bd-jk) :call EasyMotion#JK(1,2) +nnoremap (easymotion-bd-jk) :call EasyMotion#JK(0,2) +snoremap (easymotion-bd-jk) :call EasyMotion#JK(0,2) +onoremap (easymotion-bd-jk) :call EasyMotion#JK(0,2) +xnoremap (easymotion-eol-bd-jk) :call EasyMotion#Eol(1,2) +nnoremap (easymotion-eol-bd-jk) :call EasyMotion#Eol(0,2) +snoremap (easymotion-eol-bd-jk) :call EasyMotion#Eol(0,2) +onoremap (easymotion-eol-bd-jk) :call EasyMotion#Eol(0,2) +xnoremap (easymotion-sol-bd-jk) :call EasyMotion#Sol(1,2) +nnoremap (easymotion-sol-bd-jk) :call EasyMotion#Sol(0,2) +snoremap (easymotion-sol-bd-jk) :call EasyMotion#Sol(0,2) +onoremap (easymotion-sol-bd-jk) :call EasyMotion#Sol(0,2) +xnoremap (easymotion-eol-k) :call EasyMotion#Eol(1,1) +nnoremap (easymotion-eol-k) :call EasyMotion#Eol(0,1) +snoremap (easymotion-eol-k) :call EasyMotion#Eol(0,1) +onoremap (easymotion-eol-k) :call EasyMotion#Eol(0,1) +xnoremap (easymotion-iskeyword-ge) :call EasyMotion#EK(1,1) +nnoremap (easymotion-iskeyword-ge) :call EasyMotion#EK(0,1) +snoremap (easymotion-iskeyword-ge) :call EasyMotion#EK(0,1) +onoremap (easymotion-iskeyword-ge) :call EasyMotion#EK(0,1) +xnoremap (easymotion-w) :call EasyMotion#WB(1,0) +nnoremap (easymotion-w) :call EasyMotion#WB(0,0) +snoremap (easymotion-w) :call EasyMotion#WB(0,0) +onoremap (easymotion-w) :call EasyMotion#WB(0,0) +xnoremap (easymotion-bd-W) :call EasyMotion#WBW(1,2) +nnoremap (easymotion-bd-W) :call EasyMotion#WBW(0,2) +snoremap (easymotion-bd-W) :call EasyMotion#WBW(0,2) +onoremap (easymotion-bd-W) :call EasyMotion#WBW(0,2) +xnoremap (easymotion-iskeyword-w) :call EasyMotion#WBK(1,0) +nnoremap (easymotion-iskeyword-w) :call EasyMotion#WBK(0,0) +snoremap (easymotion-iskeyword-w) :call EasyMotion#WBK(0,0) +onoremap (easymotion-iskeyword-w) :call EasyMotion#WBK(0,0) +xnoremap (easymotion-gE) :call EasyMotion#EW(1,1) +nnoremap (easymotion-gE) :call EasyMotion#EW(0,1) +snoremap (easymotion-gE) :call EasyMotion#EW(0,1) +onoremap (easymotion-gE) :call EasyMotion#EW(0,1) +xnoremap (easymotion-e) :call EasyMotion#E(1,0) +nnoremap (easymotion-e) :call EasyMotion#E(0,0) +snoremap (easymotion-e) :call EasyMotion#E(0,0) +onoremap (easymotion-e) :call EasyMotion#E(0,0) +xnoremap (easymotion-bd-E) :call EasyMotion#EW(1,2) +nnoremap (easymotion-bd-E) :call EasyMotion#EW(0,2) +snoremap (easymotion-bd-E) :call EasyMotion#EW(0,2) +onoremap (easymotion-bd-E) :call EasyMotion#EW(0,2) +xnoremap (easymotion-iskeyword-e) :call EasyMotion#EK(1,0) +nnoremap (easymotion-iskeyword-e) :call EasyMotion#EK(0,0) +snoremap (easymotion-iskeyword-e) :call EasyMotion#EK(0,0) +onoremap (easymotion-iskeyword-e) :call EasyMotion#EK(0,0) +xnoremap (easymotion-b) :call EasyMotion#WB(1,1) +nnoremap (easymotion-b) :call EasyMotion#WB(0,1) +snoremap (easymotion-b) :call EasyMotion#WB(0,1) +onoremap (easymotion-b) :call EasyMotion#WB(0,1) +xnoremap (easymotion-iskeyword-b) :call EasyMotion#WBK(1,1) +nnoremap (easymotion-iskeyword-b) :call EasyMotion#WBK(0,1) +snoremap (easymotion-iskeyword-b) :call EasyMotion#WBK(0,1) +onoremap (easymotion-iskeyword-b) :call EasyMotion#WBK(0,1) +xnoremap (easymotion-iskeyword-bd-w) :call EasyMotion#WBK(1,2) +nnoremap (easymotion-iskeyword-bd-w) :call EasyMotion#WBK(0,2) +snoremap (easymotion-iskeyword-bd-w) :call EasyMotion#WBK(0,2) +onoremap (easymotion-iskeyword-bd-w) :call EasyMotion#WBK(0,2) +xnoremap (easymotion-W) :call EasyMotion#WBW(1,0) +nnoremap (easymotion-W) :call EasyMotion#WBW(0,0) +snoremap (easymotion-W) :call EasyMotion#WBW(0,0) +onoremap (easymotion-W) :call EasyMotion#WBW(0,0) +xnoremap (easymotion-bd-w) :call EasyMotion#WB(1,2) +nnoremap (easymotion-bd-w) :call EasyMotion#WB(0,2) +snoremap (easymotion-bd-w) :call EasyMotion#WB(0,2) +onoremap (easymotion-bd-w) :call EasyMotion#WB(0,2) +xnoremap (easymotion-iskeyword-bd-e) :call EasyMotion#EK(1,2) +nnoremap (easymotion-iskeyword-bd-e) :call EasyMotion#EK(0,2) +snoremap (easymotion-iskeyword-bd-e) :call EasyMotion#EK(0,2) +onoremap (easymotion-iskeyword-bd-e) :call EasyMotion#EK(0,2) +xnoremap (easymotion-ge) :call EasyMotion#E(1,1) +nnoremap (easymotion-ge) :call EasyMotion#E(0,1) +snoremap (easymotion-ge) :call EasyMotion#E(0,1) +onoremap (easymotion-ge) :call EasyMotion#E(0,1) +xnoremap (easymotion-E) :call EasyMotion#EW(1,0) +nnoremap (easymotion-E) :call EasyMotion#EW(0,0) +snoremap (easymotion-E) :call EasyMotion#EW(0,0) +onoremap (easymotion-E) :call EasyMotion#EW(0,0) +xnoremap (easymotion-bd-e) :call EasyMotion#E(1,2) +nnoremap (easymotion-bd-e) :call EasyMotion#E(0,2) +snoremap (easymotion-bd-e) :call EasyMotion#E(0,2) +onoremap (easymotion-bd-e) :call EasyMotion#E(0,2) +xnoremap (easymotion-B) :call EasyMotion#WBW(1,1) +nnoremap (easymotion-B) :call EasyMotion#WBW(0,1) +snoremap (easymotion-B) :call EasyMotion#WBW(0,1) +onoremap (easymotion-B) :call EasyMotion#WBW(0,1) +nnoremap (easymotion-overwin-w) :call EasyMotion#overwin#w() +nnoremap (easymotion-overwin-line) :call EasyMotion#overwin#line() +nnoremap (easymotion-overwin-f2) :call EasyMotion#OverwinF(2) +nnoremap (easymotion-overwin-f) :call EasyMotion#OverwinF(1) +xnoremap (easymotion-Tln) :call EasyMotion#TL(-1,1,1) +nnoremap (easymotion-Tln) :call EasyMotion#TL(-1,0,1) +snoremap (easymotion-Tln) :call EasyMotion#TL(-1,0,1) +onoremap (easymotion-Tln) :call EasyMotion#TL(-1,0,1) +xnoremap (easymotion-t2) :call EasyMotion#T(2,1,0) +nnoremap (easymotion-t2) :call EasyMotion#T(2,0,0) +snoremap (easymotion-t2) :call EasyMotion#T(2,0,0) +onoremap (easymotion-t2) :call EasyMotion#T(2,0,0) +xnoremap (easymotion-t) :call EasyMotion#T(1,1,0) +nnoremap (easymotion-t) :call EasyMotion#T(1,0,0) +snoremap (easymotion-t) :call EasyMotion#T(1,0,0) +onoremap (easymotion-t) :call EasyMotion#T(1,0,0) +xnoremap (easymotion-s) :call EasyMotion#S(1,1,2) +nnoremap (easymotion-s) :call EasyMotion#S(1,0,2) +snoremap (easymotion-s) :call EasyMotion#S(1,0,2) +onoremap (easymotion-s) :call EasyMotion#S(1,0,2) +xnoremap (easymotion-tn) :call EasyMotion#T(-1,1,0) +nnoremap (easymotion-tn) :call EasyMotion#T(-1,0,0) +snoremap (easymotion-tn) :call EasyMotion#T(-1,0,0) +onoremap (easymotion-tn) :call EasyMotion#T(-1,0,0) +xnoremap (easymotion-bd-t2) :call EasyMotion#T(2,1,2) +nnoremap (easymotion-bd-t2) :call EasyMotion#T(2,0,2) +snoremap (easymotion-bd-t2) :call EasyMotion#T(2,0,2) +onoremap (easymotion-bd-t2) :call EasyMotion#T(2,0,2) +xnoremap (easymotion-tl) :call EasyMotion#TL(1,1,0) +nnoremap (easymotion-tl) :call EasyMotion#TL(1,0,0) +snoremap (easymotion-tl) :call EasyMotion#TL(1,0,0) +onoremap (easymotion-tl) :call EasyMotion#TL(1,0,0) +xnoremap (easymotion-bd-tn) :call EasyMotion#T(-1,1,2) +nnoremap (easymotion-bd-tn) :call EasyMotion#T(-1,0,2) +snoremap (easymotion-bd-tn) :call EasyMotion#T(-1,0,2) +onoremap (easymotion-bd-tn) :call EasyMotion#T(-1,0,2) +xnoremap (easymotion-fn) :call EasyMotion#S(-1,1,0) +nnoremap (easymotion-fn) :call EasyMotion#S(-1,0,0) +snoremap (easymotion-fn) :call EasyMotion#S(-1,0,0) +onoremap (easymotion-fn) :call EasyMotion#S(-1,0,0) +xnoremap (easymotion-bd-tl) :call EasyMotion#TL(1,1,2) +nnoremap (easymotion-bd-tl) :call EasyMotion#TL(1,0,2) +snoremap (easymotion-bd-tl) :call EasyMotion#TL(1,0,2) +onoremap (easymotion-bd-tl) :call EasyMotion#TL(1,0,2) +xnoremap (easymotion-fl) :call EasyMotion#SL(1,1,0) +nnoremap (easymotion-fl) :call EasyMotion#SL(1,0,0) +snoremap (easymotion-fl) :call EasyMotion#SL(1,0,0) +onoremap (easymotion-fl) :call EasyMotion#SL(1,0,0) +xnoremap (easymotion-bd-tl2) :call EasyMotion#TL(2,1,2) +nnoremap (easymotion-bd-tl2) :call EasyMotion#TL(2,0,2) +snoremap (easymotion-bd-tl2) :call EasyMotion#TL(2,0,2) +onoremap (easymotion-bd-tl2) :call EasyMotion#TL(2,0,2) +xnoremap (easymotion-bd-fn) :call EasyMotion#S(-1,1,2) +nnoremap (easymotion-bd-fn) :call EasyMotion#S(-1,0,2) +snoremap (easymotion-bd-fn) :call EasyMotion#S(-1,0,2) +onoremap (easymotion-bd-fn) :call EasyMotion#S(-1,0,2) +xnoremap (easymotion-f) :call EasyMotion#S(1,1,0) +nnoremap (easymotion-f) :call EasyMotion#S(1,0,0) +snoremap (easymotion-f) :call EasyMotion#S(1,0,0) +onoremap (easymotion-f) :call EasyMotion#S(1,0,0) +xnoremap (easymotion-bd-fl) :call EasyMotion#SL(1,1,2) +nnoremap (easymotion-bd-fl) :call EasyMotion#SL(1,0,2) +snoremap (easymotion-bd-fl) :call EasyMotion#SL(1,0,2) +onoremap (easymotion-bd-fl) :call EasyMotion#SL(1,0,2) +xnoremap (easymotion-Fl2) :call EasyMotion#SL(2,1,1) +nnoremap (easymotion-Fl2) :call EasyMotion#SL(2,0,1) +snoremap (easymotion-Fl2) :call EasyMotion#SL(2,0,1) +onoremap (easymotion-Fl2) :call EasyMotion#SL(2,0,1) +xnoremap (easymotion-tl2) :call EasyMotion#TL(2,1,0) +nnoremap (easymotion-tl2) :call EasyMotion#TL(2,0,0) +snoremap (easymotion-tl2) :call EasyMotion#TL(2,0,0) +onoremap (easymotion-tl2) :call EasyMotion#TL(2,0,0) +xnoremap (easymotion-f2) :call EasyMotion#S(2,1,0) +nnoremap (easymotion-f2) :call EasyMotion#S(2,0,0) +snoremap (easymotion-f2) :call EasyMotion#S(2,0,0) +onoremap (easymotion-f2) :call EasyMotion#S(2,0,0) +xnoremap (easymotion-Fln) :call EasyMotion#SL(-1,1,1) +nnoremap (easymotion-Fln) :call EasyMotion#SL(-1,0,1) +snoremap (easymotion-Fln) :call EasyMotion#SL(-1,0,1) +onoremap (easymotion-Fln) :call EasyMotion#SL(-1,0,1) +xnoremap (easymotion-sln) :call EasyMotion#SL(-1,1,2) +nnoremap (easymotion-sln) :call EasyMotion#SL(-1,0,2) +snoremap (easymotion-sln) :call EasyMotion#SL(-1,0,2) +onoremap (easymotion-sln) :call EasyMotion#SL(-1,0,2) +xnoremap (easymotion-tln) :call EasyMotion#TL(-1,1,0) +nnoremap (easymotion-tln) :call EasyMotion#TL(-1,0,0) +snoremap (easymotion-tln) :call EasyMotion#TL(-1,0,0) +onoremap (easymotion-tln) :call EasyMotion#TL(-1,0,0) +xnoremap (easymotion-fl2) :call EasyMotion#SL(2,1,0) +nnoremap (easymotion-fl2) :call EasyMotion#SL(2,0,0) +snoremap (easymotion-fl2) :call EasyMotion#SL(2,0,0) +onoremap (easymotion-fl2) :call EasyMotion#SL(2,0,0) +xnoremap (easymotion-bd-fl2) :call EasyMotion#SL(2,1,2) +nnoremap (easymotion-bd-fl2) :call EasyMotion#SL(2,0,2) +snoremap (easymotion-bd-fl2) :call EasyMotion#SL(2,0,2) +onoremap (easymotion-bd-fl2) :call EasyMotion#SL(2,0,2) +xnoremap (easymotion-T2) :call EasyMotion#T(2,1,1) +nnoremap (easymotion-T2) :call EasyMotion#T(2,0,1) +snoremap (easymotion-T2) :call EasyMotion#T(2,0,1) +onoremap (easymotion-T2) :call EasyMotion#T(2,0,1) +xnoremap (easymotion-bd-tln) :call EasyMotion#TL(-1,1,2) +nnoremap (easymotion-bd-tln) :call EasyMotion#TL(-1,0,2) +snoremap (easymotion-bd-tln) :call EasyMotion#TL(-1,0,2) +onoremap (easymotion-bd-tln) :call EasyMotion#TL(-1,0,2) +xnoremap (easymotion-T) :call EasyMotion#T(1,1,1) +nnoremap (easymotion-T) :call EasyMotion#T(1,0,1) +snoremap (easymotion-T) :call EasyMotion#T(1,0,1) +onoremap (easymotion-T) :call EasyMotion#T(1,0,1) +xnoremap (easymotion-bd-t) :call EasyMotion#T(1,1,2) +nnoremap (easymotion-bd-t) :call EasyMotion#T(1,0,2) +snoremap (easymotion-bd-t) :call EasyMotion#T(1,0,2) +onoremap (easymotion-bd-t) :call EasyMotion#T(1,0,2) +xnoremap (easymotion-Tn) :call EasyMotion#T(-1,1,1) +nnoremap (easymotion-Tn) :call EasyMotion#T(-1,0,1) +snoremap (easymotion-Tn) :call EasyMotion#T(-1,0,1) +onoremap (easymotion-Tn) :call EasyMotion#T(-1,0,1) +xnoremap (easymotion-s2) :call EasyMotion#S(2,1,2) +nnoremap (easymotion-s2) :call EasyMotion#S(2,0,2) +snoremap (easymotion-s2) :call EasyMotion#S(2,0,2) +onoremap (easymotion-s2) :call EasyMotion#S(2,0,2) +xnoremap (easymotion-Tl) :call EasyMotion#TL(1,1,1) +nnoremap (easymotion-Tl) :call EasyMotion#TL(1,0,1) +snoremap (easymotion-Tl) :call EasyMotion#TL(1,0,1) +onoremap (easymotion-Tl) :call EasyMotion#TL(1,0,1) +xnoremap (easymotion-sn) :call EasyMotion#S(-1,1,2) +nnoremap (easymotion-sn) :call EasyMotion#S(-1,0,2) +snoremap (easymotion-sn) :call EasyMotion#S(-1,0,2) +onoremap (easymotion-sn) :call EasyMotion#S(-1,0,2) +xnoremap (easymotion-Fn) :call EasyMotion#S(-1,1,1) +nnoremap (easymotion-Fn) :call EasyMotion#S(-1,0,1) +snoremap (easymotion-Fn) :call EasyMotion#S(-1,0,1) +onoremap (easymotion-Fn) :call EasyMotion#S(-1,0,1) +xnoremap (easymotion-sl) :call EasyMotion#SL(1,1,2) +nnoremap (easymotion-sl) :call EasyMotion#SL(1,0,2) +snoremap (easymotion-sl) :call EasyMotion#SL(1,0,2) +onoremap (easymotion-sl) :call EasyMotion#SL(1,0,2) +xnoremap (easymotion-Fl) :call EasyMotion#SL(1,1,1) +nnoremap (easymotion-Fl) :call EasyMotion#SL(1,0,1) +snoremap (easymotion-Fl) :call EasyMotion#SL(1,0,1) +onoremap (easymotion-Fl) :call EasyMotion#SL(1,0,1) +xnoremap (easymotion-sl2) :call EasyMotion#SL(2,1,2) +nnoremap (easymotion-sl2) :call EasyMotion#SL(2,0,2) +snoremap (easymotion-sl2) :call EasyMotion#SL(2,0,2) +onoremap (easymotion-sl2) :call EasyMotion#SL(2,0,2) +xnoremap (easymotion-bd-fln) :call EasyMotion#SL(-1,1,2) +nnoremap (easymotion-bd-fln) :call EasyMotion#SL(-1,0,2) +snoremap (easymotion-bd-fln) :call EasyMotion#SL(-1,0,2) +onoremap (easymotion-bd-fln) :call EasyMotion#SL(-1,0,2) +xnoremap (easymotion-F) :call EasyMotion#S(1,1,1) +nnoremap (easymotion-F) :call EasyMotion#S(1,0,1) +snoremap (easymotion-F) :call EasyMotion#S(1,0,1) +onoremap (easymotion-F) :call EasyMotion#S(1,0,1) +xnoremap (easymotion-bd-f) :call EasyMotion#S(1,1,2) +nnoremap (easymotion-bd-f) :call EasyMotion#S(1,0,2) +snoremap (easymotion-bd-f) :call EasyMotion#S(1,0,2) +onoremap (easymotion-bd-f) :call EasyMotion#S(1,0,2) +xnoremap (easymotion-F2) :call EasyMotion#S(2,1,1) +nnoremap (easymotion-F2) :call EasyMotion#S(2,0,1) +snoremap (easymotion-F2) :call EasyMotion#S(2,0,1) +onoremap (easymotion-F2) :call EasyMotion#S(2,0,1) +xnoremap (easymotion-bd-f2) :call EasyMotion#S(2,1,2) +nnoremap (easymotion-bd-f2) :call EasyMotion#S(2,0,2) +snoremap (easymotion-bd-f2) :call EasyMotion#S(2,0,2) +onoremap (easymotion-bd-f2) :call EasyMotion#S(2,0,2) +xnoremap (easymotion-Tl2) :call EasyMotion#TL(2,1,1) +nnoremap (easymotion-Tl2) :call EasyMotion#TL(2,0,1) +snoremap (easymotion-Tl2) :call EasyMotion#TL(2,0,1) +onoremap (easymotion-Tl2) :call EasyMotion#TL(2,0,1) +xnoremap (easymotion-fln) :call EasyMotion#SL(-1,1,0) +nnoremap (easymotion-fln) :call EasyMotion#SL(-1,0,0) +snoremap (easymotion-fln) :call EasyMotion#SL(-1,0,0) +onoremap (easymotion-fln) :call EasyMotion#SL(-1,0,0) +inoremap  pumvisible() ? "\" : "\ " +let &cpo=s:cpo_save +unlet s:cpo_save +set autoindent +set backspace=indent,eol,start +set completefunc=youcompleteme#CompleteFunc +set completeopt=preview,menuone +set cpoptions=aAceFsB +set fileencodings=ucs-bom,utf-8,default,latin1 +set fillchars=vert:|,fold:-,vert:│ +set helplang=en +set hidden +set nomodeline +set printoptions=paper:letter +set ruler +set runtimepath=~/.vim,~/.vim/bundle/JustDo,~/.vim/bundle/YouCompleteMe,~/.vim/bundle/vim-easymotion,~/.vim/bundle/vim-tmux-navigator,~/.vim/bundle/yats.vim,/var/lib/vim/addons,/usr/share/vim/vimfiles,/usr/share/vim/vim74,/usr/share/vim/vimfiles/after,/var/lib/vim/addons/after,~/.vim/after +set shortmess=filnxtToOc +set suffixes=.bak,~,.swp,.o,.info,.aux,.log,.dvi,.bbl,.blg,.brf,.cb,.ind,.idx,.ilg,.inx,.out,.toc +set wildignore=*.pyc +let s:so_save = &so | let s:siso_save = &siso | set so=0 siso=0 +let v:this_session=expand(":p") +silent only +cd /c/Users/Codename01/Desktop/projects/pixigame/exporter +if expand('%') == '' && !&modified && line('$') <= 1 && getline(1) == '' + let s:wipebuf = bufnr('%') +endif +set shortmess=aoO +badd +1 exporter.py +badd +1 driver.py +badd +1 job.py +badd +0 args.py +argglobal +silent! argdel * +argadd exporter.py +edit args.py +set splitbelow splitright +set nosplitbelow +set nosplitright +wincmd t +set winheight=1 winwidth=1 +argglobal +setlocal keymap= +setlocal noarabic +setlocal autoindent +setlocal backupcopy= +setlocal nobinary +setlocal nobreakindent +setlocal breakindentopt= +setlocal bufhidden= +setlocal buflisted +setlocal buftype= +setlocal nocindent +setlocal cinkeys=0{,0},0),:,!^F,o,O,e +setlocal cinoptions= +setlocal cinwords=if,else,while,do,for,switch +setlocal colorcolumn= +setlocal comments=b:#,fb:- +setlocal commentstring=#\ %s +setlocal complete=.,w,b,u,t,i +setlocal concealcursor= +setlocal conceallevel=0 +setlocal completefunc=youcompleteme#CompleteFunc +setlocal nocopyindent +setlocal cryptmethod= +setlocal nocursorbind +setlocal nocursorcolumn +setlocal nocursorline +setlocal define= +setlocal dictionary= +setlocal nodiff +setlocal equalprg= +setlocal errorformat= +setlocal expandtab +if &filetype != 'python' +setlocal filetype=python +endif +setlocal fixendofline +setlocal foldcolumn=0 +setlocal foldenable +setlocal foldexpr=0 +setlocal foldignore=# +setlocal foldlevel=0 +setlocal foldmarker={{{,}}} +setlocal foldmethod=manual +setlocal foldminlines=1 +setlocal foldnestmax=20 +setlocal foldtext=foldtext() +setlocal formatexpr= +setlocal formatoptions=tcq +setlocal formatlistpat=^\\s*\\d\\+[\\]:.)}\\t\ ]\\s* +setlocal grepprg= +setlocal iminsert=0 +setlocal imsearch=0 +setlocal include=^\\s*\\(from\\|import\\) +setlocal includeexpr=substitute(v:fname,'\\.','/','g') +setlocal indentexpr=GetPythonIndent(v:lnum) +setlocal indentkeys=0{,0},:,!^F,o,O,e,<:>,=elif,=except +setlocal noinfercase +setlocal iskeyword=@,48-57,_,192-255 +setlocal keywordprg=pydoc +setlocal nolinebreak +setlocal nolisp +setlocal lispwords= +setlocal nolist +setlocal makeprg= +setlocal matchpairs=(:),{:},[:] +setlocal nomodeline +setlocal modifiable +setlocal nrformats=bin,octal,hex +set number +setlocal number +setlocal numberwidth=4 +setlocal omnifunc=pythoncomplete#Complete +setlocal path= +setlocal nopreserveindent +setlocal nopreviewwindow +setlocal quoteescape=\\ +setlocal noreadonly +setlocal norelativenumber +setlocal norightleft +setlocal rightleftcmd=search +setlocal noscrollbind +setlocal shiftwidth=2 +setlocal noshortname +setlocal nosmartindent +setlocal softtabstop=2 +setlocal nospell +setlocal spellcapcheck=[.?!]\\_[\\])'\"\ \ ]\\+ +setlocal spellfile= +setlocal spelllang=en +setlocal statusline= +setlocal suffixesadd=.py +setlocal swapfile +setlocal synmaxcol=3000 +if &syntax != 'python' +setlocal syntax=python +endif +setlocal tabstop=8 +setlocal tagcase= +setlocal tags= +setlocal textwidth=0 +setlocal thesaurus= +setlocal noundofile +setlocal undolevels=-123456 +setlocal nowinfixheight +setlocal nowinfixwidth +setlocal wrap +setlocal wrapmargin=0 +silent! normal! zE +let s:l = 1 - ((0 * winheight(0) + 22) / 44) +if s:l < 1 | let s:l = 1 | endif +exe s:l +normal! zt +1 +normal! 0 +tabnext 1 +if exists('s:wipebuf') + silent exe 'bwipe ' . s:wipebuf +endif +unlet! s:wipebuf +set winheight=1 winwidth=20 shortmess=filnxtToOc +let s:sx = expand(":p:r")."x.vim" +if file_readable(s:sx) + exe "source " . fnameescape(s:sx) +endif +let &so = s:so_save | let &siso = s:siso_save +doautoall SessionLoadPost +unlet SessionLoad +" vim: set ft=vim :