Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
.idea
template.html
token.json
users.json
users.json
.venv
1 change: 1 addition & 0 deletions .python-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.12
17 changes: 15 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,24 @@ A good example to get service account credentials from Google Cloud Console.
1. Copy `template.example.html` to `template.html` and modify the file.
2. Copy `users.example.json` to `users.json` and modify the file.

## 3. Build and run
## 3. Build and run Containers
```bash
# Build the Docker image
docker build -t gmail-signature .

# Run the script inside a container
cat script.py | docker run -i --rm -v `pwd`:/data -w /data gmail-signature
```
```

## 3. Alternative Build and run UV
```bash
uv run script.py
```

### 4. Run Google script
1. Go to `script.google.com`
2. Paste content of workspace2json.gs inside editor
3. Adjust values to match your domain
4. Run script, and give permission of admin user
5. Find json in admin drive.
6. Use json to run script
10 changes: 10 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
[project]
name = "gmail-signature"
version = "0.1.0"
description = "Script to bulk-update Gmail signatures for Google Workspace."
readme = "README.md"
requires-python = ">=3.12"
dependencies = [
"google-api-python-client>=2.159.0",
"google>=3.0.0",
]
Loading