Metadata-Version: 2.1
Name: pasteboard2
Version: 0.0.4
Summary: access macOS pasteboard
Project-URL: Homepage, https://github.com/bwagner/pasteboard2
Project-URL: Bug Tracker, https://github.com/bwagner/pasteboard2/issues
Author-email: Bernhard Wagner <pasteboard2@nosuch.biz>
License: Copyright (c) 2018 The Python Packaging Authority
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
License-File: LICENSE.txt
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: MacOS :: MacOS X
Classifier: Programming Language :: Python :: 3
Requires-Python: >=3.7
Requires-Dist: pyobjc
Requires-Dist: pytest
Requires-Dist: typer
Description-Content-Type: text/markdown

# Pasteboard2
Pasteboard2 is a simple Python module and command line tool to get content and
its types from the macOS pasteboard (clipboard). The implementation relies on
[PyObjC](https://pypi.org/project/pyobjc/) and is modeled after the
[Swift](https://en.wikipedia.org/wiki/Swift_(programming_language)) program
[pbv](https://github.com/chee/pbv).

## Command Line Usage
### Top Level
```
 Usage: pasteboard2.py [OPTIONS] COMMAND [ARGS]...

╭─ Options ──────────────────────────────────────────────────────────────────────────╮
│ --help          Show this message and exit.                                        │
╰────────────────────────────────────────────────────────────────────────────────────╯
╭─ Commands ─────────────────────────────────────────────────────────────────────────╮
│ clear            Empties the pasteboard.                                           │
│ clip             Print the content of the pasteboard if it's a string.             │
│ test             Run tests with pytest and doctest.                                │
│ types            List the content types of the current pasteboard.                 │
╰────────────────────────────────────────────────────────────────────────────────────╯
```
### Clip Subcommand
```
 Usage: pasteboard2.py clip [OPTIONS]

 Print the content of the pasteboard if it's a string.

╭─ Options ──────────────────────────────────────────────────────────────────────────╮
│ --type  -t      TEXT  The type of content to get [default: public.utf8-plain-text] │
│ --help                Show this message and exit.                                  │
╰────────────────────────────────────────────────────────────────────────────────────╯
```
## Test
```
git clone https://github.com/bwagner/pasteboard2.git
cd pasteboard2
python -m venv ~/venv/pb2
source ~/venv/pb2/bin/activate
pip install -r requirements.txt
./src/pasteboard2/pasteboard2.py test
deactivate
rm -rf ~/venv/pb2
```
## Requirements
- pyobjc
- typer
- pytest (for development)
## Alternatives
- https://pypi.org/project/pasteboard/ \
  https://github.com/tobywf/pasteboard \
  but it's no longer maintained (checked 20230710)

- https://pypi.org/project/tacky/ \
  https://github.com/friedenberg/tacky

