-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathInit-SheetsModules.ps1
More file actions
61 lines (49 loc) · 2.27 KB
/
Init-SheetsModules.ps1
File metadata and controls
61 lines (49 loc) · 2.27 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
# Init-SheetsModules.ps1
# One-time scaffold for DV Google Sheets & AI Tools modules
$modules = @(
@{ name = "arena-dashboard"; title = "Arena Dashboard"; desc = "Lightweight dashboard for market metrics and notes."; },
@{ name = "finance-tracker"; title = "Finance Tracker"; desc = "Minimal finance system for income & expenses."; },
@{ name = "content-planner"; title = "Content Planner"; desc = "AI-friendly content planning toolkit."; }
)
# Base folder (current repo)
$root = Get-Location
$sheetsRoot = Join-Path $root "sheets"
New-Item -ItemType Directory -Force -Path $sheetsRoot | Out-Null
$nl = "`r`n"
foreach ($m in $modules) {
$modulePath = Join-Path $sheetsRoot $m.name
New-Item -ItemType Directory -Force -Path $modulePath | Out-Null
# ---------- README.md ----------
$readme = "# " + $m.title + $nl + $nl
$readme += "Prototype module from **DV Google Sheets & AI Tools**." + $nl + $nl
$readme += $m.desc + $nl + $nl
$readme += "## Files" + $nl + $nl
$readme += "- `README.md` — module overview and quick notes." + $nl
$readme += "- `manifest.json` — structure and metadata." + $nl
$readme += "- `code.gs` — main Google Apps Script logic (entry point)." + $nl + $nl
$readme += "## Status" + $nl + $nl
$readme += "- Version: 0.1" + $nl
$readme += "- Stage: Prototype — will be expanded in future releases." + $nl
Set-Content -Path (Join-Path $modulePath "README.md") -Value $readme -Encoding UTF8
# ---------- manifest.json ----------
$manifest = "{" + $nl
$manifest += " `"name`": `"" + $m.name + "`"," + $nl
$manifest += " `"title`": `"" + $m.title + "`"," + $nl
$manifest += " `"version`": `"0.1.0`"," + $nl
$manifest += " `"stage`": `"prototype`"" + $nl
$manifest += "}" + $nl
Set-Content -Path (Join-Path $modulePath "manifest.json") -Value $manifest -Encoding UTF8
# ---------- code.gs ----------
$code = @"
/**
* $($m.title) — prototype entry point.
* Part of DV Google Sheets & AI Tools.
*/
function initModule() {
Logger.log('Module $($m.title) loaded.');
}
"@
Set-Content -Path (Join-Path $modulePath "code.gs") -Value $code -Encoding UTF8
Write-Host ("✔ Module scaffolded: {0}" -f $m.name)
}
Write-Host ("All modules created under: {0}" -f $sheetsRoot)