mirror of
https://github.com/browseros-ai/BrowserOS.git
synced 2026-05-14 16:14:28 +00:00
Compare commits
2 Commits
fix/github
...
fix/clean-
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
099babc9ab | ||
|
|
30e4d1f072 |
3840
.vscode/PythonImportHelper-v2-Completion.json
vendored
3840
.vscode/PythonImportHelper-v2-Completion.json
vendored
File diff suppressed because it is too large
Load Diff
39
scripts/save_clipboard.py
generated
39
scripts/save_clipboard.py
generated
@@ -1,39 +0,0 @@
|
||||
#!/usr/bin/env python3
|
||||
"""
|
||||
Save clipboard image to a specified path.
|
||||
Usage: python scripts/save_clipboard.py <output_path>
|
||||
"""
|
||||
import sys
|
||||
import os
|
||||
|
||||
try:
|
||||
from PIL import ImageGrab
|
||||
except ImportError:
|
||||
print("Installing Pillow...")
|
||||
import subprocess
|
||||
subprocess.check_call([sys.executable, "-m", "pip", "install", "Pillow", "-q"])
|
||||
from PIL import ImageGrab
|
||||
|
||||
def main():
|
||||
if len(sys.argv) != 2:
|
||||
print("Usage: python scripts/save_clipboard.py <output_path>")
|
||||
print("Example: python scripts/save_clipboard.py docs/images/screenshot.png")
|
||||
sys.exit(1)
|
||||
|
||||
output_path = sys.argv[1]
|
||||
|
||||
# Ensure directory exists
|
||||
os.makedirs(os.path.dirname(output_path) or ".", exist_ok=True)
|
||||
|
||||
# Grab from clipboard
|
||||
img = ImageGrab.grabclipboard()
|
||||
|
||||
if img is None:
|
||||
print("❌ No image in clipboard. Copy an image first (Cmd+C).")
|
||||
sys.exit(1)
|
||||
|
||||
img.save(output_path)
|
||||
print(f"✅ Saved to {output_path}")
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
@@ -1,15 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
DIR="packages/browseros-agent"
|
||||
BRANCH="${1:-main}"
|
||||
|
||||
git -C "$DIR" fetch origin "$BRANCH" --tags
|
||||
git -C "$DIR" checkout -q "$BRANCH"
|
||||
git -C "$DIR" pull -q --ff-only origin "$BRANCH"
|
||||
|
||||
NEW_SHA=$(git -C "$DIR" rev-parse --short HEAD)
|
||||
git add "$DIR"
|
||||
git commit -m "chore: sync packages/browseros-agent submodule (to $NEW_SHA)" || { echo "No changes"; exit 0; }
|
||||
echo "Bumped $DIR to $NEW_SHA"
|
||||
|
||||
Reference in New Issue
Block a user