fix(skills): ship runnable brave/openai scripts

This commit is contained in:
Peter Steinberger
2025-12-20 12:54:18 +00:00
parent e1a3bab7e5
commit 8feb09aa89
4 changed files with 4 additions and 4 deletions

View File

@@ -26,4 +26,4 @@ node {baseDir}/scripts/content.mjs "https://example.com/article"
Notes:
- Needs `BRAVE_API_KEY`.
- Content extraction is best-effort (good for articles; not for app-like sites).
- If a site is blocked or too JS-heavy, prefer the `summarize` skill (it can use a Firecrawl fallback).
- If a site is blocked or too JS-heavy, prefer the `summarize` skill (it can use a Firecrawl fallback).

View File

@@ -1,5 +1,4 @@
#!/usr/bin/env node
import { readFileSync } from "node:fs";
function usage() {
console.error(`Usage: search.mjs "query" [-n 5] [--content]`);

View File

@@ -12,7 +12,7 @@ Generate a handful of “random but structured” prompts and render them via th
```bash
python3 {baseDir}/scripts/gen.py
open ./tmp/openai-image-gen-*/index.html
open ~/Projects/tmp/openai-image-gen-*/index.html # if ~/Projects/tmp exists; else ./tmp/...
```
Useful flags:

View File

@@ -21,7 +21,8 @@ def slugify(text: str) -> str:
def default_out_dir() -> Path:
now = dt.datetime.now().strftime("%Y-%m-%d-%H-%M-%S")
base = Path("./tmp")
preferred = Path.home() / "Projects" / "tmp"
base = preferred if preferred.is_dir() else Path("./tmp")
base.mkdir(parents=True, exist_ok=True)
return base / f"openai-image-gen-{now}"