Metadata-Version: 2.1
Name: casement
Version: 0.1.0
Summary: Useful functionality for managing Microsoft Windows.
Home-page: https://github.com/blurstudio/casement
Author: Blur Studio
Author-email: opensource@blur.com
License: LGPL-3.0
Project-URL: Source, https://github.com/blurstudio/casement
Project-URL: Tracker, https://github.com/blurstudio/casement/issues
Platform: any
Classifier: Development Status :: 3 - Alpha
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: GNU Lesser General Public License v3 (LGPLv3)
Classifier: Operating System :: Microsoft
Classifier: Operating System :: Microsoft :: Windows :: Windows 7
Classifier: Operating System :: Microsoft :: Windows :: Windows 10
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 2
Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Programming Language :: Python :: Implementation :: PyPy
Requires-Python: !=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,>=2.7
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: pywin32
Requires-Dist: winshell (>=0.6)
Provides-Extra: dev
Requires-Dist: black ; extra == 'dev'
Requires-Dist: covdefaults ; extra == 'dev'
Requires-Dist: coverage ; extra == 'dev'
Requires-Dist: flake8 ; extra == 'dev'
Requires-Dist: flake8-bugbear ; extra == 'dev'
Requires-Dist: pep8-naming ; extra == 'dev'
Requires-Dist: pytest ; extra == 'dev'
Requires-Dist: tox ; extra == 'dev'
Provides-Extra: pil
Requires-Dist: Pillow ; extra == 'pil'

# Casement

A Python library that provides useful functionality for managing Microsoft Windows systems.

## Features

* App Model Id management for shortcuts and inside python applications to allow for taskbar grouping.
* Finding, creating and moving shortcuts.
* Pinning shortcuts to the taskbar and start menu.
* Flashing a window to get a users attention.

## Shortcut management

A interface for manipulating Windows shortcut files including pinned.

Pinning shortcuts to the start menu and task bar in windows is extremely complicated.
You can find and edit shortcuts in the User Pinned directory for for all users, but
adding, modifying or removing those shortcuts does not affect the pinned shortcuts.
You need to point to a copy of the pinned shortcut, and run windows verbs on that
shortcut.

Here is a example of pinning a shortcut to the start menu:
```python
from casement.shortcut import Shortcut
with Shortcut(r'C:\Users\Public\Desktop\My Shortcut.lnk') as sc:
    sc.pin_to_start_menu()
```
### Command line interface

The features of this class can be used from the command line using ``casement shortcut
[command] [arguments]``.

To find shortcuts in common places with a given name:
```
    C:\blur\dev\casement>casement shortcut list "VLC media player.lnk"
    c:\ProgramData\Microsoft\Windows\Start Menu\Programs\VideoLAN\VLC media player.lnk
    c:\Users\Public\Desktop\VLC media player.lnk
```

Pinning/unpinning a shortcut to the taskbar:
```
    C:\blur\dev\casement>casement shortcut pin "C:\Users\Public\Desktop\My Shortcut.lnk" -t
    C:\blur\dev\casement>casement shortcut unpin "C:\Users\Public\Desktop\My Shortcut.lnk" -t
```

# Installing

Casement can be installed by the standard pip command `pip install casement`.
There is also an optional extras_require option `pip install casement[pil]` to
allow creating shortcut icons by converting image files to .ico files.
