Skip to content

Easily add and remove context menu entries from Windows Explorer. A minimal lib for a simple job.

License

Notifications You must be signed in to change notification settings

luketurner/contextext.py

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

contextext.py - tiny API for Windows context menu entries

Having new items in the Windows Explorer context menu can be nice. But it's a pain to add them manually. This is a simple Python library that makes it easier.

Extensions

You can have the menu entry appear on all file extensions using the wildcard "*". Use special string "Directory" to put menu entry on directories. Use special string "Background" to show menu entry when you right click in the window background.

Todo list

  • Escape quotations when generating .reg values
  • Add support for direct saving with windows API
  • Add support for loading existing extensions with windows API

Examples

Creating new items:

entry = ContextEntry("Launch dev server", "cmd /C node %1", ".js") # create a new context menu item
print("Making these changes:")
print(entry.partial_install_diff) # print the corresponding registry keys
entry.save() # save the new entry to the registry - Windows only - NOT IMPLEMENTED
with f = open("uninstall.reg", "w"):
    f.write(entry.removal_diff)

About

Easily add and remove context menu entries from Windows Explorer. A minimal lib for a simple job.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages