post with picture up
This commit is contained in:
parent
af4ddd3c54
commit
93caf1ae48
@ -18,6 +18,7 @@ function postLink() {
|
|||||||
let postObject = {};
|
let postObject = {};
|
||||||
let idOfPost = 1930;
|
let idOfPost = 1930;
|
||||||
idOfPost = null;
|
idOfPost = null;
|
||||||
|
|
||||||
if (idOfPost) {
|
if (idOfPost) {
|
||||||
postObject = tkpostsjson.filter(elem => elem.ID === idOfPost)[0]
|
postObject = tkpostsjson.filter(elem => elem.ID === idOfPost)[0]
|
||||||
console.log(postObject)
|
console.log(postObject)
|
||||||
|
@ -20,8 +20,6 @@ const selectionOverrideOfSectionTable = '';
|
|||||||
const selectionOverrideOfLineTable = '';
|
const selectionOverrideOfLineTable = '';
|
||||||
|
|
||||||
let foundExistingWikiPageInFrench = false;
|
let foundExistingWikiPageInFrench = false;
|
||||||
let reallySendPost = true;
|
|
||||||
// reallySendPost = false;
|
|
||||||
|
|
||||||
function getRandomWikiOSMPage() {
|
function getRandomWikiOSMPage() {
|
||||||
|
|
||||||
@ -158,6 +156,9 @@ export default function getElementCartographique() {
|
|||||||
const descriptionStrophe = '';
|
const descriptionStrophe = '';
|
||||||
const filteredHtml = $('.mw-parser-output', html).find('p')
|
const filteredHtml = $('.mw-parser-output', html).find('p')
|
||||||
|
|
||||||
|
const pictureDescriptionOfTagSrc = $('.d_image img', html).attributes['src']
|
||||||
|
console.log(pictureDescriptionOfTagSrc)
|
||||||
|
|
||||||
console.log("filteredHtml", filteredHtml.length)
|
console.log("filteredHtml", filteredHtml.length)
|
||||||
configPost.long_desc = $(filteredHtml).text().substring(0,250)
|
configPost.long_desc = $(filteredHtml).text().substring(0,250)
|
||||||
console.log("filteredHtml", configPost.long_desc)
|
console.log("filteredHtml", configPost.long_desc)
|
||||||
@ -285,10 +286,9 @@ function sendMessageWikiTagOfTheDay(message) {
|
|||||||
|
|
||||||
let configPost = {
|
let configPost = {
|
||||||
author: 'curator',
|
author: 'curator',
|
||||||
|
// document.querySelector('.d_image img').attributes['src']
|
||||||
image: 'osm_post_' + randomIntFromInterval(1 , 5) + '.jpg',
|
image: 'osm_post_' + randomIntFromInterval(1 , 5) + '.jpg',
|
||||||
message,
|
message,
|
||||||
// reallySendPost: true,
|
|
||||||
reallySendPost: reallySendPost,
|
|
||||||
}
|
}
|
||||||
sendPostMastodon(configPost)
|
sendPostMastodon(configPost)
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user