laporan-generator 2.8.0 → 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.agents/skills/laporan-generator/SKILL.md +14 -9
- package/.agents/skills/laporan-generator/references/campus-guide.md +8 -2
- package/.agents/skills/laporan-generator/references/metadata-schema.md +39 -11
- package/.agents/skills/laporan-generator/references/prompt.md +319 -0
- package/.agents/skills/laporan-generator/references/template-guide.md +20 -14
- package/.agents/skills/laporan-generator/resources/Makefile +11 -7
- package/.agents/skills/laporan-generator/resources/build-docx.sh +4 -1
- package/.agents/skills/laporan-generator/resources/build.sh +4 -1
- package/.agents/skills/laporan-generator/resources/docx.lua +143 -5
- package/.agents/skills/laporan-generator/resources/laporan +34 -17
- package/.agents/skills/laporan-generator/resources/laporan.ps1 +612 -575
- package/.agents/skills/laporan-generator/resources/presets/ipb-ppki.yml +27 -0
- package/.agents/skills/laporan-generator/resources/presets/its-skripsi.yml +6 -6
- package/.agents/skills/laporan-generator/resources/presets/telkom-ta.yml +26 -0
- package/.agents/skills/laporan-generator/resources/presets/ub-skripsi.yml +26 -0
- package/.agents/skills/laporan-generator/resources/presets/ui-skripsi.yml +6 -6
- package/.agents/skills/laporan-generator/resources/presets/unair-skripsi.yml +26 -0
- package/.agents/skills/laporan-generator/resources/presets/undip-skripsi.yml +26 -0
- package/.agents/skills/laporan-generator/resources/scripts/bundle.py +28 -6
- package/.agents/skills/laporan-generator/resources/scripts/docx-pagenum.py +6 -2
- package/.agents/skills/laporan-generator/resources/scripts/finalize-docx.py +13 -0
- package/.agents/skills/laporan-generator/resources/scripts/ingest.py +121 -0
- package/.agents/skills/laporan-generator/resources/scripts/report-doctor.py +9 -2
- package/.agents/skills/laporan-generator/resources/scripts/report-stats.py +9 -2
- package/.agents/skills/laporan-generator/resources/scripts/scan-preset.py +1 -1
- package/.agents/skills/laporan-generator/resources/scripts/setup-deps.sh +9 -3
- package/.agents/skills/laporan-generator/resources/scripts/test_scripts.py +42 -3
- package/.agents/skills/laporan-generator/scripts/build-docx.sh +125 -0
- package/.agents/skills/laporan-generator/scripts/build.sh +35 -8
- package/.agents/skills/laporan-generator/scripts/bundle.py +28 -6
- package/.agents/skills/laporan-generator/scripts/docx-pagenum.py +6 -2
- package/.agents/skills/laporan-generator/scripts/finalize-docx.py +13 -0
- package/.agents/skills/laporan-generator/scripts/ingest.py +121 -0
- package/.agents/skills/laporan-generator/scripts/laporan +87 -20
- package/.agents/skills/laporan-generator/scripts/laporan.ps1 +163 -57
- package/.agents/skills/laporan-generator/scripts/report-doctor.py +9 -2
- package/.agents/skills/laporan-generator/scripts/report-stats.py +9 -2
- package/.agents/skills/laporan-generator/scripts/scan-preset.py +1 -1
- package/.agents/skills/laporan-generator/scripts/setup-deps.sh +9 -3
- package/.agents/skills/laporan-generator/scripts/test_scripts.py +42 -3
- package/Makefile +11 -7
- package/README.md +48 -383
- package/bin/laporan-generator.js +43 -6
- package/build-docx.sh +4 -1
- package/build.sh +4 -1
- package/docs/campus-guide.md +8 -2
- package/docs/metadata-schema.md +37 -11
- package/docs/prompt.md +319 -0
- package/docs/template-guide.md +20 -14
- package/laporan +34 -17
- package/laporan.ps1 +612 -575
- package/lib/init.js +64 -28
- package/lib/mcp.js +184 -11
- package/lib/sync-hosts.js +41 -9
- package/package.json +4 -11
- package/presets/ipb-ppki.yml +27 -0
- package/presets/its-skripsi.yml +6 -6
- package/presets/telkom-ta.yml +26 -0
- package/presets/ub-skripsi.yml +26 -0
- package/presets/ui-skripsi.yml +6 -6
- package/presets/unair-skripsi.yml +26 -0
- package/presets/undip-skripsi.yml +26 -0
- package/scripts/bundle.py +28 -6
- package/scripts/docx-pagenum.py +6 -2
- package/scripts/finalize-docx.py +13 -0
- package/scripts/ingest.py +121 -0
- package/scripts/report-doctor.py +9 -2
- package/scripts/report-stats.py +9 -2
- package/scripts/scan-preset.py +1 -1
- package/scripts/setup-deps.sh +9 -3
- package/scripts/test_scripts.py +42 -3
- package/{docx.lua → templates/default/docx.lua} +143 -5
- package/templates/default/gambar/.gitkeep +1 -0
- /package/{apa.csl → templates/default/apa.csl} +0 -0
- /package/{chapters → templates/default/chapters}/bab1-pendahuluan.md +0 -0
- /package/{chapters → templates/default/chapters}/bab2-tinjauan-pustaka.md +0 -0
- /package/{chapters → templates/default/chapters}/bab3-metodologi.md +0 -0
- /package/{chapters → templates/default/chapters}/bab4-hasil-dan-pembahasan.md +0 -0
- /package/{chapters → templates/default/chapters}/bab5-penutup.md +0 -0
- /package/{cover.md → templates/default/cover.md} +0 -0
- /package/{logo.jpg → templates/default/logo.jpg} +0 -0
- /package/{metadata.yml → templates/default/metadata.yml} +0 -0
- /package/{reference.docx → templates/default/reference.docx} +0 -0
- /package/{references.bib → templates/default/references.bib} +0 -0
- /package/{template.typ → templates/default/template.typ} +0 -0
|
@@ -14,6 +14,28 @@ local subsub = 0
|
|
|
14
14
|
local toc_entries = {}
|
|
15
15
|
local chapter_prefix = "BAB "
|
|
16
16
|
local chapter_num_fmt = "roman"
|
|
17
|
+
local sub_dot = true
|
|
18
|
+
local subsub_dot = false
|
|
19
|
+
local doc_margins = { top = 1134, right = 1417, bottom = 1701, left = 1417 }
|
|
20
|
+
|
|
21
|
+
local function dim_to_twips(val, fallback)
|
|
22
|
+
if not val or val == "" then return fallback end
|
|
23
|
+
local num, unit = val:match("^%s*([0-9]+%.?[0-9]*)%s*([a-zA-Z]+)%s*$")
|
|
24
|
+
if not num then return fallback end
|
|
25
|
+
local n = tonumber(num)
|
|
26
|
+
if not n then return fallback end
|
|
27
|
+
unit = unit:lower()
|
|
28
|
+
if unit == "cm" then
|
|
29
|
+
return math.floor(n * 566.929133858 + 0.5)
|
|
30
|
+
elseif unit == "mm" then
|
|
31
|
+
return math.floor(n * 56.6929133858 + 0.5)
|
|
32
|
+
elseif unit == "in" then
|
|
33
|
+
return math.floor(n * 1440 + 0.5)
|
|
34
|
+
elseif unit == "pt" then
|
|
35
|
+
return math.floor(n * 20 + 0.5)
|
|
36
|
+
end
|
|
37
|
+
return fallback
|
|
38
|
+
end
|
|
17
39
|
|
|
18
40
|
local function is_unnumbered(el)
|
|
19
41
|
for _, cls in ipairs(el.attr.classes or {}) do
|
|
@@ -180,6 +202,20 @@ local function Meta(meta)
|
|
|
180
202
|
if fmt ~= "" then
|
|
181
203
|
chapter_num_fmt = fmt
|
|
182
204
|
end
|
|
205
|
+
if meta["heading_sub_dot"] ~= nil then
|
|
206
|
+
sub_dot = meta_bool(meta, "heading_sub_dot")
|
|
207
|
+
end
|
|
208
|
+
if meta["heading_subsub_dot"] ~= nil then
|
|
209
|
+
subsub_dot = meta_bool(meta, "heading_subsub_dot")
|
|
210
|
+
end
|
|
211
|
+
local m_preset = meta_str(meta, "margin_preset")
|
|
212
|
+
if m_preset == "skripsi-4433" or m_preset == "4-4-3-3" then
|
|
213
|
+
doc_margins = { top = 2268, right = 1701, bottom = 1701, left = 2268 }
|
|
214
|
+
end
|
|
215
|
+
doc_margins.top = dim_to_twips(meta_str(meta, "margin_top"), doc_margins.top)
|
|
216
|
+
doc_margins.bottom = dim_to_twips(meta_str(meta, "margin_bottom"), doc_margins.bottom)
|
|
217
|
+
doc_margins.left = dim_to_twips(meta_str(meta, "margin_left"), doc_margins.left)
|
|
218
|
+
doc_margins.right = dim_to_twips(meta_str(meta, "margin_right"), doc_margins.right)
|
|
183
219
|
end
|
|
184
220
|
|
|
185
221
|
function Header(el)
|
|
@@ -228,20 +264,22 @@ function Header(el)
|
|
|
228
264
|
elseif el.level == 2 then
|
|
229
265
|
sub = sub + 1
|
|
230
266
|
subsub = 0
|
|
267
|
+
local sep2 = sub_dot and ". " or " "
|
|
231
268
|
toc_entries[#toc_entries + 1] = {
|
|
232
269
|
level = 2,
|
|
233
270
|
id = el.identifier,
|
|
234
|
-
text = bab .. "." .. sub ..
|
|
271
|
+
text = bab .. "." .. sub .. sep2 .. title,
|
|
235
272
|
}
|
|
236
|
-
el.content = pandoc.Str(bab .. "." .. sub ..
|
|
273
|
+
el.content = pandoc.Str(bab .. "." .. sub .. sep2 .. title)
|
|
237
274
|
elseif el.level == 3 then
|
|
238
275
|
subsub = subsub + 1
|
|
276
|
+
local sep3 = subsub_dot and ". " or " "
|
|
239
277
|
toc_entries[#toc_entries + 1] = {
|
|
240
278
|
level = 3,
|
|
241
279
|
id = el.identifier,
|
|
242
|
-
text = bab .. "." .. sub .. "." .. subsub ..
|
|
280
|
+
text = bab .. "." .. sub .. "." .. subsub .. sep3 .. title,
|
|
243
281
|
}
|
|
244
|
-
el.content = pandoc.Str(bab .. "." .. sub .. "." .. subsub ..
|
|
282
|
+
el.content = pandoc.Str(bab .. "." .. sub .. "." .. subsub .. sep3 .. title)
|
|
245
283
|
end
|
|
246
284
|
return el
|
|
247
285
|
end
|
|
@@ -434,9 +472,109 @@ function Pandoc(doc)
|
|
|
434
472
|
-- Section break (Next Page) penutup cover: tanpa footer/nomor halaman
|
|
435
473
|
blocks[#blocks + 1] = pandoc.RawBlock(
|
|
436
474
|
"openxml",
|
|
437
|
-
|
|
475
|
+
string.format(
|
|
476
|
+
'<w:p><w:pPr><w:sectPr><w:footnotePr><w:numRestart w:val="eachSect"/></w:footnotePr><w:pgSz w:w="11906" w:h="16838"/><w:pgMar w:top="%d" w:right="%d" w:bottom="%d" w:left="%d" w:header="720" w:footer="720" w:gutter="0"/></w:sectPr></w:pPr></w:p>',
|
|
477
|
+
doc_margins.top, doc_margins.right, doc_margins.bottom, doc_margins.left
|
|
478
|
+
)
|
|
438
479
|
)
|
|
439
480
|
|
|
481
|
+
-- Optional Lembar Pengesahan (approval)
|
|
482
|
+
if meta["approval"] ~= nil and type(meta["approval"]) == "table" then
|
|
483
|
+
local app = meta["approval"]
|
|
484
|
+
local app_city = meta_str(app, "city")
|
|
485
|
+
local app_date = meta_str(app, "date")
|
|
486
|
+
if app_date == "" then app_date = meta_str(meta, "date") end
|
|
487
|
+
blocks[#blocks + 1] = pandoc.Header(1, { pandoc.Str("LEMBAR PENGESAHAN") }, pandoc.Attr("lembar-pengesahan", { "unnumbered" }, {}))
|
|
488
|
+
if title ~= "" then
|
|
489
|
+
blocks[#blocks + 1] = para({ pandoc.Strong(pandoc.Str(string.upper(title))) }, "CoverLine")
|
|
490
|
+
end
|
|
491
|
+
local date_line = (app_city ~= "" and (app_city .. ", ") or "") .. app_date
|
|
492
|
+
if date_line ~= "" then
|
|
493
|
+
blocks[#blocks + 1] = para({ pandoc.Str("Telah diperiksa dan disetujui pada: " .. date_line) }, "CoverLine")
|
|
494
|
+
end
|
|
495
|
+
if app["supervisors"] ~= nil and type(app["supervisors"]) == "table" then
|
|
496
|
+
for _, sup in ipairs(app["supervisors"]) do
|
|
497
|
+
local s_role = pandoc.utils.stringify(sup["role"] or "Pembimbing")
|
|
498
|
+
local s_name = pandoc.utils.stringify(sup["name"] or "")
|
|
499
|
+
local s_nip = pandoc.utils.stringify(sup["nip"] or "")
|
|
500
|
+
blocks[#blocks + 1] = spacer(360)
|
|
501
|
+
blocks[#blocks + 1] = para({ pandoc.Str(s_role) }, "CoverLine")
|
|
502
|
+
blocks[#blocks + 1] = spacer(480)
|
|
503
|
+
blocks[#blocks + 1] = para({ pandoc.Strong(pandoc.Str(s_name)) }, "CoverName")
|
|
504
|
+
if s_nip ~= "" then
|
|
505
|
+
blocks[#blocks + 1] = para({ pandoc.Str("NIP. " .. s_nip) }, "CoverLine")
|
|
506
|
+
end
|
|
507
|
+
end
|
|
508
|
+
end
|
|
509
|
+
if app["dean"] ~= nil and type(app["dean"]) == "table" then
|
|
510
|
+
local d_role = pandoc.utils.stringify(app["dean"]["role"] or "Dekan")
|
|
511
|
+
local d_name = pandoc.utils.stringify(app["dean"]["name"] or "")
|
|
512
|
+
local d_nip = pandoc.utils.stringify(app["dean"]["nip"] or "")
|
|
513
|
+
blocks[#blocks + 1] = spacer(360)
|
|
514
|
+
blocks[#blocks + 1] = para({ pandoc.Str("Mengetahui, " .. d_role) }, "CoverLine")
|
|
515
|
+
blocks[#blocks + 1] = spacer(480)
|
|
516
|
+
blocks[#blocks + 1] = para({ pandoc.Strong(pandoc.Str(d_name)) }, "CoverName")
|
|
517
|
+
if d_nip ~= "" then
|
|
518
|
+
blocks[#blocks + 1] = para({ pandoc.Str("NIP. " .. d_nip) }, "CoverLine")
|
|
519
|
+
end
|
|
520
|
+
end
|
|
521
|
+
blocks[#blocks + 1] = pagebreak()
|
|
522
|
+
end
|
|
523
|
+
|
|
524
|
+
-- Optional Abstrak Bahasa Indonesia (abstract_id)
|
|
525
|
+
local abs_id = meta_str(meta, "abstract_id")
|
|
526
|
+
if abs_id ~= "" then
|
|
527
|
+
blocks[#blocks + 1] = pandoc.Header(1, { pandoc.Str("ABSTRAK") }, pandoc.Attr("abstrak", { "unnumbered" }, {}))
|
|
528
|
+
if title ~= "" then
|
|
529
|
+
blocks[#blocks + 1] = para({ pandoc.Strong(pandoc.Str(string.upper(title))) }, "CoverLine")
|
|
530
|
+
end
|
|
531
|
+
blocks[#blocks + 1] = pandoc.Para({ pandoc.Str(abs_id) })
|
|
532
|
+
if meta["keywords_id"] ~= nil then
|
|
533
|
+
local kw_list = {}
|
|
534
|
+
if type(meta["keywords_id"]) == "table" and meta["keywords_id"][1] ~= nil then
|
|
535
|
+
for _, k in ipairs(meta["keywords_id"]) do
|
|
536
|
+
kw_list[#kw_list + 1] = pandoc.utils.stringify(k)
|
|
537
|
+
end
|
|
538
|
+
else
|
|
539
|
+
kw_list[#kw_list + 1] = meta_str(meta, "keywords_id")
|
|
540
|
+
end
|
|
541
|
+
if #kw_list > 0 then
|
|
542
|
+
blocks[#blocks + 1] = pandoc.Para({
|
|
543
|
+
pandoc.Strong(pandoc.Str("Kata Kunci: ")),
|
|
544
|
+
pandoc.Emph(pandoc.Str(table.concat(kw_list, ", ")))
|
|
545
|
+
})
|
|
546
|
+
end
|
|
547
|
+
end
|
|
548
|
+
blocks[#blocks + 1] = pagebreak()
|
|
549
|
+
end
|
|
550
|
+
|
|
551
|
+
-- Optional Abstract English (abstract_en)
|
|
552
|
+
local abs_en = meta_str(meta, "abstract_en")
|
|
553
|
+
if abs_en ~= "" then
|
|
554
|
+
blocks[#blocks + 1] = pandoc.Header(1, { pandoc.Str("ABSTRACT") }, pandoc.Attr("abstract", { "unnumbered" }, {}))
|
|
555
|
+
if title ~= "" then
|
|
556
|
+
blocks[#blocks + 1] = para({ pandoc.Strong(pandoc.Emph(pandoc.Str(string.upper(title)))) }, "CoverLine")
|
|
557
|
+
end
|
|
558
|
+
blocks[#blocks + 1] = pandoc.Para({ pandoc.Emph(pandoc.Str(abs_en)) })
|
|
559
|
+
if meta["keywords_en"] ~= nil then
|
|
560
|
+
local kw_en = {}
|
|
561
|
+
if type(meta["keywords_en"]) == "table" and meta["keywords_en"][1] ~= nil then
|
|
562
|
+
for _, k in ipairs(meta["keywords_en"]) do
|
|
563
|
+
kw_en[#kw_en + 1] = pandoc.utils.stringify(k)
|
|
564
|
+
end
|
|
565
|
+
else
|
|
566
|
+
kw_en[#kw_en + 1] = meta_str(meta, "keywords_en")
|
|
567
|
+
end
|
|
568
|
+
if #kw_en > 0 then
|
|
569
|
+
blocks[#blocks + 1] = pandoc.Para({
|
|
570
|
+
pandoc.Strong(pandoc.Str("Keywords: ")),
|
|
571
|
+
pandoc.Emph(pandoc.Str(table.concat(kw_en, ", ")))
|
|
572
|
+
})
|
|
573
|
+
end
|
|
574
|
+
end
|
|
575
|
+
blocks[#blocks + 1] = pagebreak()
|
|
576
|
+
end
|
|
577
|
+
|
|
440
578
|
meta.title = nil
|
|
441
579
|
meta.subtitle = nil
|
|
442
580
|
meta.date = nil
|
|
@@ -27,7 +27,7 @@ export PYTHONUTF8=1
|
|
|
27
27
|
show_banner() {
|
|
28
28
|
echo -e "${CYAN}${BOLD}"
|
|
29
29
|
echo " ========================================================"
|
|
30
|
-
echo " LAPORAN GENERATOR CLI
|
|
30
|
+
echo " LAPORAN GENERATOR CLI v3.0.0 "
|
|
31
31
|
echo " Otomatisasi Dokumen Akademik (Typst + DOCX Engine) "
|
|
32
32
|
echo " ========================================================"
|
|
33
33
|
echo -e "${NC}"
|
|
@@ -43,6 +43,7 @@ show_help() {
|
|
|
43
43
|
echo -e " ${GREEN}pdf${NC} Kompilasi dokumen PDF (via Typst)"
|
|
44
44
|
echo -e " ${GREEN}docx${NC} Kompilasi dokumen Microsoft Word (.docx)"
|
|
45
45
|
echo -e " ${GREEN}init${NC} Wizard interaktif untuk konfigurasi awal metadata"
|
|
46
|
+
echo -e " ${GREEN}import${NC} Konversi berkas eksternal (DOCX, PDF, PPTX, XLSX) ke Markdown"
|
|
46
47
|
echo -e " ${GREEN}preset${NC} Kelola preset format kampus (list/show/apply/diff/validate)"
|
|
47
48
|
echo -e " ${GREEN}stats${NC} Analisis statistik kata, halaman, gambar, dan durasi baca"
|
|
48
49
|
echo -e " ${GREEN}doctor${NC} Audit kesehatan proyek (broken images, sitasi hilang, dll.)"
|
|
@@ -116,13 +117,17 @@ cmd_check() {
|
|
|
116
117
|
fi
|
|
117
118
|
}
|
|
118
119
|
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
check_file "
|
|
120
|
+
local tpl_prefix=""
|
|
121
|
+
if [ ! -f "metadata.yml" ] && [ -f "templates/default/metadata.yml" ]; then
|
|
122
|
+
tpl_prefix="templates/default/"
|
|
123
|
+
fi
|
|
124
|
+
check_file "${tpl_prefix}metadata.yml" "Metadata laporan"
|
|
125
|
+
check_file "${tpl_prefix}cover.md" "Kata pengantar & outline"
|
|
126
|
+
check_file "${tpl_prefix}template.typ" "Template Typst"
|
|
127
|
+
check_file "${tpl_prefix}reference.docx" "Template Word"
|
|
128
|
+
check_file "${tpl_prefix}references.bib" "Daftar pustaka"
|
|
124
129
|
check_dir "presets" "Direktori preset kampus"
|
|
125
|
-
check_dir "chapters" "Direktori bab laporan"
|
|
130
|
+
check_dir "${tpl_prefix}chapters" "Direktori bab laporan"
|
|
126
131
|
|
|
127
132
|
echo ""
|
|
128
133
|
if [ "$all_ok" = true ]; then
|
|
@@ -248,20 +253,24 @@ cmd_preset() {
|
|
|
248
253
|
echo -e "${RED}Preset '${target}' tidak ditemukan di presets/${NC}"
|
|
249
254
|
exit 1
|
|
250
255
|
fi
|
|
251
|
-
|
|
256
|
+
local meta_target="metadata.yml"
|
|
257
|
+
if [ ! -f "$meta_target" ] && [ -f "templates/default/metadata.yml" ]; then
|
|
258
|
+
meta_target="templates/default/metadata.yml"
|
|
259
|
+
fi
|
|
260
|
+
if [ ! -f "$meta_target" ]; then
|
|
252
261
|
echo -e "${RED}metadata.yml tidak ditemukan. Jalankan './laporan init' terlebih dahulu.${NC}"
|
|
253
262
|
exit 1
|
|
254
263
|
fi
|
|
255
|
-
if grep -qE '^\s*preset:'
|
|
256
|
-
sed -i.bak -E "s/^\s*preset:.*/preset: \"$target\"/"
|
|
257
|
-
elif grep -qE '^\s*margin_preset:'
|
|
258
|
-
sed -i.bak -E "s/^\s*margin_preset:.*/preset: \"$target\"/"
|
|
259
|
-
elif grep -q '^\.\.\.'
|
|
260
|
-
sed -i.bak -E "s/^\.\.\./preset: \"$target\"\n.../"
|
|
264
|
+
if grep -qE '^\s*preset:' "$meta_target"; then
|
|
265
|
+
sed -i.bak -E "s/^\s*preset:.*/preset: \"$target\"/" "$meta_target" && rm -f "${meta_target}.bak"
|
|
266
|
+
elif grep -qE '^\s*margin_preset:' "$meta_target"; then
|
|
267
|
+
sed -i.bak -E "s/^\s*margin_preset:.*/preset: \"$target\"/" "$meta_target" && rm -f "${meta_target}.bak"
|
|
268
|
+
elif grep -q '^\.\.\.' "$meta_target"; then
|
|
269
|
+
sed -i.bak -E "s/^\.\.\./preset: \"$target\"\n.../" "$meta_target" && rm -f "${meta_target}.bak"
|
|
261
270
|
else
|
|
262
|
-
echo "preset: \"$target\"" >>
|
|
271
|
+
echo "preset: \"$target\"" >> "$meta_target"
|
|
263
272
|
fi
|
|
264
|
-
echo -e "${GREEN}${BOLD}[OK] Preset '${target}' berhasil diterapkan ke
|
|
273
|
+
echo -e "${GREEN}${BOLD}[OK] Preset '${target}' berhasil diterapkan ke ${meta_target}!${NC}"
|
|
265
274
|
;;
|
|
266
275
|
*)
|
|
267
276
|
echo -e "${RED}Sub-perintah preset tidak dikenal: $subcmd${NC}"
|
|
@@ -345,7 +354,7 @@ cmd_build() {
|
|
|
345
354
|
./build.sh
|
|
346
355
|
echo ""
|
|
347
356
|
echo -e "${BLUE}${BOLD}2. Membangun Dokumen Microsoft Word (DOCX Multi-Pass)...${NC}"
|
|
348
|
-
|
|
357
|
+
./build-docx.sh
|
|
349
358
|
echo ""
|
|
350
359
|
echo -e "${GREEN}${BOLD}Dokumen PDF dan DOCX berhasil dibuat!${NC}"
|
|
351
360
|
echo -e " - ${CYAN}Laporan.pdf${NC}"
|
|
@@ -395,6 +404,10 @@ cmd_bundle() {
|
|
|
395
404
|
python3 scripts/bundle.py
|
|
396
405
|
}
|
|
397
406
|
|
|
407
|
+
cmd_import() {
|
|
408
|
+
python3 scripts/ingest.py "$@"
|
|
409
|
+
}
|
|
410
|
+
|
|
398
411
|
# Main routing
|
|
399
412
|
case "${1:-help}" in
|
|
400
413
|
build)
|
|
@@ -409,6 +422,10 @@ case "${1:-help}" in
|
|
|
409
422
|
init)
|
|
410
423
|
cmd_init
|
|
411
424
|
;;
|
|
425
|
+
import|ingest)
|
|
426
|
+
shift
|
|
427
|
+
cmd_import "$@"
|
|
428
|
+
;;
|
|
412
429
|
preset)
|
|
413
430
|
shift
|
|
414
431
|
cmd_preset "$@"
|