protected override string ExecuteContextMenu(Result selectedResult) { JsonRPCServerRequestModel request = new JsonRPCServerRequestModel { Method = "contextmenu", Parameters = new object[] { selectedResult.ContextData }, }; _startInfo.Arguments = $"\"{request}\""; return(Execute(_startInfo)); }
protected override string ExecuteQuery(Query query) { var request = new JsonRPCServerRequestModel { Method = "query", Parameters = new object[] { query.Search } }; _startInfo.Arguments = $"\"{request}\""; return(Execute(_startInfo)); }
protected override string ExecuteContextMenu(Result selectedResult) { JsonRPCServerRequestModel request = new JsonRPCServerRequestModel { Method = "context_menu", Parameters = new object[] { selectedResult.ContextData }, }; _startInfo.Arguments = $"-B \"{context.CurrentPluginMetadata.ExecuteFilePath}\" \"{request}\""; _startInfo.WorkingDirectory = context.CurrentPluginMetadata.PluginDirectory; return(Execute(_startInfo)); }
protected override string ExecuteQuery(Query query) { JsonRPCServerRequestModel request = new JsonRPCServerRequestModel { Method = "query", Parameters = new object[] { query.GetAllRemainingParameter() }, HttpProxy = HttpProxy.Instance }; //Add -B flag to tell python don't write .py[co] files. Because .pyc contains location infos which will prevent python portable _startInfo.FileName = Path.Combine(PythonHome, "pythonw.exe"); _startInfo.Arguments = $"-B \"{context.CurrentPluginMetadata.ExecuteFilePath}\" \"{request}\""; return Execute(_startInfo); }
protected override string ExecuteQuery(Query query) { JsonRPCServerRequestModel request = new JsonRPCServerRequestModel { Method = "query", Parameters = new object[] { query.Search }, HttpProxy = HttpProxy.Instance }; //Add -B flag to tell python don't write .py[co] files. Because .pyc contains location infos which will prevent python portable _startInfo.Arguments = $"-B \"{context.CurrentPluginMetadata.ExecuteFilePath}\" \"{request}\""; return(Execute(_startInfo)); }
protected override string ExecuteQuery(Query query) { JsonRPCServerRequestModel request = new JsonRPCServerRequestModel() { Method = "query", Parameters = new object[] { query.GetAllRemainingParameter() }, HttpProxy = HttpProxy.Instance }; //Add -B flag to tell python don't write .py[co] files. Because .pyc contains location infos which will prevent python portable startInfo.FileName = Path.Combine(woxDirectory, "PythonHome\\pythonw.exe"); startInfo.Arguments = string.Format("-B \"{0}\" \"{1}\"", context.CurrentPluginMetadata.ExecuteFilePath, request); return(Execute(startInfo)); }
protected override string ExecuteQuery(Query query) { JsonRPCServerRequestModel request = new JsonRPCServerRequestModel { Method = "query", Parameters = new object[] { query.Search }, }; //Add -B flag to tell python don't write .py[co] files. Because .pyc contains location infos which will prevent python portable _startInfo.Arguments = $"-B \"{context.CurrentPluginMetadata.ExecuteFilePath}\" \"{request}\""; // todo happlebao why context can't be used in constructor _startInfo.WorkingDirectory = context.CurrentPluginMetadata.PluginDirectory; return(Execute(_startInfo)); }