random number in tkblog post
This commit is contained in:
parent
f0abcc5b97
commit
f28e1b9f34
@ -1,7 +1,7 @@
|
|||||||
|
|
||||||
import fs from "fs";
|
import fs from "fs";
|
||||||
import path from 'path';
|
import path from 'path';
|
||||||
import {sendPostMastodon} from './utils.mjs'
|
import {randomIntFromInterval, sendPostMastodon} from './utils.mjs'
|
||||||
|
|
||||||
const __dirname = path.resolve();
|
const __dirname = path.resolve();
|
||||||
const tkpostsjson = JSON.parse(fs.readFileSync(__dirname + "/assets/documents/tykayn_wptkblog_posts.json", 'utf-8'))
|
const tkpostsjson = JSON.parse(fs.readFileSync(__dirname + "/assets/documents/tykayn_wptkblog_posts.json", 'utf-8'))
|
||||||
@ -35,7 +35,7 @@ function postLink() {
|
|||||||
|
|
||||||
let configPost = {
|
let configPost = {
|
||||||
author: 'tykayn',
|
author: 'tykayn',
|
||||||
image: 'tk_blog_bannieres_oct2010-1.jpg',
|
image: 'tk_blog_bannieres_oct2010-'+randomIntFromInterval(1-10)+'.jpg',
|
||||||
message: `# [${postObject.post_title}](${postObject.guid})
|
message: `# [${postObject.post_title}](${postObject.guid})
|
||||||
|
|
||||||
* ${postObject.post_date} - ${postObject.guid}
|
* ${postObject.post_date} - ${postObject.guid}
|
||||||
|
Loading…
Reference in New Issue
Block a user