bot icon indicating copy to clipboard operation
bot copied to clipboard

Next Config file

Open misterpeople opened this issue 2 years ago • 5 comments

Hey, I was wondering how can i load the next account after 1 is sleeping? I cant find anything related to it in the code

misterpeople avatar Aug 18 '22 11:08 misterpeople

remove the repeat in the config and try this:

main.py

import yaml
from subprocess import Popen
import logging

logger = logging.getLogger("configs-loader")
logging.basicConfig(level=logging.INFO,
                    format='[%(asctime)s] %(name)-12s ==> %(message)s',
                    datefmt='%m/%d %H:%M:%S',)

if __name__ == '__main__':
    bot_run = "gramaddict run --config".split(" ")
    with open('configs-list.yml', 'r') as stream:
        try:
            configs = yaml.safe_load(stream)
            for config in configs:
                bot_run.append(configs.get(config, {}).get("path", ""))
                with Popen(bot_run, text=True) as p:
                    logger.info(f"Starting `{config}` - {configs[config].get('path')}")
                logger.info("Finish!")
        except yaml.YAMLError as exc:
            logger.error(exc)
            exit(1)

configs-list.yml

your_config1_name_here:
 description: "your config1 description"
 path: "your_path_to_config1_here"
your_config2_name_here:
 description: "your config2 description"
 path: "your_path_to_config2_here"

pip install pyyaml if not installed

mastrolube avatar Aug 18 '22 14:08 mastrolube

Do i need to change main.py or only the configs-list.yml?

misterpeople avatar Aug 22 '22 08:08 misterpeople

You have to configure your config-lst.yml as hinted in my post

mastrolube avatar Aug 22 '22 08:08 mastrolube

this isnt very clear though.. Do i need to add this to my config.yml file instead of REPEAT ? Do i need to edit Main.py and add what u sent above? Do i need to make a configs-list.yml file? Please be more informative, Im new in this.

misterpeople avatar Aug 22 '22 11:08 misterpeople

?

misterpeople avatar Aug 24 '22 18:08 misterpeople

Did anyone get this to work? Thanks!

rjsop avatar Jan 13 '23 12:01 rjsop