The only thing you need to automate when using miningpoolhub is your miner switching algos. Their auto-switches take care of selecting the most profitable algo, and the most profitable coin on that algo.
My rig is running Linux as well, so a lot of the fancy interfaces like the nicehash miner simply do not work on my rig. I've had to do this the hard way from the get go.
Here's the bash script I'm using to do the automation. I just updated it with equihash support because I figured out what was wrong with my settings on that. Mine is also capable of using different miner software seamlessly- each miner distro is given its own folder, and the script selects the miner with the best yield for that algo. Algos that are commented out still have issues with my configuration, feel free to test and repair them as you see fit.
while true
do
./ccminer_T/ccminer --max-temp=85 -r 0 -a scrypt -o stratum+tcp://hub.miningpoolhub.com:12001 -u OdinYggd.x -p x
./ccminer_T/ccminer --max-temp=85 -r 0 -a keccac -o stratum+tcp://hub.miningpoolhub.com:12003 -u OdinYggd.x -p x
./ccminer_T/ccminer --max-temp=85 -r 0 -a groestl -o stratum+tcp://hub.miningpoolhub.com:12004 -u OdinYggd.x -p x
./ccminer_T/ccminer --max-temp=85 -r 0 -a myr-gr -o stratum+tcp://hub.miningpoolhub.com:12005 -u OdinYggd.x -p x
./ccminer_T/ccminer --max-temp=85 -r 0 -a x11 -o stratum+tcp://hub.miningpoolhub.com:12007 -u OdinYggd.x -p x
./ccminer_T/ccminer --max-temp=85 -r 0 -a neoscrypt -o stratum+tcp://hub.miningpoolhub.com:12012 -u OdinYggd.x -p x
./ccminer_T/ccminer --max-temp=85 -r 0 -a qubit -o stratum+tcp://hub.miningpoolhub.com:12014 -u OdinYggd.x -p x
./ccminer_T/ccminer --max-temp=85 -r 0 -a skein -o stratum+tcp://hub.miningpoolhub.com:12016 -u OdinYggd.x -p x
./ccminer_T/ccminer --max-temp=85 -r 0 -a lyra2v2 -o stratum+tcp://hub.miningpoolhub.com:12018 -u OdinYggd.x -p x
#./ccminer_T/ccminer --max-temp=85 -r 0 -a ethash -o stratum+tcp://us-east.ethash-hub.miningpoolhub.com:12020 -u OdinYggd.x -p x
#./ccminer_T/ccminer --max-temp=85 -r 0 -a yescypt -o stratum+tcp://us-east.yescrypt-hub.miningpoolhub.com:12021 -u OdinYggd.x -p x
#./ccminer_K/ccminer -r 0 -a sia -o stratum+tcp://hub.miningpoolhub.com:12022 -u OdinYggd.x -p x
./ccminer_T/ccminer --max-temp=85 -r 0 -a equihash -o stratum+tcp://us-east.equihash-hub.miningpoolhub.com:12023 -u OdinYggd.x -p x
./ccminer_T/ccminer --max-temp=85 -r 0 -a cryptonight -o stratum+tcp://us-east.cryptonight-hub.miningpoolhub.com:12024 -u OdinYggd.x -p x
./ccminer_T/ccminer --max-temp=85 -r 0 -a lyra2z -o stratum+tcp://us-east.lyra2z-hub.miningpoolhub.com:12025 -u OdinYggd.x -p x
done
The same basic arrangement could be ported fairly easily to a Windows .bat script for those who are used to fancy GUI based miners. Oh and while I don't mind you using my username and password to mine, you probably should switch that to yours.
Once you have your miner running, you can then use MPH's auto exchange functions to trade the coins you don't want for the coins that you do want. All of the wallet handling and everything is done for you, you just need to provide a wallet address to send the coins that you want to keep to.