post with picture up

This commit is contained in:
Tykayn 2022-12-14 17:39:01 +01:00 committed by tykayn
parent af4ddd3c54
commit 93caf1ae48
2 changed files with 5 additions and 4 deletions

View File

@ -18,6 +18,7 @@ function postLink() {
let postObject = {};
let idOfPost = 1930;
idOfPost = null;
if (idOfPost) {
postObject = tkpostsjson.filter(elem => elem.ID === idOfPost)[0]
console.log(postObject)

View File

@ -20,8 +20,6 @@ const selectionOverrideOfSectionTable = '';
const selectionOverrideOfLineTable = '';
let foundExistingWikiPageInFrench = false;
let reallySendPost = true;
// reallySendPost = false;
function getRandomWikiOSMPage() {
@ -158,6 +156,9 @@ export default function getElementCartographique() {
const descriptionStrophe = '';
const filteredHtml = $('.mw-parser-output', html).find('p')
const pictureDescriptionOfTagSrc = $('.d_image img', html).attributes['src']
console.log(pictureDescriptionOfTagSrc)
console.log("filteredHtml", filteredHtml.length)
configPost.long_desc = $(filteredHtml).text().substring(0,250)
console.log("filteredHtml", configPost.long_desc)
@ -285,10 +286,9 @@ function sendMessageWikiTagOfTheDay(message) {
let configPost = {
author: 'curator',
// document.querySelector('.d_image img').attributes['src']
image: 'osm_post_' + randomIntFromInterval(1 , 5) + '.jpg',
message,
// reallySendPost: true,
reallySendPost: reallySendPost,
}
sendPostMastodon(configPost)
}