eg.wakeonlan


Nameeg.wakeonlan JSON
Version 1.3 PyPI version JSON
download
home_pageNone
SummaryYet another wake-on-lan library
upload_time2024-08-18 05:51:44
maintainerNone
docs_urlNone
authorNone
requires_python>=3.7
licenseBSD-3-Clause
keywords wakeonlan
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # wakeonlan #

[![License](https://img.shields.io/badge/license-BSD-brightgreen.svg)](https://opensource.org/licenses/BSD-3-Clause)
[![pypi](https://img.shields.io/pypi/v/eg.wakeonlan)](https://pypi.org/project/eg.wakeonlan)
[![Language](https://img.shields.io/badge/language-Python-blue.svg)](https://www.python.org)
[![python](https://img.shields.io/badge/python->=3.7-blue.svg)](https://www.python.org/downloads/release/python-370/)

Yet another wake-on-lan command line script.

<!-- TOC depthfrom:2 -->

- [Why another one?](#why-another-one)
- [Setup](#setup)
- [Usage](#usage)
    - [Wake up a machine given its MAC address XX:XX:XX:XX:XX:XX](#wake-up-a-machine-given-its-mac-address-xxxxxxxxxxxx)
    - [Save wake up configuration to be used later](#save-wake-up-configuration-to-be-used-later)
    - [Wake up a machine given saved configuration name](#wake-up-a-machine-given-saved-configuration-name)
    - [List existing configuration names](#list-existing-configuration-names)
    - [Delete a configuration](#delete-a-configuration)
    - [Transferring configurations to another machine](#transferring-configurations-to-another-machine)
- [Set up shell autocomplete](#set-up-shell-autocomplete)
    - [Bash](#bash)
    - [Zsh](#zsh)
    - [Powershell](#powershell)

<!-- /TOC -->


## Why another one?

I couldn't find one that worked and did what I need. Specifically I need:
* A command line utility that works on Mac, Windows and Linux
* Can use saved configurations rather than force me to remember the MAC addresses of the machines I need to wake.
* Ideally, let me manipulate (create, delete, update, list) saved configurations using the same utility.
* Ideally, be open source so I can see what it is doing and know it doesn't do anything nefarious

None of the existing tools I found satisfied these criteria (even without the last two) so I wrote my own.

## Setup

**Pre-requisites**: Python 3.7 or above. No additional packages required.

```bash
pip3 install eg.wakeonlan
```

On Windows, if you get a warning like:
```
WARNING: The script wakeonlan.exe is installed in 
'C:\Users\[username]\AppData\Roaming\Python\Python[VER]\Scripts' which is not on PATH.
```

You can either add this directory to your PATH or run `pip3 install` from Administrator command prompt.

The reason for this message is that Python does not add _per user_ scripts directory to PATH on Windows, only the system-wide one. See [this Python bug](https://bugs.python.org/issue39658)

## Usage


### Wake up a machine given its MAC address XX:XX:XX:XX:XX:XX 

```bash
wakeonlan XX:XX:XX:XX:XX:XX [-a BroadcastAddress] [-p Port]
```

If not specified BroadcastAddress is 255.255.255.255 and Port is 9

### Save wake up configuration to be used later

```bash
wakeonlan --save Name XX:XX:XX:XX:XX:XX [-a BroadcastAddress] [-p Port]
```

Name can be anything. The configuration is saved into `$HOME/.wakeonlan` file in JSON format
--save can be abbreviated as -s

### Wake up a machine given saved configuration name

```bash
wakeonlan Name
```

### List existing configuration names

```bash
wakeonlan --list
```

`--list` can be abbreviated as `-l`

### Delete a configuration

```bash
wakeonlan --delete Name
```

`--delete` can be abbreviated as `-d`

### Transferring configurations to another machine

Saved configurations are stored in `$HOME/.wakeonlan` file (`%USERPROFILE%\.wakeonlan` for Windows users).
Copy this file to another machine into equivalent location to transfer all the configurations.

## Set up shell autocomplete

Autocomplete is supported for `bash`, `zsh` and `powershell`.

### Bash

Add the following to your `~/.bashrc`

```bash
source `wakeonlan --autocomplete-source`
```

### Zsh

Add the following to your `~/.zhrc` (make sure it is *after* the call to `compinit`)

```bash
source `wakeonlan --autocomplete-source`
```

### Powershell

1. If you haven't already done so, you will need to enable script execution on your machine.
  ```ps
  Set-ExecutionPolicy RemoteSigned -Scope CurrentUser
  ```
2. Remove "mark of the web" from the auto-complete script:
  ```ps
  Unblock-File -Path $(wakeonlan --autocomplete-source)
  ```
2. Find the location of your profile file:
  ```ps
  echo $profile
  ```
3. If it doesn't exist, create it. Then add the following to its content:
  ```ps
  . $(wakeonlan --autocomplete-source)
  ```


            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "eg.wakeonlan",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.7",
    "maintainer_email": null,
    "keywords": "wakeonlan",
    "author": null,
    "author_email": "Eugene Gershnik <gershnik@hotmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/66/3a/3071a090075c171211c6b595cf94f81dd0dcffd27c647907a29d1cdb14c6/eg_wakeonlan-1.3.tar.gz",
    "platform": null,
    "description": "# wakeonlan #\n\n[![License](https://img.shields.io/badge/license-BSD-brightgreen.svg)](https://opensource.org/licenses/BSD-3-Clause)\n[![pypi](https://img.shields.io/pypi/v/eg.wakeonlan)](https://pypi.org/project/eg.wakeonlan)\n[![Language](https://img.shields.io/badge/language-Python-blue.svg)](https://www.python.org)\n[![python](https://img.shields.io/badge/python->=3.7-blue.svg)](https://www.python.org/downloads/release/python-370/)\n\nYet another wake-on-lan command line script.\n\n<!-- TOC depthfrom:2 -->\n\n- [Why another one?](#why-another-one)\n- [Setup](#setup)\n- [Usage](#usage)\n    - [Wake up a machine given its MAC address XX:XX:XX:XX:XX:XX](#wake-up-a-machine-given-its-mac-address-xxxxxxxxxxxx)\n    - [Save wake up configuration to be used later](#save-wake-up-configuration-to-be-used-later)\n    - [Wake up a machine given saved configuration name](#wake-up-a-machine-given-saved-configuration-name)\n    - [List existing configuration names](#list-existing-configuration-names)\n    - [Delete a configuration](#delete-a-configuration)\n    - [Transferring configurations to another machine](#transferring-configurations-to-another-machine)\n- [Set up shell autocomplete](#set-up-shell-autocomplete)\n    - [Bash](#bash)\n    - [Zsh](#zsh)\n    - [Powershell](#powershell)\n\n<!-- /TOC -->\n\n\n## Why another one?\n\nI couldn't find one that worked and did what I need. Specifically I need:\n* A command line utility that works on Mac, Windows and Linux\n* Can use saved configurations rather than force me to remember the MAC addresses of the machines I need to wake.\n* Ideally, let me manipulate (create, delete, update, list) saved configurations using the same utility.\n* Ideally, be open source so I can see what it is doing and know it doesn't do anything nefarious\n\nNone of the existing tools I found satisfied these criteria (even without the last two) so I wrote my own.\n\n## Setup\n\n**Pre-requisites**: Python 3.7 or above. No additional packages required.\n\n```bash\npip3 install eg.wakeonlan\n```\n\nOn Windows, if you get a warning like:\n```\nWARNING: The script wakeonlan.exe is installed in \n'C:\\Users\\[username]\\AppData\\Roaming\\Python\\Python[VER]\\Scripts' which is not on PATH.\n```\n\nYou can either add this directory to your PATH or run `pip3 install` from Administrator command prompt.\n\nThe reason for this message is that Python does not add _per user_ scripts directory to PATH on Windows, only the system-wide one. See [this Python bug](https://bugs.python.org/issue39658)\n\n## Usage\n\n\n### Wake up a machine given its MAC address XX:XX:XX:XX:XX:XX \n\n```bash\nwakeonlan XX:XX:XX:XX:XX:XX [-a BroadcastAddress] [-p Port]\n```\n\nIf not specified BroadcastAddress is 255.255.255.255 and Port is 9\n\n### Save wake up configuration to be used later\n\n```bash\nwakeonlan --save Name XX:XX:XX:XX:XX:XX [-a BroadcastAddress] [-p Port]\n```\n\nName can be anything. The configuration is saved into `$HOME/.wakeonlan` file in JSON format\n--save can be abbreviated as -s\n\n### Wake up a machine given saved configuration name\n\n```bash\nwakeonlan Name\n```\n\n### List existing configuration names\n\n```bash\nwakeonlan --list\n```\n\n`--list` can be abbreviated as `-l`\n\n### Delete a configuration\n\n```bash\nwakeonlan --delete Name\n```\n\n`--delete` can be abbreviated as `-d`\n\n### Transferring configurations to another machine\n\nSaved configurations are stored in `$HOME/.wakeonlan` file (`%USERPROFILE%\\.wakeonlan` for Windows users).\nCopy this file to another machine into equivalent location to transfer all the configurations.\n\n## Set up shell autocomplete\n\nAutocomplete is supported for `bash`, `zsh` and `powershell`.\n\n### Bash\n\nAdd the following to your `~/.bashrc`\n\n```bash\nsource `wakeonlan --autocomplete-source`\n```\n\n### Zsh\n\nAdd the following to your `~/.zhrc` (make sure it is *after* the call to `compinit`)\n\n```bash\nsource `wakeonlan --autocomplete-source`\n```\n\n### Powershell\n\n1. If you haven't already done so, you will need to enable script execution on your machine.\n  ```ps\n  Set-ExecutionPolicy RemoteSigned -Scope CurrentUser\n  ```\n2. Remove \"mark of the web\" from the auto-complete script:\n  ```ps\n  Unblock-File -Path $(wakeonlan --autocomplete-source)\n  ```\n2. Find the location of your profile file:\n  ```ps\n  echo $profile\n  ```\n3. If it doesn't exist, create it. Then add the following to its content:\n  ```ps\n  . $(wakeonlan --autocomplete-source)\n  ```\n\n",
    "bugtrack_url": null,
    "license": "BSD-3-Clause",
    "summary": "Yet another wake-on-lan library",
    "version": "1.3",
    "project_urls": {
        "Homepage": "https://github.com/gershnik/wakeonlan"
    },
    "split_keywords": [
        "wakeonlan"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "64ddaf2e7a85ef6bafbc06200f6d01836c8bea046ea4281bbd5767fa875df820",
                "md5": "f2d124ecb72111402b6d270de7a32b14",
                "sha256": "c4a4ae2285800e110d8254b88ad74a651b4e037a73fa0bd5d2bd8f725f6293d2"
            },
            "downloads": -1,
            "filename": "eg.wakeonlan-1.3-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "f2d124ecb72111402b6d270de7a32b14",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7",
            "size": 10290,
            "upload_time": "2024-08-18T05:51:43",
            "upload_time_iso_8601": "2024-08-18T05:51:43.625956Z",
            "url": "https://files.pythonhosted.org/packages/64/dd/af2e7a85ef6bafbc06200f6d01836c8bea046ea4281bbd5767fa875df820/eg.wakeonlan-1.3-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "663a3071a090075c171211c6b595cf94f81dd0dcffd27c647907a29d1cdb14c6",
                "md5": "ca1aeb4c5ab06a1759431c56ae6189ef",
                "sha256": "9c78a74b4c55ae6c4cf85b37a1dc16f3a8d0c940d1a17506399685c5d10d70ad"
            },
            "downloads": -1,
            "filename": "eg_wakeonlan-1.3.tar.gz",
            "has_sig": false,
            "md5_digest": "ca1aeb4c5ab06a1759431c56ae6189ef",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7",
            "size": 9439,
            "upload_time": "2024-08-18T05:51:44",
            "upload_time_iso_8601": "2024-08-18T05:51:44.939644Z",
            "url": "https://files.pythonhosted.org/packages/66/3a/3071a090075c171211c6b595cf94f81dd0dcffd27c647907a29d1cdb14c6/eg_wakeonlan-1.3.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-08-18 05:51:44",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "gershnik",
    "github_project": "wakeonlan",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [],
    "lcname": "eg.wakeonlan"
}
        
Elapsed time: 0.89043s