multi-account-post-schedule.../helpers/wip/curation_following_recommendation.mjs
2023-07-05 14:17:30 +02:00

41 lines
844 B
JavaScript

import fs from "fs";
import path from 'path';
import {getRandomElementOfArray, listFilesOfFolder} from '../libs/utils.mjs'
import Masto from "mastodon";
const __dirname = path.resolve();
// choisir un type de publication au hasard dans les dossiers "picture"
const reallySendPost = false;
// const reallySendPost = true;
let allFollows = {
}
function convertFollowersToArray(){
}
function selectXRandomElementsFromFollowers(count){
let elementsSelected = []
let followersList = convertFollowersToArray(allFollows)
for (let ii=0; ii < count; ii++){
elementsSelected.push(getRandomElementOfArray(followersList))
}
return []
}
function getUserInfo(userData){
return [userHandle, userReadableName, biography]
}
function postMessage(){
// get users
// build message
// send it
// success
}