semvec/pypi-packages huggingface dataset:
intellimouse-ctl 1.0.0
A cross-platform command line tool and library for Microsofts IntelliMouse products.
Requires Python: >=3.8

# intellimouse-ctl
![black](https://img.shields.io/badge/code%20style-black-000000.svg)
![pylint](https://img.shields.io/badge/linter-pylint-00D000.svg)
---
A cross-platform command line tool and library for Microsoft's IntelliMouse devices.

It supports the following models:
* Pro IntelliMouse (2019)
* Classic IntelliMouse (2017)

## Usage
### CLI
![intellimouse-ctl demo](https://user-images.githubusercontent.com/13816979/155191134-e2c7222f-0395-48af-824a-92003c9dadfc.gif)

```bash
intellimouse-ctl --help
usage: intellimouse-ctl [-h] [--json] {get,set,list} ...

positional arguments:
  {get,set,list}
    get           get the value of a setting
    set           set the value of a setting
    list          lists the connected devices and their indices

options:
  -h, --help      show this help message and exit
  --json          output JSON
```
Commands passed to a device that doesn't support the given commands will ignore them.
### Library
```python
from intellimouse import ClassicIntelliMouse
from intellimouse import ProIntelliMouse

with ClassicIntelliMouse.enumerate()[0] as mouse:
    print(mouse)


with ProIntelliMouse.enumerate()[0] as mouse:
    print(mouse)
```

## Features

### Pro IntelliMouse
- [x] DPI
- [x] LOD
- [x] LED
- [x] Polling Rate
- [ ] Custom Button Mapping
- [ ] Custom LOD Calibration

### Classic IntelliMouse
- [x] DPI
- [ ] Custom Button Mapping

## Install

### PyPI
```bash
pip install intellimouse-ctl
```

### Local
```bash
git clone https://github.com/k-visscher/intellimouse-ctl.git
cd intellimouse-ctl
pip install .
```

## Development
To set up a virtual environment to further develop this tool/library, use the following commands:
```bash
python -m venv venv
source venv/bin/activate
pip install --editable .
```

## Documentation

### View
```bash
pdoc ./src/intellimouse/
```

### Generate
```bash
pdoc ./src/intellimouse/ -o ./docs
```

## Sponsors
* [@madsl](https://github.com/madsl) for donating the Classic IntelliMouse to this project.

## License
This application is licensed under the the [MIT license](./LICENSE).

## Disclaimer
All company, product and service names used in this project are for identification purposes only.<br/>
Use of these names, trademarks and brands does not imply endorsement.<br/>
In no way is this project published by, affiliated with, or sponsorsed, or endorsed, or approved by Microsoft.<br/>

All product names, trademarks and registered trademarks are property of their respective owners.<br/>
Microsoft Pro IntelliMouse is a registered trademark or trademark of Microsoft Corporation in the United States and/or other countries.<br/>
Microsoft Classic IntelliMouse is a registered trademark or trademark of Microsoft Corporation in the United States and/or other countries.<br/>
All other trademarks cited herein are the property of their respective owners.
SRGlogcounter 0.1.4
Adds counters for each logging level
Requires Python: >=3.6

## Name
SRGlogcounter -- count calls to python logging at each logging severity level

## Description
SRGlogcounter provides the following classes:
* SRGlogcounter.LoggingCounter
  * extends logging.Handler with count of logs at each severity level
  * counts on output, so logs suppressed by current logging level do not get counted
  * atexit hook used to print statistics on program exit
* SRGlogcounter.LoggingAppBase
  * application base class with LoggingCounter installed
  * argparse.ArgumentParser
    * --verbose sets logging level to DEBUG
    * --logfile <file> directs logging to a file
  * Derived classes can add application specific options to ArgumentParser
* SRGlogcounter.Runner
  * run command line in a subprocess
  * capture stdout, stderr
  * try catch block for exceptions
  * exceptions can optionally be raised back to calling program

I write a lot of smallish command line utilities for internal use, and factored out some common 
repetitive boilerplate code into this package. Published for my own installation convenience, 
but might be useful to others as well. 

## Example output

Library uses atexit hook to summarize logging activity counts and total execution time. 
Counts are also available to the program at runtime.
```
2022-02-22 12:46:22,568 INFO     (SRGlogcounter.LoggingCounter:61) __log_counters 
Logging Summary:
Logging at Level INFO       occurred         13 times
Logging at Level DEBUG      occurred          1 times
Logging at Level WARNING    occurred          1 times
Logging at Level ERROR      occurred          2 times
Logging at Level CRITICAL   occurred          1 times
Elapsed time was 0.087 seconds
```

## Installation from pypi via pip
* pip3 install SRGlogcounter
## Installation from Gitlab or local repository
* pip3 install git+ssh://git@gitlab.com/SRG_gitlab/logcounter.git
* pip3 install /GNAS/GPUB/PycharmProjects/logcounter

## Internal notes on updating

```
# Perform as user kuser to get proper .pypirc 
cd /GNAS/GPUB/PycharmProjects/logcounter
python3 -m build --wheel
python3 -m twine check dist/*
python3 -m twine upload dist/*
```

## Testing

Pytest performs its own logging setup before calling any user supplied tests, so it
doesn't work well testing these classes logging setup. Ad-hoc test code is supplied
at the end of the classes and executes if the class is loaded as __main__.


## Roadmap
My intention is to keep this library small. It is not expected to evolve into an all-purpose framework. 
Output is geared towards developers, not end users. 

## License
MIT

## Project status
Core functionality appears solid, but naming and packaging may be fluid for a while.

This is my first attempt at publishing to pypi, so there may be surprises. 

I will bump version to 1.x when out of beta.