Skip to content

Commit d341bfb

Browse files
novo UI
1 parent c067de7 commit d341bfb

13 files changed

Lines changed: 1082 additions & 74 deletions

assets/models.json

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -124,12 +124,8 @@
124124
"gabc": "(f) (gr gr gr) (hr1) (gr) (g) (,)"
125125
}
126126
],
127-
"find": [
128-
"Por isso,"
129-
],
130-
"replace": [
131-
"Por(f) is(ef)so,(f) (,) "
132-
]
127+
"find": [],
128+
"replace": []
133129
},
134130
{
135131
"name": "Prefácio tom simples",

augustinus.ts

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -108,13 +108,6 @@ function applyModel(lyrics: string, gabcModel: string): string {
108108

109109
return gabcOutput;
110110
}
111-
function convertExsurge(input: string): string {
112-
let result: string = input;
113-
result = result.replaceAll("<c><sp>V/</sp>.</c>", "<c><sp>V/</sp></c>");
114-
result = result.replaceAll("<c><sp>R/</sp>.</c>", "<c><sp>V/</sp></c>");
115-
result = result.replaceAll("<nlba>", "");
116-
return result;
117-
}
118111
export interface Pattern {
119112
symbol: string;
120113
gabc: string;
@@ -136,7 +129,6 @@ export interface Model {
136129
export interface Parameters {
137130
addOptionalStart?: boolean;
138131
addOptionalEnd?: boolean;
139-
exsurge?: boolean;
140132
removeNumbers?: boolean;
141133
removeParenthesis?: boolean;
142134
separator: string;
@@ -169,7 +161,6 @@ export default function generateGabc(input: string, modelObject: Model, paramete
169161
if (parametersObject.removeParenthesis) {
170162
input = input.replace(/\(.*\)/g, "");
171163
}
172-
// exceção 'Por isso,'
173164
let regex_endings: string = "([\\" + parametersObject.separator;
174165
for (let i = 0; i < modelObject.patterns.length; i++) {
175166
const symbol: string = modelObject.patterns[i].symbol;
@@ -184,6 +175,11 @@ export default function generateGabc(input: string, modelObject: Model, paramete
184175
let gabcLines: string[] = [];
185176

186177
for (const chunk of chunks) {
178+
if(modelObject.type === "prefacio" && modelObject.tom === "solene" && chunk == "Por isso,")
179+
{
180+
gabcLines.push("Por(f) is(ef)so,(f) (,) ");
181+
continue
182+
}
187183
let findIndex = model.find.indexOf(chunk + parametersObject.separator)
188184
if (findIndex !== -1) {
189185
const replacement = model.replace[findIndex];
@@ -217,10 +213,6 @@ export default function generateGabc(input: string, modelObject: Model, paramete
217213
}
218214
resultGabc = gabcLines.join("\n");
219215
}
220-
221-
if (parametersObject.exsurge) {
222-
resultGabc = convertExsurge(resultGabc);
223-
}
224216
resultGabc = resultGabc.replaceAll(/'\(.\)/gm, "(,)");
225217
return resultGabc;
226218
}

cli.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ import models from './assets/models.json' with { type: 'json' };
1616
model: { type: 'string', demandOption: true, alias: 'm', description: 'Name of the model to use' },
1717
addOptionalStart: { type: 'boolean', default: false, alias: 'a', description: 'Add optional start' },
1818
addOptionalEnd: { type: 'boolean', default: false, description: 'Add optional end' },
19-
exsurge: { type: 'boolean', default: false, description: 'Apply exsurge conversion' },
2019
removeNumbers: { type: 'boolean', default: false, description: 'Remove numbers from input' },
2120
removeParenthesis: { type: 'boolean', default: true, description: 'Remove parenthesis and their content from input' },
2221
separator: { type: 'string', default: '\n', description: 'Separator for chunks of text' },
@@ -52,7 +51,6 @@ import models from './assets/models.json' with { type: 'json' };
5251
const parameters: Parameters = {
5352
addOptionalStart: argv.addOptionalStart,
5453
addOptionalEnd: argv.addOptionalEnd,
55-
exsurge: argv.exsurge,
5654
removeNumbers: argv.removeNumbers,
5755
removeParenthesis: argv.removeParenthesis,
5856
separator: argv.separator,
395 KB
Loading

frontend/exsurge.min.js

Lines changed: 0 additions & 8 deletions
This file was deleted.

frontend/exsurge.min.js.map

Lines changed: 0 additions & 1 deletion
This file was deleted.

frontend/image.png

10.5 KB
Loading

frontend/index.html

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@
66
<link rel="icon" href="/favicon.ico" type="image/x-icon">
77
<title>Augustinus</title>
88
<link rel="stylesheet" href="/src/style.css" />
9-
<script src="/exsurge.min.js"></script>
109
</head>
1110
<body>
1211
<div id="app">
1312
<header>
13+
<img src="/Saint_Augustine_by_Philippe_de_Champaigne.webp" alt="Saint Augustine" class="logo" />
1414
<h1>Augustinus</h1>
1515
</header>
1616
<main>
@@ -34,10 +34,6 @@ <h1>Augustinus</h1>
3434
<input type="checkbox" id="addOptionalEnd" checked/>
3535
<label for="addOptionalEnd">Adicionar final</label>
3636
</div>
37-
<div class="option">
38-
<input type="checkbox" id="exsurge" checked />
39-
<label for="exsurge">Exsurge</label>
40-
</div>
4137
<div class="option">
4238
<input type="checkbox" id="removeNumbers" checked />
4339
<label for="removeNumbers">Remover números</label>
@@ -77,6 +73,11 @@ <h1>Augustinus</h1>
7773
<label for="input">Texto</label>
7874
<textarea id="input" rows="10" spellcheck="false"></textarea>
7975
<button id="generate">Gerar</button>
76+
<div class="export-buttons">
77+
<button id="export-svg">Exportar SVG</button>
78+
<!-- <button id="export-png">Exportar PNG</button>
79+
<button id="export-pdf">Exportar PDF</button> -->
80+
</div>
8081
<label for="gabc">GABC</label>
8182
<textarea id="gabc" rows="10" spellcheck="false"></textarea>
8283

0 commit comments

Comments
 (0)