Mac-letterhead 0.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- mac_letterhead-0.1.0/.github/workflows/publish.yml +31 -0
- mac_letterhead-0.1.0/.gitignore +174 -0
- mac_letterhead-0.1.0/LICENSE +21 -0
- mac_letterhead-0.1.0/PKG-INFO +88 -0
- mac_letterhead-0.1.0/README.md +76 -0
- mac_letterhead-0.1.0/letterhead_pdf/__init__.py +3 -0
- mac_letterhead-0.1.0/letterhead_pdf/main.py +202 -0
- mac_letterhead-0.1.0/pyproject.toml +27 -0
- mac_letterhead-0.1.0/tag_release.sh +12 -0
- mac_letterhead-0.1.0/uv.lock +191 -0
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
name: Publish to PyPI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
tags:
|
|
6
|
+
- 'v*'
|
|
7
|
+
|
|
8
|
+
jobs:
|
|
9
|
+
publish:
|
|
10
|
+
runs-on: macos-latest
|
|
11
|
+
steps:
|
|
12
|
+
- uses: actions/checkout@v4
|
|
13
|
+
|
|
14
|
+
- name: Set up Python
|
|
15
|
+
uses: actions/setup-python@v4
|
|
16
|
+
with:
|
|
17
|
+
python-version: "3.x"
|
|
18
|
+
|
|
19
|
+
- name: Install build dependencies
|
|
20
|
+
run: |
|
|
21
|
+
python -m pip install --upgrade pip
|
|
22
|
+
pip install build twine
|
|
23
|
+
|
|
24
|
+
- name: Build package
|
|
25
|
+
run: python -m build
|
|
26
|
+
|
|
27
|
+
- name: Publish to PyPI
|
|
28
|
+
env:
|
|
29
|
+
TWINE_USERNAME: __token__
|
|
30
|
+
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
|
|
31
|
+
run: twine upload dist/*
|
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
# Byte-compiled / optimized / DLL files
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[cod]
|
|
4
|
+
*$py.class
|
|
5
|
+
|
|
6
|
+
# C extensions
|
|
7
|
+
*.so
|
|
8
|
+
|
|
9
|
+
# Distribution / packaging
|
|
10
|
+
.Python
|
|
11
|
+
build/
|
|
12
|
+
develop-eggs/
|
|
13
|
+
dist/
|
|
14
|
+
downloads/
|
|
15
|
+
eggs/
|
|
16
|
+
.eggs/
|
|
17
|
+
lib/
|
|
18
|
+
lib64/
|
|
19
|
+
parts/
|
|
20
|
+
sdist/
|
|
21
|
+
var/
|
|
22
|
+
wheels/
|
|
23
|
+
share/python-wheels/
|
|
24
|
+
*.egg-info/
|
|
25
|
+
.installed.cfg
|
|
26
|
+
*.egg
|
|
27
|
+
MANIFEST
|
|
28
|
+
|
|
29
|
+
# PyInstaller
|
|
30
|
+
# Usually these files are written by a python script from a template
|
|
31
|
+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
|
32
|
+
*.manifest
|
|
33
|
+
*.spec
|
|
34
|
+
|
|
35
|
+
# Installer logs
|
|
36
|
+
pip-log.txt
|
|
37
|
+
pip-delete-this-directory.txt
|
|
38
|
+
|
|
39
|
+
# Unit test / coverage reports
|
|
40
|
+
htmlcov/
|
|
41
|
+
.tox/
|
|
42
|
+
.nox/
|
|
43
|
+
.coverage
|
|
44
|
+
.coverage.*
|
|
45
|
+
.cache
|
|
46
|
+
nosetests.xml
|
|
47
|
+
coverage.xml
|
|
48
|
+
*.cover
|
|
49
|
+
*.py,cover
|
|
50
|
+
.hypothesis/
|
|
51
|
+
.pytest_cache/
|
|
52
|
+
cover/
|
|
53
|
+
|
|
54
|
+
# Translations
|
|
55
|
+
*.mo
|
|
56
|
+
*.pot
|
|
57
|
+
|
|
58
|
+
# Django stuff:
|
|
59
|
+
*.log
|
|
60
|
+
local_settings.py
|
|
61
|
+
db.sqlite3
|
|
62
|
+
db.sqlite3-journal
|
|
63
|
+
|
|
64
|
+
# Flask stuff:
|
|
65
|
+
instance/
|
|
66
|
+
.webassets-cache
|
|
67
|
+
|
|
68
|
+
# Scrapy stuff:
|
|
69
|
+
.scrapy
|
|
70
|
+
|
|
71
|
+
# Sphinx documentation
|
|
72
|
+
docs/_build/
|
|
73
|
+
|
|
74
|
+
# PyBuilder
|
|
75
|
+
.pybuilder/
|
|
76
|
+
target/
|
|
77
|
+
|
|
78
|
+
# Jupyter Notebook
|
|
79
|
+
.ipynb_checkpoints
|
|
80
|
+
|
|
81
|
+
# IPython
|
|
82
|
+
profile_default/
|
|
83
|
+
ipython_config.py
|
|
84
|
+
|
|
85
|
+
# pyenv
|
|
86
|
+
# For a library or package, you might want to ignore these files since the code is
|
|
87
|
+
# intended to run in multiple environments; otherwise, check them in:
|
|
88
|
+
# .python-version
|
|
89
|
+
|
|
90
|
+
# pipenv
|
|
91
|
+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
|
|
92
|
+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
|
|
93
|
+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
|
|
94
|
+
# install all needed dependencies.
|
|
95
|
+
#Pipfile.lock
|
|
96
|
+
|
|
97
|
+
# UV
|
|
98
|
+
# Similar to Pipfile.lock, it is generally recommended to include uv.lock in version control.
|
|
99
|
+
# This is especially recommended for binary packages to ensure reproducibility, and is more
|
|
100
|
+
# commonly ignored for libraries.
|
|
101
|
+
#uv.lock
|
|
102
|
+
|
|
103
|
+
# poetry
|
|
104
|
+
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
|
|
105
|
+
# This is especially recommended for binary packages to ensure reproducibility, and is more
|
|
106
|
+
# commonly ignored for libraries.
|
|
107
|
+
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
|
|
108
|
+
#poetry.lock
|
|
109
|
+
|
|
110
|
+
# pdm
|
|
111
|
+
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
|
|
112
|
+
#pdm.lock
|
|
113
|
+
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
|
|
114
|
+
# in version control.
|
|
115
|
+
# https://pdm.fming.dev/latest/usage/project/#working-with-version-control
|
|
116
|
+
.pdm.toml
|
|
117
|
+
.pdm-python
|
|
118
|
+
.pdm-build/
|
|
119
|
+
|
|
120
|
+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
|
|
121
|
+
__pypackages__/
|
|
122
|
+
|
|
123
|
+
# Celery stuff
|
|
124
|
+
celerybeat-schedule
|
|
125
|
+
celerybeat.pid
|
|
126
|
+
|
|
127
|
+
# SageMath parsed files
|
|
128
|
+
*.sage.py
|
|
129
|
+
|
|
130
|
+
# Environments
|
|
131
|
+
.env
|
|
132
|
+
.venv
|
|
133
|
+
env/
|
|
134
|
+
venv/
|
|
135
|
+
ENV/
|
|
136
|
+
env.bak/
|
|
137
|
+
venv.bak/
|
|
138
|
+
|
|
139
|
+
# Spyder project settings
|
|
140
|
+
.spyderproject
|
|
141
|
+
.spyproject
|
|
142
|
+
|
|
143
|
+
# Rope project settings
|
|
144
|
+
.ropeproject
|
|
145
|
+
|
|
146
|
+
# mkdocs documentation
|
|
147
|
+
/site
|
|
148
|
+
|
|
149
|
+
# mypy
|
|
150
|
+
.mypy_cache/
|
|
151
|
+
.dmypy.json
|
|
152
|
+
dmypy.json
|
|
153
|
+
|
|
154
|
+
# Pyre type checker
|
|
155
|
+
.pyre/
|
|
156
|
+
|
|
157
|
+
# pytype static type analyzer
|
|
158
|
+
.pytype/
|
|
159
|
+
|
|
160
|
+
# Cython debug symbols
|
|
161
|
+
cython_debug/
|
|
162
|
+
|
|
163
|
+
# PyCharm
|
|
164
|
+
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
|
|
165
|
+
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
|
|
166
|
+
# and can be added to the global gitignore or merged into this file. For a more nuclear
|
|
167
|
+
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
|
|
168
|
+
#.idea/
|
|
169
|
+
|
|
170
|
+
# Ruff stuff:
|
|
171
|
+
.ruff_cache/
|
|
172
|
+
|
|
173
|
+
# PyPI configuration file
|
|
174
|
+
.pypirc
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 easytocloud
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: Mac-letterhead
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: A macOS PDF Service to merge letterhead with printed documents
|
|
5
|
+
Author: Erik
|
|
6
|
+
License-Expression: MIT
|
|
7
|
+
License-File: LICENSE
|
|
8
|
+
Requires-Python: >=3.7
|
|
9
|
+
Requires-Dist: pyobjc-framework-cocoa
|
|
10
|
+
Requires-Dist: pyobjc-framework-quartz
|
|
11
|
+
Description-Content-Type: text/markdown
|
|
12
|
+
|
|
13
|
+
# Mac-letterhead
|
|
14
|
+
|
|
15
|
+
A macOS PDF Service that automatically merges a letterhead template with printed documents.
|
|
16
|
+
|
|
17
|
+
## Installation
|
|
18
|
+
|
|
19
|
+
Install the package:
|
|
20
|
+
```bash
|
|
21
|
+
uv pip install -e .
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
## Usage
|
|
25
|
+
|
|
26
|
+
### Installing a Letterhead Service
|
|
27
|
+
|
|
28
|
+
To create a PDF Service for a specific letterhead template:
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
uv run mac-letterhead install /path/to/your/letterhead.pdf
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
This will create a new PDF Service named "Letterhead <name of your PDF>" in your PDF Services directory.
|
|
35
|
+
|
|
36
|
+
### Using the Letterhead Service
|
|
37
|
+
|
|
38
|
+
1. Open any document you want to print with the letterhead
|
|
39
|
+
2. Choose File > Print
|
|
40
|
+
3. Click the PDF dropdown button
|
|
41
|
+
4. Select "Letterhead <name of your PDF>" from the menu
|
|
42
|
+
5. Choose where to save the merged PDF
|
|
43
|
+
|
|
44
|
+
### Version Information
|
|
45
|
+
|
|
46
|
+
To check the current version:
|
|
47
|
+
```bash
|
|
48
|
+
uv run mac-letterhead --version
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
## Features
|
|
52
|
+
|
|
53
|
+
- Easy installation of letterhead services
|
|
54
|
+
- Supports multiple letterhead templates
|
|
55
|
+
- Maintains original PDF metadata
|
|
56
|
+
- Preserves PDF quality
|
|
57
|
+
- Shows save dialog for output location
|
|
58
|
+
- Proper error handling
|
|
59
|
+
- Supports --version flag
|
|
60
|
+
- Type hints for better code maintainability
|
|
61
|
+
|
|
62
|
+
## Development
|
|
63
|
+
|
|
64
|
+
To install in development mode:
|
|
65
|
+
```bash
|
|
66
|
+
uv pip install -e .
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
### Publishing a New Release
|
|
70
|
+
|
|
71
|
+
1. Update the version in:
|
|
72
|
+
- pyproject.toml
|
|
73
|
+
- letterhead_pdf/__init__.py
|
|
74
|
+
- letterhead_pdf/main.py
|
|
75
|
+
|
|
76
|
+
2. Run the release script:
|
|
77
|
+
```bash
|
|
78
|
+
./tag_release.sh
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
This will:
|
|
82
|
+
- Create a git tag for the current version
|
|
83
|
+
- Push the tag to GitHub
|
|
84
|
+
- Trigger the GitHub workflow to publish to PyPI
|
|
85
|
+
|
|
86
|
+
## License
|
|
87
|
+
|
|
88
|
+
MIT License
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
# Mac-letterhead
|
|
2
|
+
|
|
3
|
+
A macOS PDF Service that automatically merges a letterhead template with printed documents.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
Install the package:
|
|
8
|
+
```bash
|
|
9
|
+
uv pip install -e .
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
## Usage
|
|
13
|
+
|
|
14
|
+
### Installing a Letterhead Service
|
|
15
|
+
|
|
16
|
+
To create a PDF Service for a specific letterhead template:
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
uv run mac-letterhead install /path/to/your/letterhead.pdf
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
This will create a new PDF Service named "Letterhead <name of your PDF>" in your PDF Services directory.
|
|
23
|
+
|
|
24
|
+
### Using the Letterhead Service
|
|
25
|
+
|
|
26
|
+
1. Open any document you want to print with the letterhead
|
|
27
|
+
2. Choose File > Print
|
|
28
|
+
3. Click the PDF dropdown button
|
|
29
|
+
4. Select "Letterhead <name of your PDF>" from the menu
|
|
30
|
+
5. Choose where to save the merged PDF
|
|
31
|
+
|
|
32
|
+
### Version Information
|
|
33
|
+
|
|
34
|
+
To check the current version:
|
|
35
|
+
```bash
|
|
36
|
+
uv run mac-letterhead --version
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
## Features
|
|
40
|
+
|
|
41
|
+
- Easy installation of letterhead services
|
|
42
|
+
- Supports multiple letterhead templates
|
|
43
|
+
- Maintains original PDF metadata
|
|
44
|
+
- Preserves PDF quality
|
|
45
|
+
- Shows save dialog for output location
|
|
46
|
+
- Proper error handling
|
|
47
|
+
- Supports --version flag
|
|
48
|
+
- Type hints for better code maintainability
|
|
49
|
+
|
|
50
|
+
## Development
|
|
51
|
+
|
|
52
|
+
To install in development mode:
|
|
53
|
+
```bash
|
|
54
|
+
uv pip install -e .
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
### Publishing a New Release
|
|
58
|
+
|
|
59
|
+
1. Update the version in:
|
|
60
|
+
- pyproject.toml
|
|
61
|
+
- letterhead_pdf/__init__.py
|
|
62
|
+
- letterhead_pdf/main.py
|
|
63
|
+
|
|
64
|
+
2. Run the release script:
|
|
65
|
+
```bash
|
|
66
|
+
./tag_release.sh
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
This will:
|
|
70
|
+
- Create a git tag for the current version
|
|
71
|
+
- Push the tag to GitHub
|
|
72
|
+
- Trigger the GitHub workflow to publish to PyPI
|
|
73
|
+
|
|
74
|
+
## License
|
|
75
|
+
|
|
76
|
+
MIT License
|
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
|
|
3
|
+
import sys
|
|
4
|
+
import os
|
|
5
|
+
import argparse
|
|
6
|
+
from typing import Optional, Dict, Any
|
|
7
|
+
from Quartz import PDFKit, CoreGraphics, kCGPDFContextUserPassword
|
|
8
|
+
from Foundation import NSURL, kCFAllocatorDefault
|
|
9
|
+
from AppKit import NSSavePanel, NSApp
|
|
10
|
+
|
|
11
|
+
__version__ = "0.1.0"
|
|
12
|
+
|
|
13
|
+
class PDFMergeError(Exception):
|
|
14
|
+
"""Custom exception for PDF merge errors"""
|
|
15
|
+
pass
|
|
16
|
+
|
|
17
|
+
class LetterheadPDF:
|
|
18
|
+
def __init__(self, letterhead_path: str, destination: str = "~/Desktop", suffix: str = " wm.pdf"):
|
|
19
|
+
self.letterhead_path = os.path.expanduser(letterhead_path)
|
|
20
|
+
self.destination = os.path.expanduser(destination)
|
|
21
|
+
self.suffix = suffix
|
|
22
|
+
|
|
23
|
+
def save_dialog(self, directory: str, filename: str) -> str:
|
|
24
|
+
"""Show save dialog and return selected path"""
|
|
25
|
+
panel = NSSavePanel.savePanel()
|
|
26
|
+
panel.setTitle_("Save PDF with Letterhead")
|
|
27
|
+
my_url = NSURL.fileURLWithPath_isDirectory_(directory, True)
|
|
28
|
+
panel.setDirectoryURL_(my_url)
|
|
29
|
+
panel.setNameFieldStringValue_(filename)
|
|
30
|
+
NSApp.activateIgnoringOtherApps_(True)
|
|
31
|
+
ret_value = panel.runModal()
|
|
32
|
+
return panel.filename() if ret_value else ''
|
|
33
|
+
|
|
34
|
+
def create_pdf_document(self, path: str) -> Optional[CoreGraphics.CGPDFDocumentRef]:
|
|
35
|
+
"""Create PDF document from path"""
|
|
36
|
+
path_bytes = path.encode('utf-8')
|
|
37
|
+
url = CoreGraphics.CFURLCreateFromFileSystemRepresentation(
|
|
38
|
+
kCFAllocatorDefault,
|
|
39
|
+
path_bytes,
|
|
40
|
+
len(path_bytes),
|
|
41
|
+
False
|
|
42
|
+
)
|
|
43
|
+
if not url:
|
|
44
|
+
raise PDFMergeError(f"Failed to create URL for path: {path}")
|
|
45
|
+
return CoreGraphics.CGPDFDocumentCreateWithURL(url)
|
|
46
|
+
|
|
47
|
+
def create_output_context(self, path: str, metadata: Dict[str, Any]) -> Optional[CoreGraphics.CGContextRef]:
|
|
48
|
+
"""Create PDF context for output"""
|
|
49
|
+
path_bytes = path.encode('utf-8')
|
|
50
|
+
url = CoreGraphics.CFURLCreateFromFileSystemRepresentation(
|
|
51
|
+
kCFAllocatorDefault,
|
|
52
|
+
path_bytes,
|
|
53
|
+
len(path_bytes),
|
|
54
|
+
False
|
|
55
|
+
)
|
|
56
|
+
if not url:
|
|
57
|
+
raise PDFMergeError(f"Failed to create output URL for path: {path}")
|
|
58
|
+
return CoreGraphics.CGPDFContextCreateWithURL(url, None, metadata)
|
|
59
|
+
|
|
60
|
+
def get_doc_info(self, file_path: str) -> Dict[str, Any]:
|
|
61
|
+
"""Get PDF metadata"""
|
|
62
|
+
pdf_url = NSURL.fileURLWithPath_(file_path)
|
|
63
|
+
pdf_doc = PDFKit.PDFDocument.alloc().initWithURL_(pdf_url)
|
|
64
|
+
if not pdf_doc:
|
|
65
|
+
raise PDFMergeError(f"Failed to read PDF metadata from: {file_path}")
|
|
66
|
+
|
|
67
|
+
metadata = pdf_doc.documentAttributes()
|
|
68
|
+
if "Keywords" in metadata:
|
|
69
|
+
keys = metadata["Keywords"]
|
|
70
|
+
mutable_metadata = metadata.mutableCopy()
|
|
71
|
+
mutable_metadata["Keywords"] = tuple(keys)
|
|
72
|
+
return mutable_metadata
|
|
73
|
+
return metadata
|
|
74
|
+
|
|
75
|
+
def merge_pdfs(self, input_path: str, output_path: str) -> None:
|
|
76
|
+
"""Merge letterhead with input PDF"""
|
|
77
|
+
try:
|
|
78
|
+
metadata = self.get_doc_info(input_path)
|
|
79
|
+
write_context = self.create_output_context(output_path, metadata)
|
|
80
|
+
read_pdf = self.create_pdf_document(input_path)
|
|
81
|
+
letterhead_pdf = self.create_pdf_document(self.letterhead_path)
|
|
82
|
+
|
|
83
|
+
if not all([write_context, read_pdf, letterhead_pdf]):
|
|
84
|
+
raise PDFMergeError("Failed to create PDF context or load PDFs")
|
|
85
|
+
|
|
86
|
+
num_pages = CoreGraphics.CGPDFDocumentGetNumberOfPages(read_pdf)
|
|
87
|
+
|
|
88
|
+
for page_num in range(1, num_pages + 1):
|
|
89
|
+
page = CoreGraphics.CGPDFDocumentGetPage(read_pdf, page_num)
|
|
90
|
+
letterhead_page = CoreGraphics.CGPDFDocumentGetPage(letterhead_pdf, 1)
|
|
91
|
+
|
|
92
|
+
if not page or not letterhead_page:
|
|
93
|
+
raise PDFMergeError(f"Failed to get page {page_num}")
|
|
94
|
+
|
|
95
|
+
media_box = CoreGraphics.CGPDFPageGetBoxRect(page, CoreGraphics.kCGPDFMediaBox)
|
|
96
|
+
if CoreGraphics.CGRectIsEmpty(media_box):
|
|
97
|
+
media_box = None
|
|
98
|
+
|
|
99
|
+
CoreGraphics.CGContextBeginPage(write_context, media_box)
|
|
100
|
+
CoreGraphics.CGContextDrawPDFPage(write_context, page)
|
|
101
|
+
CoreGraphics.CGContextSetBlendMode(write_context, CoreGraphics.kCGBlendModeNormal)
|
|
102
|
+
CoreGraphics.CGContextDrawPDFPage(write_context, letterhead_page)
|
|
103
|
+
CoreGraphics.CGContextEndPage(write_context)
|
|
104
|
+
|
|
105
|
+
CoreGraphics.CGPDFContextClose(write_context)
|
|
106
|
+
|
|
107
|
+
except Exception as e:
|
|
108
|
+
raise PDFMergeError(f"Error merging PDFs: {str(e)}")
|
|
109
|
+
|
|
110
|
+
def create_service_script(letterhead_path: str) -> None:
|
|
111
|
+
"""Create a PDF Service script for the given letterhead"""
|
|
112
|
+
pdf_services_dir = os.path.expanduser("~/Library/PDF Services")
|
|
113
|
+
os.makedirs(pdf_services_dir, exist_ok=True)
|
|
114
|
+
|
|
115
|
+
letterhead_name = os.path.splitext(os.path.basename(letterhead_path))[0]
|
|
116
|
+
script_name = f"Letterhead {letterhead_name}"
|
|
117
|
+
script_path = os.path.join(pdf_services_dir, script_name)
|
|
118
|
+
|
|
119
|
+
script_content = f'''#!/bin/bash
|
|
120
|
+
# Letterhead PDF Service for {letterhead_name}
|
|
121
|
+
uv run mac-letterhead print "{os.path.abspath(letterhead_path)}" "$1" "$2" "$3"
|
|
122
|
+
'''
|
|
123
|
+
|
|
124
|
+
with open(script_path, 'w') as f:
|
|
125
|
+
f.write(script_content)
|
|
126
|
+
os.chmod(script_path, 0o755)
|
|
127
|
+
print(f"Created PDF Service: {script_path}")
|
|
128
|
+
|
|
129
|
+
def print_command(args: argparse.Namespace) -> int:
|
|
130
|
+
"""Handle the print command"""
|
|
131
|
+
try:
|
|
132
|
+
letterhead = LetterheadPDF(letterhead_path=args.letterhead_path)
|
|
133
|
+
|
|
134
|
+
# Use save dialog to get output location
|
|
135
|
+
short_name = os.path.splitext(args.title)[0]
|
|
136
|
+
output_path = letterhead.save_dialog(letterhead.destination, short_name + letterhead.suffix)
|
|
137
|
+
|
|
138
|
+
if not output_path:
|
|
139
|
+
print("No output location selected.")
|
|
140
|
+
return 1
|
|
141
|
+
|
|
142
|
+
if not os.path.exists(args.input_path):
|
|
143
|
+
print(f"Input file not found: {args.input_path}")
|
|
144
|
+
return 1
|
|
145
|
+
|
|
146
|
+
letterhead.merge_pdfs(args.input_path, output_path)
|
|
147
|
+
return 0
|
|
148
|
+
|
|
149
|
+
except PDFMergeError as e:
|
|
150
|
+
print(f"Error: {str(e)}")
|
|
151
|
+
return 1
|
|
152
|
+
except Exception as e:
|
|
153
|
+
print(f"Unexpected error: {str(e)}")
|
|
154
|
+
return 1
|
|
155
|
+
|
|
156
|
+
def install_command(args: argparse.Namespace) -> int:
|
|
157
|
+
"""Handle the install command"""
|
|
158
|
+
try:
|
|
159
|
+
if not os.path.exists(args.letterhead_path):
|
|
160
|
+
print(f"Letterhead PDF not found: {args.letterhead_path}")
|
|
161
|
+
return 1
|
|
162
|
+
|
|
163
|
+
create_service_script(args.letterhead_path)
|
|
164
|
+
return 0
|
|
165
|
+
|
|
166
|
+
except Exception as e:
|
|
167
|
+
print(f"Error installing service: {str(e)}")
|
|
168
|
+
return 1
|
|
169
|
+
|
|
170
|
+
def main(args: Optional[list] = None) -> int:
|
|
171
|
+
"""Main entry point"""
|
|
172
|
+
if args is None:
|
|
173
|
+
args = sys.argv[1:]
|
|
174
|
+
|
|
175
|
+
parser = argparse.ArgumentParser(description="Letterhead PDF Service Manager")
|
|
176
|
+
parser.add_argument('--version', action='version', version=f'%(prog)s {__version__}')
|
|
177
|
+
|
|
178
|
+
subparsers = parser.add_subparsers(dest='command', help='Command to execute')
|
|
179
|
+
|
|
180
|
+
# Install command
|
|
181
|
+
install_parser = subparsers.add_parser('install', help='Install a new letterhead service')
|
|
182
|
+
install_parser.add_argument('letterhead_path', help='Path to letterhead PDF template')
|
|
183
|
+
|
|
184
|
+
# Print command
|
|
185
|
+
print_parser = subparsers.add_parser('print', help='Merge letterhead with document')
|
|
186
|
+
print_parser.add_argument('letterhead_path', help='Path to letterhead PDF template')
|
|
187
|
+
print_parser.add_argument('title', help='Output file title')
|
|
188
|
+
print_parser.add_argument('options', help='Print options')
|
|
189
|
+
print_parser.add_argument('input_path', help='Input PDF file path')
|
|
190
|
+
|
|
191
|
+
args = parser.parse_args(args)
|
|
192
|
+
|
|
193
|
+
if args.command == 'install':
|
|
194
|
+
return install_command(args)
|
|
195
|
+
elif args.command == 'print':
|
|
196
|
+
return print_command(args)
|
|
197
|
+
else:
|
|
198
|
+
parser.print_help()
|
|
199
|
+
return 1
|
|
200
|
+
|
|
201
|
+
if __name__ == "__main__":
|
|
202
|
+
sys.exit(main())
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["hatchling"]
|
|
3
|
+
build-backend = "hatchling.build"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "Mac-letterhead"
|
|
7
|
+
version = "0.1.0"
|
|
8
|
+
description = "A macOS PDF Service to merge letterhead with printed documents"
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
requires-python = ">=3.7"
|
|
11
|
+
license = "MIT"
|
|
12
|
+
authors = [
|
|
13
|
+
{ name = "Erik", email = "" }
|
|
14
|
+
]
|
|
15
|
+
dependencies = [
|
|
16
|
+
"pyobjc-framework-Quartz",
|
|
17
|
+
"pyobjc-framework-Cocoa",
|
|
18
|
+
]
|
|
19
|
+
|
|
20
|
+
[project.scripts]
|
|
21
|
+
mac-letterhead = "letterhead_pdf.main:main"
|
|
22
|
+
|
|
23
|
+
[tool.hatch.version]
|
|
24
|
+
path = "letterhead_pdf/__init__.py"
|
|
25
|
+
|
|
26
|
+
[tool.hatch.build.targets.wheel]
|
|
27
|
+
packages = ["letterhead_pdf"]
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
# Script to tag and push a new release
|
|
3
|
+
|
|
4
|
+
# Get version from pyproject.toml
|
|
5
|
+
VERSION=$(grep '^version = ' pyproject.toml | cut -d'"' -f2)
|
|
6
|
+
|
|
7
|
+
# Create and push tag
|
|
8
|
+
git tag -a "v$VERSION" -m "Release version $VERSION"
|
|
9
|
+
git push origin "v$VERSION"
|
|
10
|
+
|
|
11
|
+
echo "Created and pushed tag v$VERSION"
|
|
12
|
+
echo "This will trigger the GitHub workflow to publish to PyPI"
|
|
@@ -0,0 +1,191 @@
|
|
|
1
|
+
version = 1
|
|
2
|
+
requires-python = ">=3.7"
|
|
3
|
+
resolution-markers = [
|
|
4
|
+
"python_full_version >= '3.9'",
|
|
5
|
+
"python_full_version == '3.8.*'",
|
|
6
|
+
"python_full_version < '3.8'",
|
|
7
|
+
]
|
|
8
|
+
|
|
9
|
+
[[package]]
|
|
10
|
+
name = "mac-letterhead"
|
|
11
|
+
version = "0.1.0"
|
|
12
|
+
source = { editable = "." }
|
|
13
|
+
dependencies = [
|
|
14
|
+
{ name = "pyobjc-framework-cocoa", version = "9.2", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version < '3.8'" },
|
|
15
|
+
{ name = "pyobjc-framework-cocoa", version = "10.3.2", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version == '3.8.*'" },
|
|
16
|
+
{ name = "pyobjc-framework-cocoa", version = "11.0", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version >= '3.9'" },
|
|
17
|
+
{ name = "pyobjc-framework-quartz", version = "9.2", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version < '3.8'" },
|
|
18
|
+
{ name = "pyobjc-framework-quartz", version = "10.3.2", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version == '3.8.*'" },
|
|
19
|
+
{ name = "pyobjc-framework-quartz", version = "11.0", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version >= '3.9'" },
|
|
20
|
+
]
|
|
21
|
+
|
|
22
|
+
[package.metadata]
|
|
23
|
+
requires-dist = [
|
|
24
|
+
{ name = "pyobjc-framework-cocoa" },
|
|
25
|
+
{ name = "pyobjc-framework-quartz" },
|
|
26
|
+
]
|
|
27
|
+
|
|
28
|
+
[[package]]
|
|
29
|
+
name = "pyobjc-core"
|
|
30
|
+
version = "9.2"
|
|
31
|
+
source = { registry = "https://pypi.org/simple" }
|
|
32
|
+
resolution-markers = [
|
|
33
|
+
"python_full_version < '3.8'",
|
|
34
|
+
]
|
|
35
|
+
sdist = { url = "https://files.pythonhosted.org/packages/48/d9/a13566ce8914746557b9e8637a5abe1caae86ed202b0fb072029626b8bb1/pyobjc-core-9.2.tar.gz", hash = "sha256:d734b9291fec91ff4e3ae38b9c6839debf02b79c07314476e87da8e90b2c68c3", size = 923758 }
|
|
36
|
+
wheels = [
|
|
37
|
+
{ url = "https://files.pythonhosted.org/packages/04/8f/e005f4863a7257285d5c98365e2d6e2dd717298d829453fc6eb25ac74a11/pyobjc_core-9.2-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:fa674a39949f5cde8e5c7bbcd24496446bfc67592b028aedbec7f81dc5fc4daa", size = 736822 },
|
|
38
|
+
{ url = "https://files.pythonhosted.org/packages/81/49/766832436ba1f992328d6048145a1aaec11f677f1e53e0de658a2b627562/pyobjc_core-9.2-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:bbc8de304ee322a1ee530b4d2daca135a49b4a49aa3cedc6b2c26c43885f4842", size = 731867 },
|
|
39
|
+
{ url = "https://files.pythonhosted.org/packages/08/45/b993d9ac2ea48f020ae6f295c61695818eebf3921d0959a000b8fcb2895e/pyobjc_core-9.2-cp312-cp312-macosx_10_9_universal2.whl", hash = "sha256:0fa950f092673883b8bd28bc18397415cabb457bf410920762109b411789ade9", size = 734746 },
|
|
40
|
+
{ url = "https://files.pythonhosted.org/packages/b9/75/7750c084871975ead4fdfc4938315709d48ea7952e8a1a2c6247436e0478/pyobjc_core-9.2-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:586e4cae966282eaa61b21cae66ccdcee9d69c036979def26eebdc08ddebe20f", size = 397856 },
|
|
41
|
+
{ url = "https://files.pythonhosted.org/packages/04/f5/f750f72af0fe30c3e30b92f514701fb724db28b860838bc3b83584af01ff/pyobjc_core-9.2-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:41189c2c680931c0395a55691763c481fc681f454f21bb4f1644f98c24a45954", size = 406175 },
|
|
42
|
+
{ url = "https://files.pythonhosted.org/packages/b9/bd/3d85098a8f2cfd725391abf145c37a638717968efa52bfc0568e155a628e/pyobjc_core-9.2-cp38-cp38-macosx_11_0_universal2.whl", hash = "sha256:2d23ee539f2ba5e9f5653d75a13f575c7e36586fc0086792739e69e4c2617eda", size = 726463 },
|
|
43
|
+
{ url = "https://files.pythonhosted.org/packages/35/5e/6d130b175bb4d4635a0e434e7d05be019841ac11c63e9be7eb3c25029346/pyobjc_core-9.2-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:b9809cf96678797acb72a758f34932fe8e2602d5ab7abec15c5ac68ddb481720", size = 737102 },
|
|
44
|
+
]
|
|
45
|
+
|
|
46
|
+
[[package]]
|
|
47
|
+
name = "pyobjc-core"
|
|
48
|
+
version = "11.0"
|
|
49
|
+
source = { registry = "https://pypi.org/simple" }
|
|
50
|
+
resolution-markers = [
|
|
51
|
+
"python_full_version >= '3.9'",
|
|
52
|
+
"python_full_version == '3.8.*'",
|
|
53
|
+
]
|
|
54
|
+
sdist = { url = "https://files.pythonhosted.org/packages/5c/94/a111239b98260869780a5767e5d74bfd3a8c13a40457f479c28dcd91f89d/pyobjc_core-11.0.tar.gz", hash = "sha256:63bced211cb8a8fb5c8ff46473603da30e51112861bd02c438fbbbc8578d9a70", size = 994931 }
|
|
55
|
+
wheels = [
|
|
56
|
+
{ url = "https://files.pythonhosted.org/packages/bc/21/ccc992b38670176a615fb67686d709e03be989511da687f6f49ddc4ff6c8/pyobjc_core-11.0-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:10866b3a734d47caf48e456eea0d4815c2c9b21856157db5917b61dee06893a1", size = 732162 },
|
|
57
|
+
{ url = "https://files.pythonhosted.org/packages/52/05/fa97309c3b1bc1ec90d701db89902e0bd5e1024023aa2c5387b889458b1b/pyobjc_core-11.0-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:50675c0bb8696fe960a28466f9baf6943df2928a1fd85625d678fa2f428bd0bd", size = 727295 },
|
|
58
|
+
{ url = "https://files.pythonhosted.org/packages/56/ce/bf3ff9a9347721a398c3dfb83e29b43fb166b7ef590f3f7b7ddcd283df39/pyobjc_core-11.0-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:a03061d4955c62ddd7754224a80cdadfdf17b6b5f60df1d9169a3b1b02923f0b", size = 739750 },
|
|
59
|
+
{ url = "https://files.pythonhosted.org/packages/72/16/0c468e73dbecb821e3da8819236fe832dfc53eb5f66a11775b055a7589ea/pyobjc_core-11.0-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:c338c1deb7ab2e9436d4175d1127da2eeed4a1b564b3d83b9f3ae4844ba97e86", size = 743900 },
|
|
60
|
+
{ url = "https://files.pythonhosted.org/packages/f3/88/cecec88fd51f62a6cd7775cc4fb6bfde16652f97df88d28c84fb77ca0c18/pyobjc_core-11.0-cp313-cp313t-macosx_10_13_universal2.whl", hash = "sha256:b4e9dc4296110f251a4033ff3f40320b35873ea7f876bd29a1c9705bb5e08c59", size = 791905 },
|
|
61
|
+
{ url = "https://files.pythonhosted.org/packages/14/ba/1c459d0f1fc4c80314040ea6efea433c0641adffa6701679ec3a917b51a3/pyobjc_core-11.0-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:02406ece449d0f41b31e579e47ca77ced3eb57533df955281bfcecc99da74fba", size = 732648 },
|
|
62
|
+
]
|
|
63
|
+
|
|
64
|
+
[[package]]
|
|
65
|
+
name = "pyobjc-framework-cocoa"
|
|
66
|
+
version = "9.2"
|
|
67
|
+
source = { registry = "https://pypi.org/simple" }
|
|
68
|
+
resolution-markers = [
|
|
69
|
+
"python_full_version < '3.8'",
|
|
70
|
+
]
|
|
71
|
+
dependencies = [
|
|
72
|
+
{ name = "pyobjc-core", version = "9.2", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version < '3.8'" },
|
|
73
|
+
]
|
|
74
|
+
sdist = { url = "https://files.pythonhosted.org/packages/38/91/c54fdffda6d7cfad67ff617f19001163658d50bc72376d1584e691cf4895/pyobjc-framework-Cocoa-9.2.tar.gz", hash = "sha256:efd78080872d8c8de6c2b97e0e4eac99d6203a5d1637aa135d071d464eb2db53", size = 6170134 }
|
|
75
|
+
wheels = [
|
|
76
|
+
{ url = "https://files.pythonhosted.org/packages/d7/b3/e9c6d3e8d53453567805ca461cf52a08807ca2c860c1364c27dc10cdc67e/pyobjc_framework_Cocoa-9.2-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:9e02d8a7cc4eb7685377c50ba4f17345701acf4c05b1e7480d421bff9e2f62a4", size = 390521 },
|
|
77
|
+
{ url = "https://files.pythonhosted.org/packages/04/0a/1bb7500d725593fa035b44c5d16b95c0b80d501db3ce1c2e97f47be23c69/pyobjc_framework_Cocoa-9.2-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:3b1e6287b3149e4c6679cdbccd8e9ef6557a4e492a892e80a77df143f40026d2", size = 390498 },
|
|
78
|
+
{ url = "https://files.pythonhosted.org/packages/e0/f6/ecbc6323aa12df79acdaf8a75f7bb93d273b6dcd0c5b65658c2505bbc977/pyobjc_framework_Cocoa-9.2-cp312-cp312-macosx_10_9_universal2.whl", hash = "sha256:312977ce2e3989073c6b324c69ba24283de206fe7acd6dbbbaf3e29238a22537", size = 390601 },
|
|
79
|
+
{ url = "https://files.pythonhosted.org/packages/fa/f1/d3d3528d1d62d3e21211bcb8bd6bfe1b8c2815d700eb986fdb1f37de9c7d/pyobjc_framework_Cocoa-9.2-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:aae7841cf40c26dd915f4dd828f91c6616e6b7998630b72e704750c09e00f334", size = 284387 },
|
|
80
|
+
{ url = "https://files.pythonhosted.org/packages/9b/e2/49ea296127184f8b578838ba0d3d170abb75c23760d940f952df0fe0e132/pyobjc_framework_Cocoa-9.2-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:739a421e14382a46cbeb9a883f192dceff368ad28ec34d895c48c0ad34cf2c1d", size = 285108 },
|
|
81
|
+
{ url = "https://files.pythonhosted.org/packages/15/10/0d46760671b5fce9e494db4dca3a976cb0ea4feba1ad8ef489082a09b253/pyobjc_framework_Cocoa-9.2-cp38-cp38-macosx_11_0_universal2.whl", hash = "sha256:32d9ac1033fac1b821ddee8c68f972a7074ad8c50bec0bea9a719034c1c2fb94", size = 390526 },
|
|
82
|
+
{ url = "https://files.pythonhosted.org/packages/64/09/d0eb252549b3009f008c8415c9739a9c726ddfec9adc1aa92b6a8dec0efe/pyobjc_framework_Cocoa-9.2-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:b236bb965e41aeb2e215d4e98a5a230d4b63252c6d26e00924ea2e69540a59d6", size = 390462 },
|
|
83
|
+
]
|
|
84
|
+
|
|
85
|
+
[[package]]
|
|
86
|
+
name = "pyobjc-framework-cocoa"
|
|
87
|
+
version = "10.3.2"
|
|
88
|
+
source = { registry = "https://pypi.org/simple" }
|
|
89
|
+
resolution-markers = [
|
|
90
|
+
"python_full_version == '3.8.*'",
|
|
91
|
+
]
|
|
92
|
+
dependencies = [
|
|
93
|
+
{ name = "pyobjc-core", version = "11.0", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version == '3.8.*'" },
|
|
94
|
+
]
|
|
95
|
+
sdist = { url = "https://files.pythonhosted.org/packages/39/41/4f09a5e9a6769b4dafb293ea597ed693cc0def0e07867ad0a42664f530b6/pyobjc_framework_cocoa-10.3.2.tar.gz", hash = "sha256:673968e5435845bef969bfe374f31a1a6dc660c98608d2b84d5cae6eafa5c39d", size = 4942530 }
|
|
96
|
+
wheels = [
|
|
97
|
+
{ url = "https://files.pythonhosted.org/packages/7f/92/8181f9d1cc5539ffb56fe9a91df54348eb0eb36764e53b0082267192ce4b/pyobjc_framework_Cocoa-10.3.2-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:61f44c2adab28fdf3aa3d593c9497a2d9ceb9583ed9814adb48828c385d83ff4", size = 381552 },
|
|
98
|
+
{ url = "https://files.pythonhosted.org/packages/94/52/a41bf62d1467d74e61a729a1e36e064abb47f124a5e484643f021388873f/pyobjc_framework_Cocoa-10.3.2-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:7caaf8b260e81b27b7b787332846f644b9423bfc1536f6ec24edbde59ab77a87", size = 381529 },
|
|
99
|
+
{ url = "https://files.pythonhosted.org/packages/22/fc/496c6ce1386f93d22d9a1ee1889215ed69989d976efa27e46b37b95a4f2d/pyobjc_framework_Cocoa-10.3.2-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:c49e99fc4b9e613fb308651b99d52a8a9ae9916c8ef27aa2f5d585b6678a59bf", size = 381866 },
|
|
100
|
+
{ url = "https://files.pythonhosted.org/packages/4e/c4/bccb4c05422170c0afccf6ebbdcc7551f7ddd03d2f7a65498d02cb179993/pyobjc_framework_Cocoa-10.3.2-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:f1161b5713f9b9934c12649d73a6749617172e240f9431eff9e22175262fdfda", size = 381878 },
|
|
101
|
+
{ url = "https://files.pythonhosted.org/packages/25/ec/68657a633512edb84ecb1ff47a067a81028d6f027aa923e806400d2f8a26/pyobjc_framework_Cocoa-10.3.2-cp313-cp313t-macosx_10_13_universal2.whl", hash = "sha256:08e48b9ee4eb393447b2b781d16663b954bd10a26927df74f92e924c05568d89", size = 384925 },
|
|
102
|
+
{ url = "https://files.pythonhosted.org/packages/fc/6b/1167d2e926b29fa79680ba83028818af28ec97a91e84d849ab18a6b51342/pyobjc_framework_Cocoa-10.3.2-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:7faa448d2038ae0e0287a326d390002e744bb6470e45995e2dbd16c892e4495a", size = 284040 },
|
|
103
|
+
{ url = "https://files.pythonhosted.org/packages/41/df/b627ac079a11011f7a9e4ae5a3c358fc6540d0b51386d339e214a957a4aa/pyobjc_framework_Cocoa-10.3.2-cp38-cp38-macosx_11_0_universal2.whl", hash = "sha256:fcd53fee2be9708576617994b107aedc2c40824b648cd51e780e8399c0a447b6", size = 381813 },
|
|
104
|
+
{ url = "https://files.pythonhosted.org/packages/cc/fb/3ed87bcc1db8290cf83aad4cb584c7b489f1aad5500008ba3b43b6fd1a8b/pyobjc_framework_Cocoa-10.3.2-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:838fcf0d10674bde9ff64a3f20c0e188f2dc5e804476d80509b81c4ac1dabc59", size = 381514 },
|
|
105
|
+
]
|
|
106
|
+
|
|
107
|
+
[[package]]
|
|
108
|
+
name = "pyobjc-framework-cocoa"
|
|
109
|
+
version = "11.0"
|
|
110
|
+
source = { registry = "https://pypi.org/simple" }
|
|
111
|
+
resolution-markers = [
|
|
112
|
+
"python_full_version >= '3.9'",
|
|
113
|
+
]
|
|
114
|
+
dependencies = [
|
|
115
|
+
{ name = "pyobjc-core", version = "11.0", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version >= '3.9'" },
|
|
116
|
+
]
|
|
117
|
+
sdist = { url = "https://files.pythonhosted.org/packages/c5/32/53809096ad5fc3e7a2c5ddea642590a5f2cb5b81d0ad6ea67fdb2263d9f9/pyobjc_framework_cocoa-11.0.tar.gz", hash = "sha256:00346a8cb81ad7b017b32ff7bf596000f9faa905807b1bd234644ebd47f692c5", size = 6173848 }
|
|
118
|
+
wheels = [
|
|
119
|
+
{ url = "https://files.pythonhosted.org/packages/37/16/905a32c5241848ddd91d94bae346342750f28f49fadb3746e9e796f929f3/pyobjc_framework_Cocoa-11.0-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:fbc65f260d617d5463c7fb9dbaaffc23c9a4fabfe3b1a50b039b61870b8daefd", size = 385509 },
|
|
120
|
+
{ url = "https://files.pythonhosted.org/packages/23/97/81fd41ad90e9c241172110aa635a6239d56f50d75923aaedbbe351828580/pyobjc_framework_Cocoa-11.0-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:3ea7be6e6dd801b297440de02d312ba3fa7fd3c322db747ae1cb237e975f5d33", size = 385534 },
|
|
121
|
+
{ url = "https://files.pythonhosted.org/packages/5b/8d/0e2558447c26b3ba64f7c9776a5a6c9d2ae8abf9d34308b174ae0934402e/pyobjc_framework_Cocoa-11.0-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:280a577b83c68175a28b2b7138d1d2d3111f2b2b66c30e86f81a19c2b02eae71", size = 385811 },
|
|
122
|
+
{ url = "https://files.pythonhosted.org/packages/1d/a5/609281a7e89efefbef9db1d8fe66bc0458c3b4e74e2227c644f9c18926fa/pyobjc_framework_Cocoa-11.0-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:15b2bd977ed340074f930f1330f03d42912d5882b697d78bd06f8ebe263ef92e", size = 385889 },
|
|
123
|
+
{ url = "https://files.pythonhosted.org/packages/93/f6/2d5a863673ef7b85a3cba875c43e6c495fb1307427a6801001ae94bb5e54/pyobjc_framework_Cocoa-11.0-cp313-cp313t-macosx_10_13_universal2.whl", hash = "sha256:5750001db544e67f2b66f02067d8f0da96bb2ef71732bde104f01b8628f9d7ea", size = 389831 },
|
|
124
|
+
{ url = "https://files.pythonhosted.org/packages/27/29/459cacd815c2e13de60b919c0af3d1056f74ff52172a4841684b5b946492/pyobjc_framework_Cocoa-11.0-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:ddff25b0755d59873d186e1e07d6aaddb19d55e3ae890d69ff2d9babf8627657", size = 385407 },
|
|
125
|
+
]
|
|
126
|
+
|
|
127
|
+
[[package]]
|
|
128
|
+
name = "pyobjc-framework-quartz"
|
|
129
|
+
version = "9.2"
|
|
130
|
+
source = { registry = "https://pypi.org/simple" }
|
|
131
|
+
resolution-markers = [
|
|
132
|
+
"python_full_version < '3.8'",
|
|
133
|
+
]
|
|
134
|
+
dependencies = [
|
|
135
|
+
{ name = "pyobjc-core", version = "9.2", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version < '3.8'" },
|
|
136
|
+
{ name = "pyobjc-framework-cocoa", version = "9.2", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version < '3.8'" },
|
|
137
|
+
]
|
|
138
|
+
sdist = { url = "https://files.pythonhosted.org/packages/49/52/a56bbd76bba721f49fa07d34ac962414b95eb49a9b941fe4d3761f3e6934/pyobjc-framework-Quartz-9.2.tar.gz", hash = "sha256:f586183b9b9ef7f165f0444a7b714ed965d79f6e92617caaf869150dcfd5a72b", size = 3905351 }
|
|
139
|
+
wheels = [
|
|
140
|
+
{ url = "https://files.pythonhosted.org/packages/e2/91/2bf6bd82d46427b93c7de4f5f37e7ee7e5dda57d85134aa42953319781fb/pyobjc_framework_Quartz-9.2-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:fb700b24088c8fe126dc0fb5ab4caa156e1e48c1a94839e6bd31c18b570ed53a", size = 228252 },
|
|
141
|
+
{ url = "https://files.pythonhosted.org/packages/78/4a/38d88401b2e76eb7e470ecd64cb7a7eb0cd79bbc0639bc84e2deb800a967/pyobjc_framework_Quartz-9.2-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:6f983d26720f5f9786db5b525fc61b981be50d0456da1686fc533867d8990bb9", size = 228260 },
|
|
142
|
+
{ url = "https://files.pythonhosted.org/packages/ed/9c/df038e1912f5d793dc94cbd082ac98f35deb712e033504b3285b136df46a/pyobjc_framework_Quartz-9.2-cp312-cp312-macosx_10_9_universal2.whl", hash = "sha256:5c512837c211df6a5214d4015f1f85524607952b0619789861c490900e3d5fb9", size = 227940 },
|
|
143
|
+
{ url = "https://files.pythonhosted.org/packages/ac/08/087fb085a6b9938c72d9b314e4c2f6df22f84a330c790b6063ffe0a47609/pyobjc_framework_Quartz-9.2-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:0f81de8c846034e725b7ceaa2fec0cca16463a56bdbe099d1d44f20112182431", size = 143911 },
|
|
144
|
+
{ url = "https://files.pythonhosted.org/packages/b8/8d/f8f83f6019a564926a6e5ac6bb08c1de61de92b02c0bb3faa5e77ffe0389/pyobjc_framework_Quartz-9.2-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:ab346bbf410a0eaeca26d713ac1f13c014346cd1b7e195017c9502a17f6273db", size = 145076 },
|
|
145
|
+
{ url = "https://files.pythonhosted.org/packages/82/11/8631e39cb4bf889ccb5e6a86f45f022f0b2c9c4a416738229deccc65a86b/pyobjc_framework_Quartz-9.2-cp38-cp38-macosx_11_0_universal2.whl", hash = "sha256:16a0e0677dae6db858cf19943e34deb0424776c9a90a7b67564d0e216861b20d", size = 228787 },
|
|
146
|
+
{ url = "https://files.pythonhosted.org/packages/e3/f5/4d6043a7d659b0ea6fefd515c248f73082fb0a61d3f68e6b1778a8d5b1b9/pyobjc_framework_Quartz-9.2-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:67909baadcfc3ad2864539af3e94c2c024a29d01d9d6da22bbf9b84eac50064e", size = 228172 },
|
|
147
|
+
]
|
|
148
|
+
|
|
149
|
+
[[package]]
|
|
150
|
+
name = "pyobjc-framework-quartz"
|
|
151
|
+
version = "10.3.2"
|
|
152
|
+
source = { registry = "https://pypi.org/simple" }
|
|
153
|
+
resolution-markers = [
|
|
154
|
+
"python_full_version == '3.8.*'",
|
|
155
|
+
]
|
|
156
|
+
dependencies = [
|
|
157
|
+
{ name = "pyobjc-core", version = "11.0", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version == '3.8.*'" },
|
|
158
|
+
{ name = "pyobjc-framework-cocoa", version = "10.3.2", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version == '3.8.*'" },
|
|
159
|
+
]
|
|
160
|
+
sdist = { url = "https://files.pythonhosted.org/packages/eb/bd/d78c845a6f0640975e837d1d0f04d6bbd95bb88b77dcee22482144ac5ad0/pyobjc_framework_quartz-10.3.2.tar.gz", hash = "sha256:193e7752c93e2d1304f914e3a8c069f4b66de237376c5285ba7c72e9ee0e3b15", size = 3776754 }
|
|
161
|
+
wheels = [
|
|
162
|
+
{ url = "https://files.pythonhosted.org/packages/6d/fd/60864ad81d267978b64341d298e5167a973b9d0121bd01f9ff47ad1902fc/pyobjc_framework_Quartz-10.3.2-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:5574754c23895269751c2b78d2d2b33b6de415f562534a1432484558f0a5a293", size = 209295 },
|
|
163
|
+
{ url = "https://files.pythonhosted.org/packages/e5/0c/465bb4415be16d96106f972500bc0fba5cd8a64951e24b37467d331e68f7/pyobjc_framework_Quartz-10.3.2-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:4697f3ef1991f7877c201778005dc4098ced3d19d938ebf916384c8f795488d3", size = 209298 },
|
|
164
|
+
{ url = "https://files.pythonhosted.org/packages/ca/92/29f0726d1031f0958db7639ab25fd1d2591b2c0638f3a7ca771bbf2cceee/pyobjc_framework_Quartz-10.3.2-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:604188ee8ff051ffe74a12cb3274403fe9c3fa02b15fc4132685c0f74285ffe5", size = 209183 },
|
|
165
|
+
{ url = "https://files.pythonhosted.org/packages/91/31/514b9b7c20fb8347dce5cdaa0934253a9c2c637d3f05b8f6ab1bb7fbbb4f/pyobjc_framework_Quartz-10.3.2-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:9e27fb446e012c9571bc163cff5f3036e9e6fa5caca06b5d7882ad1c6b6aaf0c", size = 209167 },
|
|
166
|
+
{ url = "https://files.pythonhosted.org/packages/ed/8f/6c23066cfc3c65c9769ac0fb9696c94ce36dc81dba48270f9b4810ee72d6/pyobjc_framework_Quartz-10.3.2-cp313-cp313t-macosx_10_13_universal2.whl", hash = "sha256:d5bd6ef96a3d08c97cf2aca43a819113cdff494b5abebcedd7cf23b6d6e711f4", size = 213534 },
|
|
167
|
+
{ url = "https://files.pythonhosted.org/packages/2e/79/59963b2d9205695e5e3a0cbfbc5b225b687dc4fe111a1746707776e1f882/pyobjc_framework_Quartz-10.3.2-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:d3b55ec27cffff18d98d73694001a211ad4cdf717f7d8ad76235f845771d8b5d", size = 138020 },
|
|
168
|
+
{ url = "https://files.pythonhosted.org/packages/7a/12/f31289e7a824284e4bddd79745460c376c416bc003125b4fe704f4a09691/pyobjc_framework_Quartz-10.3.2-cp38-cp38-macosx_11_0_universal2.whl", hash = "sha256:a58826db7e71de4654e5215b46f00f7825b17991078c9ba74ca729a4da024f82", size = 211696 },
|
|
169
|
+
{ url = "https://files.pythonhosted.org/packages/85/8f/75fd9e6b7727607d631aaa555232189abca4b6b73318af087ed945ffb7e5/pyobjc_framework_Quartz-10.3.2-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:6ede1001c28d27fc76f89a3243b3127dbd7dd03f39a3324766ae895cdcd1ebf1", size = 209270 },
|
|
170
|
+
]
|
|
171
|
+
|
|
172
|
+
[[package]]
|
|
173
|
+
name = "pyobjc-framework-quartz"
|
|
174
|
+
version = "11.0"
|
|
175
|
+
source = { registry = "https://pypi.org/simple" }
|
|
176
|
+
resolution-markers = [
|
|
177
|
+
"python_full_version >= '3.9'",
|
|
178
|
+
]
|
|
179
|
+
dependencies = [
|
|
180
|
+
{ name = "pyobjc-core", version = "11.0", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version >= '3.9'" },
|
|
181
|
+
{ name = "pyobjc-framework-cocoa", version = "11.0", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version >= '3.9'" },
|
|
182
|
+
]
|
|
183
|
+
sdist = { url = "https://files.pythonhosted.org/packages/a5/ad/f00f3f53387c23bbf4e0bb1410e11978cbf87c82fa6baff0ee86f74c5fb6/pyobjc_framework_quartz-11.0.tar.gz", hash = "sha256:3205bf7795fb9ae34747f701486b3db6dfac71924894d1f372977c4d70c3c619", size = 3952463 }
|
|
184
|
+
wheels = [
|
|
185
|
+
{ url = "https://files.pythonhosted.org/packages/bd/b3/75fccb0406aac00eecbd14f278a9b6e6fc0e4483220d57eb3aff68666fb1/pyobjc_framework_Quartz-11.0-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:da3ab13c9f92361959b41b0ad4cdd41ae872f90a6d8c58a9ed699bc08ab1c45c", size = 212343 },
|
|
186
|
+
{ url = "https://files.pythonhosted.org/packages/a3/6a/68957c8c5e8f0128d4d419728bac397d48fa7ad7a66e82b70e64d129ffca/pyobjc_framework_Quartz-11.0-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:d251696bfd8e8ef72fbc90eb29fec95cb9d1cc409008a183d5cc3246130ae8c2", size = 212349 },
|
|
187
|
+
{ url = "https://files.pythonhosted.org/packages/60/5d/df827b78dcb5140652ad08af8038c9ddd7e01e6bdf84462bfee644e6e661/pyobjc_framework_Quartz-11.0-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:cb4a9f2d9d580ea15e25e6b270f47681afb5689cafc9e25712445ce715bcd18e", size = 212061 },
|
|
188
|
+
{ url = "https://files.pythonhosted.org/packages/a6/9e/54c48fe8faab06ee5eb80796c8c17ec61fc313d84398540ee70abeaf7070/pyobjc_framework_Quartz-11.0-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:973b4f9b8ab844574461a038bd5269f425a7368d6e677e3cc81fcc9b27b65498", size = 212478 },
|
|
189
|
+
{ url = "https://files.pythonhosted.org/packages/4a/28/456b54a59bfe11a91b7b4e94f8ffdcf174ffd1efa169f4283e5b3bc10194/pyobjc_framework_Quartz-11.0-cp313-cp313t-macosx_10_13_universal2.whl", hash = "sha256:66ab58d65348863b8707e63b2ec5cdc54569ee8189d1af90d52f29f5fdf6272c", size = 217973 },
|
|
190
|
+
{ url = "https://files.pythonhosted.org/packages/89/a9/c7efb146a2b9c9a7754fed1dd725f7342959644d903006dec28aa65a637e/pyobjc_framework_Quartz-11.0-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:1032f63f2a4ee98366764e69c249f1d93813821e17d224cf626cf11fb1801fc4", size = 212182 },
|
|
191
|
+
]
|