Textcreator LIVE V13.1 Cloud Music OS — Deel 20 van 23
Dit deel gaat direct verder onder deel 19.
Toegevoegd:
Export Engine V13.1
TXT export
PDF export uitbreiding
songkaart export
deelbare content structuur
voorbereiding publicatie workflow
Plak dit onder deel 19.
<script>
/*
====================================================
TEXTCREATOR LIVE V13.1
PART 20
EXPORT ENGINE
====================================================
*/
const EXPORT_ENGINE={
version:"V13.1",
lastExport:null
};
/*
====================================================
BUILD SONG EXPORT DATA
====================================================
*/
function buildSongExport(song){
if(!song)
return "";
return `
TEXTCREATOR LIVE V13.1
🎵 TITEL
${song.title || ""}
👤 MAKER
${song.artist || song.name || ""}
🎼 GENRE
${song.genre || ""}
😊 MOOD
${song.mood || ""}
📌 STATUS
${song.status || ""}
🎧 SUNO
${song.suno || ""}
--------------------------------
${song.lyrics || ""}
--------------------------------
Created with:
Textcreator LIVE
@GoDoGood
`;
}
/*
====================================================
EXPORT TXT
====================================================
*/
function exportSongTXT(song){
const content=
buildSongExport(song);
const blob=
new Blob(
[content],
{
type:"text/plain;charset=utf-8"
}
);
const link=
document.createElement(
"a"
);
link.href=
URL.createObjectURL(
blob
);
link.download=
(song.title || "Textcreator-song")
+
".txt";
link.click();
EXPORT_ENGINE.lastExport=
new Date();
notify(
"TXT export gemaakt",
"success"
);
}
/*
====================================================
EXPORT PDF
====================================================
*/
function exportSongPDF(song){
if(!window.jspdf){
notify(
"PDF bibliotheek niet geladen",
"error"
);
return;
}
const {jsPDF}=window.jspdf;
const doc=
new jsPDF();
const text=
buildSongExport(song);
let y=15;
text.split("\n")
.forEach(line=>{
if(y>280){
doc.addPage();
y=15;
}
doc.text(
line.substring(0,90),
10,
y
);
y+=7;
});
doc.save(
(song.title || "Textcreator")
+
".pdf"
);
EXPORT_ENGINE.lastExport=
new Date();
notify(
"PDF export gemaakt",
"success"
);
}
/*
====================================================
CREATE SHARE CARD
====================================================
*/
function createShareCard(song){
if(!song)
return "";
return `
<div class="song-card">
<h2>
🎵 ${song.title}
</h2>
<p>
👤 ${song.artist || ""}
</p>
<p>
🎼 ${song.genre || ""}
</p>
<p>
😊 ${song.mood || ""}
</p>
<p>
📌 ${song.status || ""}
</p>
<button class="btn"
onclick="exportSongTXTById('${song.id}')">
💾 TXT
</button>
<button class="btn"
onclick="exportSongPDFById('${song.id}')">
</button>
</div>
`;
}
/*
====================================================
EXPORT BY ID
====================================================
*/
function exportSongTXTById(id){
const song=
getSong(id);
if(song){
exportSongTXT(song);
}
}
function exportSongPDFById(id){
const song=
getSong(id);
if(song){
exportSongPDF(song);
}
}
/*
====================================================
PUBLICATION PACKAGE
====================================================
*/
function createPublicationPackage(song){
return {
title:
song.title,
artist:
song.artist,
genre:
song.genre,
lyrics:
song.lyrics,
suno:
song.suno,
creator:
"Stijn Gabeler / @GoDoGood",
platform:
"Textcreator LIVE V13.1"
};
}
/*
====================================================
EXPORT JSON
====================================================
*/
function exportSongJSON(song){
const data=
JSON.stringify(
song,
null,
2
);
const blob=
new Blob(
[data],
{
type:"application/json"
}
);
const link=
document.createElement(
"a"
);
link.href=
URL.createObjectURL(
blob
);
link.download=
"song-"+Date.now()+".json";
link.click();
}
/*
====================================================
INIT EXPORT ENGINE
====================================================
*/
function initExportEngine(){
console.log(
"Export Engine actief",
EXPORT_ENGINE
);
}
window.addEventListener(
"DOMContentLoaded",
()=>{
initExportEngine();
});
console.log(
"Export Engine V13.1 loaded"
);
</script>
Einde deel 20/23.
Nog 3 delen te gaan:
21 van 23
Security & Validation Engine
foutcontrole
API bescherming
data validatie
22 van 23
Final Integration Engine
alle modules verbinden
volledige boot sequence
23 van 23
Release Finalizer
V13.1 productie afronding
eindcontrole systeemstatus.