Editaction was relying on Shell's
editverb. But while using KP I was getting trouble due to some file types not being associated.
editoris empty, default is to try with Shell's
editverb. As a fallback.
filescatalog.inibut its only scanning the root directory, how to get it recursively like the screenshot in §5.2?
[profile/PortableApps] activate = yes inherit = ExeOnly paths = C:\Portable\PortableApps\* max_depth = 1 filters = ext: .exe include_hidden = no include_dirs = no include_files = yes # FilesCatalog.FilesCatalog: Profile PortableApps: found 1 item in 0.0 seconds
@cpriest KP already implements the typical bonuses one may want to apply like consecutive chars, word prefix, acronym, full word, full match... So I'm not sure why you get this result in your example. Added that to my to-do list.
Regarding your request, check out #221. Don't be tricked by the description of the feature, I'm not positive yet about the best way to implement it (i.e. GUI, UX, ...), so comments are welcome.
@ueffel yes, I grebbed the conversions from the Android app RealCalc (an HP-like RPN calculator) and in converting the XML export to my JSON, I dropped the 'offset' and 'inverse' attributes.
@polyvertex I had some weird issues trying to use the pyparsing package - apparently, the way the plugins get reloaded interfere with the use of super(type,self) that is prevalent in that package. Where is the right place to ask dev-related questions?
@ueffel ah yep, so I did misinterpret the data ^^
@DrorHarari_twitter mmh I don't know how pyparsing works under the hood so I cannot confirm. FYI, KP does not keep track of dependencies so only package's
.py modules are reloaded. Which means in your case that pyparsing does not get re-imported by the interpreter. So for instance, if pyparsing creates global variables (i.e. at module-level) and does not offer a way to clean its internal state, you might get into trouble.
@polyvertex Well, I guess it is a general Python issue, internally there is a code such as this:
def init( self, matchString ):
and it crash on the last line in the super() call saying the second parameter (self) should be an instance of the first (which it is the class). Digging into it, the Python internals have two versions of the Literal class with two IDs (because it was reloaded). So I dumped this and used something simpler.
What is the general rule for adding 3'rd party dependencies to my plugin? (something I might have installed with pip). Are there restrictions to what I can bring (other that issues like above) and where do I put those dependencies?
@DrorHarari_twitter it is a Python issue yes, but only if you consider there's no design flaw in pyparsing.
What is the general rule for adding 3'rd party dependencies to my plugin?
Any pure Python package should do, although the lighter the better obviously. Also, it is good practice to store them in a sub-folder, called
lib by convention (like in the TaskSwitcher or Calc package). This is because that way, KP does not have to introspect them at loading time to check if there are some Plugin classes to instanciate. This also makes your code cleaner since you can then use relative import notation as opposed as the absolute one you're currently using in your plugin.
It is also cleaner, but not compulsory, to put data files in a separate sub-folder, like in the URL or WebSuggest package.