Giter Club home page Giter Club logo

keypirinha-packagecontrol's Introduction

Keypirinha Package Control

This is a package for the fast keystroke launcher keypirinha (http://keypirinha.com/). It provides commands to install, update and remove third party packages.

Usage

All commands are prefixed with PackageControl:.

command function
Install Package Downloads the new package and installs it
Update Package Checks if a new version of the package is available and updates if so
Update All Packages Does the Update Package command for all installed packages
Remove Package Deinstalls the package (configurations are untouched)
Reinstall Package Deinstalls the package and installs it again (configurations are untouched)
Reinstall Untracked Reinstalls a already installed package, that was not installed
through PackageControl (untracked package)
Reinstall All Untracked Does the Reinstall Untracked command for all untracked packages
Update Repository List Downloads the list of available package again

Usage

Installation

Directly from Keypirinha

  • Open the Keypirinha: Console (Shortcut: F2)

  • Enter the following:

    import keypirinha as kp,keypirinha_net as kpn,os;p="PackageControl.keypirinha-package";d=kpn.build_urllib_opener().open("https://github.com/ueffel/Keypirinha-PackageControl/releases/download/1.0.5/"+p);pb=d.read();d.close();f=open(os.path.join(kp.installed_package_dir(),p),"wb");f.write(pb);f.close()

Manually

  • Download the PackageControl.keypirinha-package from the releases
  • Copy the file into %APPDATA%\Keypirinha\InstalledPackages (installed mode) or <Keypirinha_Home>\portable\Profile\InstalledPackages (portable mode)

Problems

If you have any problems after updating packages, please try to restart Keypirinha and see if the problems are still there. The reason for some problems can be Live Reloading of packages, also related: this issue.

TL;DR: Python's import/unload machinery can sometimes do weird stuff at runtime. Restarting the python interpreter (which means restarting Keypirinha) helps.

Troubleshooting

As multiple users reported problems that PackageControl just shows "Collecting packages" (#8, #11, #16), here are 2 quick solutions to solve this:

  • Install the current version of PackageControl by running the code snippet above (as this particular problem is fixed in #11) or
  • Locate the corrupt last.run file that causes the problem and delete it. In installed mode it would be located in c:\Users\<username>\AppData\Local\Keypirinha\Packages\PackageControl\last.run and in portable mode in <Keypirinha_Home>\portable\Local\Packages\PackageControl\last.run.
    After that you should use the Reinstall Package item in keypirinha to reinstall PackageControl to make absolutly sure you have the latest version.

Default Repository

Overview

The default repository is maintained by myself, it's called "ueffel's Package Repository". An overview of available packages can be viewed here.

Submit your own package

If you created your own package and want it to be available via PackageControl to other Keypirinha users you can submit it here. The preferred way of publishing is Github. Your package repository should have the ready-to-use .keypirinha-package file in the release section. The package repository looks for the newest release (not pre-release) that has such a file und exposes it.

keypirinha-packagecontrol's People

Contributors

ueffel avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

Forkers

jarvis-ai

keypirinha-packagecontrol's Issues

:)

Dear @ueffel, just passing by to say this package is awesome ๐Ÿ‘“ ! kthxby

Error with PackageControl in parsing date time

Windows 10 version 1909 (18363.1139)
Region: India
Format: English (India)
KeyPirinha version: 2.25

packagecontrol.ini content

[main]
repository = https://ue.spdns.de/packagecontrol/packages.json

Error in Console:

12:29:21.649 ** ERROR: PackageControl.PackageControl: Available packages could not be obtained:
Traceback (most recent call last):
File "D:\Dropbox\Tools\Keypirinha\portable\Profile\InstalledPackages\PackageControl.keypirinha-package\packagecontrol.py", line 410, in _get_available_packages
File "D:\Dropbox\Tools\Keypirinha\portable\Profile\InstalledPackages\PackageControl.keypirinha-package\packagecontrol.py", line 512, in _get_last_run
File "D:\Dropbox\Tools\Keypirinha\portable\Profile\InstalledPackages\PackageControl.keypirinha-package\packagecontrol.py", line 499, in _make_date
File "lib_strptime.py", line 577, in _strptime_datetime
File "lib_strptime.py", line 359, in _strptime
ValueError: time data '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00+0000' does not match format '%Y-%m-%dT%H:%M:%S%z'
12:29:21.650 ** ERROR: Error from PackageControl.PackageControl.on_suggest: <class 'TypeError'>: 'NoneType' object is not iterable
Traceback (most recent call last):
File "D:\Dropbox\Tools\Keypirinha\portable\Profile\InstalledPackages\PackageControl.keypirinha-package\packagecontrol.py", line 200, in on_suggest

Kill package is not listed

Even after updating the repository list, the Kill package / plugin which is listed here is not found by the package install command when entering "kill" as a search string. Also using the full string "Keypirinha-Plugin-Kill" as noted here does not work. Any idea why that is?

SSL certificate expired? Stuck on "Collecting Packages"

Like other issues #8 Package Control is stuck on collecting the packages.

image

I looked at the console, and it mentions something about the SSL certificate:

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "D:\USER-SOFTWARE\WindowsUtilities\Keypirinha\portable\Profile\InstalledPackages\PackageControl.keypirinha-package\packagecontrol.py", line 455, in _get_available_packages
  File "D:\USER-SOFTWARE\WindowsUtilities\Keypirinha\portable\Profile\InstalledPackages\PackageControl.keypirinha-package\packagecontrol.py", line 435, in _get_available_packages
  File "D:\USER-SOFTWARE\WindowsUtilities\Keypirinha\python\site\keypirinha_net.py", line 40, in open
    fullurl, *args, data=data, timeout=timeout, **kwargs)
  File "lib\urllib\request.py", line 525, in open
  File "lib\urllib\request.py", line 543, in _open
  File "lib\urllib\request.py", line 503, in _call_chain
  File "lib\urllib\request.py", line 1360, in https_open
  File "lib\urllib\request.py", line 1319, in do_open
urllib.error.URLError: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: certificate has expired (_ssl.c:1076)>
12:01:41.739 ** ERROR: Error from PackageControl.PackageControl.on_suggest: <class 'TypeError'>: 'NoneType' object is not iterable
Traceback (most recent call last):
  File "D:\USER-SOFTWARE\WindowsUtilities\Keypirinha\portable\Profile\InstalledPackages\PackageControl.keypirinha-package\packagecontrol.py", line 199, in on_suggest

I tried reinstalling manually (copied latest release into "InstalledPackages" directory, overwriting "old" version), but the error seems to persist.

Error obtaining packages

Hello there!

I have been using Keypirinha for quite some time now and I really love the concept of this package!
However, whenever I try to update an existing package or install a new one, the package seems to crash. The logs display this:

2018-08-29 10:51:34.604 [i] Bookmarks.Bookmarks: Referenced 88 bookmarks
2018-08-29 10:51:52.167 [E] PackageControl.PackageControl: Available packages could not be obtained:
 Traceback (most recent call last):
  File "C:\Users\andreas\tools\Keypirinha\portable\Profile\InstalledPackages\PackageControl.keypirinha-package\packagecontrol.py", line 376, in _get_available_packages
  File "lib\json\__init__.py", line 312, in loads
TypeError: the JSON object must be str, not 'bytes'

2018-08-29 10:51:52.167 [E] Error from PackageControl.PackageControl.on_suggest: <class 'TypeError'>: 'NoneType' object is not iterable

I'm using the portable version of keypirinha, is that a problem?

Packages info

This is a coupled feature request due to its nature.

I'm aware you do not (really) keep that in the packages.json but what I miss the most is some info about the author & source of the list packages. For that reason, it would be nice to have the following features implemented in PackageControl:

  • Display (perhaps optionally?) the author of the package somewhere. I would tend to prefer it being appended to the package name (i.e. item's label) so that it can be searched. For instance, if I wish to list every package from @ueffel I would just type @ue or something similar. Thus, the display format of items' label would be like AnyPackageName (@ueffel) for example.

  • Add an extra action so the user can visit the repository of the selected package. Typically from everywhere the user has to choose a package to proceed, like with the Install Package item.

Server-side repository?

As mentioned in Keypirinha/Keypirinha#71 (comment) and in case you are willing to share, it might be a good idea create a repo dedicated to the server-side - or just a folder into this repo I don't know - so that users could provide PRs already?

I for one would be interested (e.g. #6)

don't work with http proxy with authentification

Hello, first thank you for your work.

I have the following stacktrace with my corp proxy :
Traceback (most recent call last):
File "Keypirinha\portable\Profile\InstalledPackages\PackageControl.keypirinha-package\packagecontrol.py", line 56, in on_start
File "\Keypirinha\portable\Profile\InstalledPackages\PackageControl.keypirinha-package\packagecontrol.py", line 285, in _check_installed
File "Keypirinha\portable\Profile\InstalledPackages\PackageControl.keypirinha-package\packagecontrol.py", line 308, in _get_package
13:31:46.563 ** ERROR: PackageControl.PackageControl: Available packages could not be obtained: HTTP Error 407: Proxy Authentication Required
13:31:55.621 ** ERROR: PackageControl.PackageControl: Available packages could not be obtained: HTTP Error 407: Proxy Authentication Required
13:31:55.622 ** ERROR: Error from PackageControl.PackageControl.on_suggest: <class 'TypeError'>: 'NoneType' object is not iterable
Traceback (most recent call last):
File "Keypirinha\portable\Profile\InstalledPackages\PackageControl.keypirinha-package\packagecontrol.py", line 172, in on_suggest

Toast Notifications for Package Downloads and Updates

Since there isn't really an easy way to give feedback to a user when a command is executed with KeyPirinha (especially since the Tkinter module is removed), it might be useful to send notifications to a user when an important event happens. Here's a few example cases I could think of.

  • A package installed successfully
  • A download failed
  • Updates are available for packages

This could be accomplished using something like the win10toast-click module.

If you want, I can look into potentially coding this in myself, since it seems simple enough.

Error when attempting to install keypirinha-emojii

18:21:18.435 ** ERROR: PackageControl.PackageControl: Error occurred while executing command 'PackageControl: Install Package | keypirinha-emojii (by @andriykrefer)'
Traceback (most recent call last):
  File "lib\urllib\request.py", line 1317, in do_open
  File "lib\http\client.py", line 1244, in request
  File "lib\http\client.py", line 1290, in _send_request
  File "lib\http\client.py", line 1239, in endheaders
  File "lib\http\client.py", line 1026, in _send_output
  File "lib\http\client.py", line 966, in send
  File "lib\http\client.py", line 1406, in connect
  File "lib\http\client.py", line 938, in connect
  File "lib\socket.py", line 727, in create_connection
  File "lib\socket.py", line 716, in create_connection
socket.timeout: timed out

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Program Files\Keypirinha\portable\Profile\InstalledPackages\PackageControl.keypirinha-package\packagecontrol.py", line 245, in on_execute
  File "C:\Program Files\Keypirinha\portable\Profile\InstalledPackages\PackageControl.keypirinha-package\packagecontrol.py", line 537, in _install_package
  File "C:\Program Files\Keypirinha\portable\Profile\InstalledPackages\PackageControl.keypirinha-package\lib\package.py", line 21, in download
  File "C:\Program Files\Keypirinha\python\site\keypirinha_net.py", line 40, in open
    fullurl, *args, data=data, timeout=timeout, **kwargs)
  File "lib\urllib\request.py", line 531, in open
  File "lib\urllib\request.py", line 641, in http_response
  File "lib\urllib\request.py", line 563, in error
  File "lib\urllib\request.py", line 503, in _call_chain
  File "lib\urllib\request.py", line 755, in http_error_302
  File "lib\urllib\request.py", line 525, in open
  File "lib\urllib\request.py", line 543, in _open
  File "lib\urllib\request.py", line 503, in _call_chain
  File "lib\urllib\request.py", line 1360, in https_open
  File "lib\urllib\request.py", line 1319, in do_open
urllib.error.URLError: <urlopen error timed out>

When trying to install again it says this:
18:28:42.404 WARNING: PackageControl.PackageControl: Package 'keypirinha-emojii' already installed

When I look at the installed packages in packagecontrol.ini it's not listed but must be somewhere?

The plugin shows an error on console and does not work

I tried to install it copying directly to the \Keypirinha\portable\Profile\InstalledPackages and using the import command. Manual install of other packages, like WindowsApps.keypirinha-package works.

Thanks in advance.

>>> import keypirinha as kp,keypirinha_net as kpn,os;p="PackageControl.keypirinha-package";d=kpn.build_urllib_opener().open("https://github.com/ueffel/Keypirinha-PackageControl/releases/download/0.2/"+p);pb=d.read();d.close();f=open(os.path.join(kp.installed_package_dir(),p),"wb");f.write(pb);f.close() 15108 15:08:21.541 Plugin loaded: PackageControl.PackageControl (instance #1) 15:08:22.554 ** ERROR: PackageControl.PackageControl: Available packages could not be obtained: Traceback (most recent call last): File "C:\Users\user\OneDrive\utils\Keypirinha\portable\Profile\InstalledPackages\PackageControl.keypirinha-package\packagecontrol.py", line 376, in _get_available_packages File "C:\Users\user\OneDrive\utils\Keypirinha\python\site\keypirinha_net.py", line 40, in open fullurl, *args, data=data, timeout=timeout, **kwargs) File "lib\urllib\request.py", line 532, in open File "lib\urllib\request.py", line 642, in http_response File "lib\urllib\request.py", line 570, in error File "lib\urllib\request.py", line 504, in _call_chain File "lib\urllib\request.py", line 650, in http_error_default urllib.error.HTTPError: HTTP Error 403: Forbidden 15:08:22.555 ** ERROR: Error from PackageControl.PackageControl.on_start: <class 'TypeError'>: 'NoneType' object is not iterable Traceback (most recent call last): File "C:\Users\user\OneDrive\utils\Keypirinha\portable\Profile\InstalledPackages\PackageControl.keypirinha-package\packagecontrol.py", line 62, in on_start File "C:\Users\user\OneDrive\utils\Keypirinha\portable\Profile\InstalledPackages\PackageControl.keypirinha-package\packagecontrol.py", line 292, in _check_installed File "C:\Users\user\OneDrive\utils\Keypirinha\portable\Profile\InstalledPackages\PackageControl.keypirinha-package\packagecontrol.py", line 326, in _get_package 15:26:11.020 ** ERROR: PackageControl.PackageControl: Available packages could not be obtained: Traceback (most recent call last): File "C:\Users\user\OneDrive\utils\Keypirinha\portable\Profile\InstalledPackages\PackageControl.keypirinha-package\packagecontrol.py", line 376, in _get_available_packages File "C:\Users\user\OneDrive\utils\Keypirinha\python\site\keypirinha_net.py", line 40, in open fullurl, *args, data=data, timeout=timeout, **kwargs) File "lib\urllib\request.py", line 532, in open File "lib\urllib\request.py", line 642, in http_response File "lib\urllib\request.py", line 570, in error File "lib\urllib\request.py", line 504, in _call_chain File "lib\urllib\request.py", line 650, in http_error_default urllib.error.HTTPError: HTTP Error 403: Forbidden 15:26:11.515 ** ERROR: PackageControl.PackageControl: Available packages could not be obtained: Traceback (most recent call last): File "C:\Users\user\OneDrive\utils\Keypirinha\portable\Profile\InstalledPackages\PackageControl.keypirinha-package\packagecontrol.py", line 376, in _get_available_packages File "C:\Users\user\OneDrive\utils\Keypirinha\python\site\keypirinha_net.py", line 40, in open fullurl, *args, data=data, timeout=timeout, **kwargs) File "lib\urllib\request.py", line 532, in open File "lib\urllib\request.py", line 642, in http_response File "lib\urllib\request.py", line 570, in error File "lib\urllib\request.py", line 504, in _call_chain File "lib\urllib\request.py", line 650, in http_error_default urllib.error.HTTPError: HTTP Error 403: Forbidden 15:26:11.515 ** ERROR: PackageControl.PackageControl: Error occurred while executing command 'PackageControl: Update Repository List' Traceback (most recent call last):

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.