|
@@ -77,6 +77,23 @@ export default class Portal {
|
|
|
message += `\n${Emojis.LINK} ${article.link}`;
|
|
|
}
|
|
|
|
|
|
+ if (this._name.toUpperCase() == "Chile Cultura".toUpperCase()) {
|
|
|
+ // Icons Chilecultura
|
|
|
+ let regex = new RegExp(/\n(\d{1,2} \w{3})\s*\n?\s*-\s*(\d{1,2} \w{3})/);
|
|
|
+ message = message.replace("date_range", `${Emojis.CALENDAR} `);
|
|
|
+ message = message.replace(regex, (match, p1, p2) => {
|
|
|
+ return `${p1} - ${p2}`;
|
|
|
+ });
|
|
|
+
|
|
|
+ message = message.replace("location_on", Emojis.PIN).replace(`${Emojis.PIN}\n`, `${Emojis.PIN} `);
|
|
|
+
|
|
|
+ // Expresión regular para capturar el texto antes del 📆 seguido de una fecha
|
|
|
+ regex = new RegExp(/(.*?)📆 (\d{1,2} \w{3} - \d{1,2} \w{3})/);
|
|
|
+ message = message.replace(regex, (match, p1, p2) => {
|
|
|
+ return `🎭 ${p1}\n📆 ${p2}`;
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
const mediaIds: any[] = [];
|
|
|
if (article.image !== null && article.image !== undefined) {
|
|
|
const media = await this._mastodonClient.v2.media.create({ file: article.image, description: article.title });
|