fix(skills): ship runnable brave/openai scripts
This commit is contained in:
@@ -26,4 +26,4 @@ node {baseDir}/scripts/content.mjs "https://example.com/article"
|
|||||||
Notes:
|
Notes:
|
||||||
- Needs `BRAVE_API_KEY`.
|
- Needs `BRAVE_API_KEY`.
|
||||||
- Content extraction is best-effort (good for articles; not for app-like sites).
|
- 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).
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
#!/usr/bin/env node
|
#!/usr/bin/env node
|
||||||
import { readFileSync } from "node:fs";
|
|
||||||
|
|
||||||
function usage() {
|
function usage() {
|
||||||
console.error(`Usage: search.mjs "query" [-n 5] [--content]`);
|
console.error(`Usage: search.mjs "query" [-n 5] [--content]`);
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ Generate a handful of “random but structured” prompts and render them via th
|
|||||||
|
|
||||||
```bash
|
```bash
|
||||||
python3 {baseDir}/scripts/gen.py
|
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:
|
Useful flags:
|
||||||
|
|||||||
@@ -21,7 +21,8 @@ def slugify(text: str) -> str:
|
|||||||
|
|
||||||
def default_out_dir() -> Path:
|
def default_out_dir() -> Path:
|
||||||
now = dt.datetime.now().strftime("%Y-%m-%d-%H-%M-%S")
|
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)
|
base.mkdir(parents=True, exist_ok=True)
|
||||||
return base / f"openai-image-gen-{now}"
|
return base / f"openai-image-gen-{now}"
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user