semvec/pypi-packages huggingface dataset:
HASS-Desktop-Sensor 1.0.1
Desktop activity sensor for Home Assistant
License: MIT
Requires Python: >=3.6
Keywords: home assistant desktop sensor idle activity

# HASS Desktop Sensor

Desktop activity sensor for Home Assistant

## Features

- Tracks idleness thanks to [xidlehook](https://github.com/jD91mZM2/xidlehook)
- Reports system resources usage

By default you'll be considered idle if you don't use the mouse and keyboard for 5 minutes.
Note that if you're playing some audio, you won't be considered idle. This is to prevent
false positives while watching videos.

The Desktop Sensor will report status to Home Assistant every 5 seconds by default.

## Requirements

- [Install xidlehook](https://github.com/jD91mZM2/xidlehook#installation)
- Enable the [API integration](https://www.home-assistant.io/integrations/api/) of Home Assistant (just add `api:` to your `configuration.yaml`).
- Create a long-lived access token (go to your profile in Home Assistant, scroll to the bottom, and click "Create Token")

## Installation

As simple as :

```bash
$ pip install --user hass-desktop-sensor
````

To make sure it's working, try to run the script manually like so :

```bash
$ HASS_ACCESS_TOKEN=[YOUR ACCESS TOKEN HERE] hass_desktop_sensor --hass-url 'http://homeassistant.local:8123' --hass-device-name 'My Laptop'
```

To test your automations, you can pass `--idle-delay 1` and `--report-interval 1` to the command line.
You will be considered idle after 1 second, and your idleness status will be reported every second.
This is useful for debug purposes but I don't recommend doing that in real world scenarios.

*Note: You can increase log verbosity by setting `LOGLEVEL=DEBUG` at the beginning of your command line.*

## Automatic startup

Chances are you are using systemd, if you're not, you're on your own. But I'm pretty sure if you're not
using systemd you'll figure out by yourself how to automatically start this script :)

So... For systemd users, create a service file with the following content :

```ini
[Unit]
Description=Home Assistant Desktop Sensor

[Service]
Type=simple
Environment=HASS_ACCESS_TOKEN=[YOUR ACCESS TOKEN HERE]
ExecStart=hass_desktop_sensor --hass-url 'http://homeassistant.local:8123' --hass-device-name 'My Laptop'

[Install]
WantedBy=multi-user.target
```

## Ping integration

If for whatever reason the desktop sensor is not able to report idleness (power failure, network issues, etc.)
some of your automations might not trigger. This is why additionnaly to this desktop sensor, I suggest you
setup the [ping integration](https://www.home-assistant.io/integrations/ping/) of Home Assistant to turn off
what is usually turned on by your automations based on the Desktop Sensor.
ptask 0.0.1
attr: ptask.__doc__
License: MIT
Requires Python: >=3.9

# Painless Project

Painless project is a simple cross-platform command line tool written in Python
for a build task configurations & management

<!-- markdown-toc start - Don't edit this section. Run M-x markdown-toc-refresh-toc -->
**Table of Contents**

- [Painless Project](#painless-project)
    - [Getting Started](#getting-started)
        - [Installation](#installation)
        - [Setup your configurations](#setup-your-configurations)

<!-- markdown-toc end -->


## Getting Started

### Installation

Install via pypi:

``` sh
pip install project
```

Now you can use the cli tool to manage your build, here is an overview of it:

``` 
usage: project build_type [options]

A cli tool for manage and config project build

positional arguments:
  build_type            set the build type based on your task setup

options:
  -h, --help            show this help message and exit
  -v, --version         show program's version number and exit
  -i, --info            print the current build's information
  -f FILE, --file FILE  custom file task configuration
  -p PATH, --path PATH  custom build path for the project

Happy building your project! :)
```

### Setup your configurations

The aim of this tool is not a replacement for any build system out there. It's
an addon to them, so you can manage to setup your builds on multiple OS. 

The tool is looking for one of the file for checking the command:

> .projecttask
>
> tasks.ini
>
> .config/tasks.ini

If you don't like the file name or location, you can specify your own file tasks
with `-f` flag.

And here is a task file example:

``` ini
[win32]
init=cmake -B build -G "MinGW Makefiles"
build=cmake --build build
clean=rmdir /S/Q build && mkdir build
run=bin\main.exe

[macos]
init=cmake -B build -H.
build=cmake --build build
clean=rm -r build && mkdir build
run=bin/main
```

Then you can run the `project init` command, the tool will look into the right
command to run based on your OS.