<sup/> tags in birthday
This commit is contained in:
parent
e4c2aaf260
commit
71572a67c5
|
@ -17,7 +17,9 @@ async function chat() {
|
||||||
const animaldb = await collect()
|
const animaldb = await collect()
|
||||||
const possibleToots = animaldb.animals.map(record => {
|
const possibleToots = animaldb.animals.map(record => {
|
||||||
return record.quotes.map(quote => {
|
return record.quotes.map(quote => {
|
||||||
const birthday = record.birthday.replace(/\n/g, "")
|
const birthday = record.birthday
|
||||||
|
.replace(/<sup>(.*)<\/sup>/g, "$1")
|
||||||
|
.replace(/\n/g, "")
|
||||||
return {
|
return {
|
||||||
"toot": `${record.name}: "${quote}"\n\n${birthday} is my birthday.\nhttps://animalcrossing.fandom.com${record.href}`,
|
"toot": `${record.name}: "${quote}"\n\n${birthday} is my birthday.\nhttps://animalcrossing.fandom.com${record.href}`,
|
||||||
"attach": `data/ac/${md5(record.img)}.png`,
|
"attach": `data/ac/${md5(record.img)}.png`,
|
||||||
|
|
|
@ -73,7 +73,7 @@ async function collect() {
|
||||||
await fsp.writeFile('data/ac/animals.json', JSON.stringify({ animals }, null, 2))
|
await fsp.writeFile('data/ac/animals.json', JSON.stringify({ animals }, null, 2))
|
||||||
console.log(' AC buddy: Okay, animals.json written!')
|
console.log(' AC buddy: Okay, animals.json written!')
|
||||||
|
|
||||||
return animals
|
return { animals }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue