nokyc sample with tmuxinator

This commit is contained in:
openoms
2022-07-21 14:44:00 +01:00
parent e82fc8db06
commit 3432039f53

51
nokyc/README.md Normal file
View File

@@ -0,0 +1,51 @@
# Run the nokyc scripts in every 10 minutes in a tmux window
Using:
* https://github.com/j4imefoo/nokyc
* https://github.com/tmuxinator/tmuxinator
## Install
```
sudo apt-get install tmux git rubygems -y
cd
git clone https://github.com/j4imefoo/nokyc
cd nokyc
pip install -r requirements.txt
# install https://github.com/tmuxinator/tmuxinator
sudo gem install tmuxinator
sudo wget https://raw.githubusercontent.com/tmuxinator/tmuxinator/master/completion/tmuxinator.bash -O /etc/bash_completion.d/tmuxinator.bash
echo "export EDITOR=$(which nano)" >> ~/.bashrc
# tmuxinator config
echo "\
name: nokyc
root: ~/
windows:
- nokyc:
layout: even-vertical
panes:
- buyeur:
- cd ~/_storage/dev/nokyc/
- while ./nokyc.py -f eur -t buy -d 5; do sleep 600; done
- buygbp:
- cd ~/nokyc
- while ./nokyc.py -f gbp -t buy -d 5; do sleep 600; done
- sellgbp:
- cd ~/nokyc/
- while ./nokyc.py -f gbp -t sell -d 5; do sleep 600; done
" | tee ~/.config/tmuxinator/nokyc.yml
```
## Start
```
bash
mux s nokyc
```
## Exit window
```
CTRL+B -> & , y
```