https://github.com/engageintellect/scripts_for_matt
https://github.com/engageintellect/scripts_for_matt
Last synced: about 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/engageintellect/scripts_for_matt
- Owner: engageintellect
- Created: 2020-12-14T05:15:03.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2020-12-15T13:49:31.000Z (over 5 years ago)
- Last Synced: 2025-02-06T13:49:08.087Z (over 1 year ago)
- Language: Python
- Size: 25.4 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.org
Awesome Lists containing this project
README
* PYTHON SCRIPTS
** DEPENDENCIES
**** linux dependencies
- git
- figlet
**** install with your linux pkg manager:
#+BEGIN_SRC bash
sudo apt install figlet -y
sudo apt install git -y
#+END_SRC
**** Python dependencies:
- Selenium
#+BEGIN_SRC bash
pip install selenium
#+END_SRC
- BeautifulSoup
#+BEGIN_SRC bash
pip install bs4
#+END_SRC
- Chromedriver
#+BEGIN_SRC bash
sudo pip install chromedriver
#+END_SRC
** DOWNLOAD CODE TO YOUR MACHINE
Open your Linux command line and navigate to home folder.. you are probably already there by default.
Make sure you have 'git' as well as the listed dependencies installed and copy and paste the following command
#+BEGIN_SRC bash
cd $HOME
git clone https://github.com/jc9361/scripts_for_matt.git
#+END_SRC
Change directory into downloaded repo.
#+BEGIN_SRC bash
cd scripts_for_matt && ls -l
#+END_SRC
** repo_maker
This script uses Python and Selenium to open your browser (Chrome) and
automates the process of logging in, clicking create repo, naming the repo,
and linking it to a local folder on your system. This process is a pain in the ass to do manually,
I use this script every single time I make a new GitHub repo so I don't have to leave the terminal.
*** Run script..
#+BEGIN_SRC bash
python3 $HOME/scripts_for_matt/repo_maker/main.py
#+END_SRC
** get_latest_arch
This script uses python and selenium to open yor Chrome and navigate to "https://archlinux.org".
From there it will download the latest ISO torrent, open the torrent in your bittorrent client,
"transmission-cli". When the torrent is finished downloading the script will ask you if you would
like to burn it to a disk and for you to provide the location of that disk, eg; "/dev/sdd". So now,
anytime I need to re-install my os, I run one command to grab the latest version and burn it to a flash dive
so that it is ready to install. :)
*** Run script..
#+BEGIN_SRC bash
python3 $HOME/scripts_for_matt/get_latest_arch/main.py
#+END_SRC
** covid
This script uses pythong and BeautifulSoup to parse "https://worldometers.info" and display
current covid stats for the US and WORLD in a clean and easy to read format... right inside the terminal.
This isnt the cleaning script... but its been working solidly for the last 6 months even though the data tables
that is is parsing tend to change several times a day. (not just the data in them but the actual tables themselves).
For now there is if statements covering all of the scenarios but I would like to clean this up in the future... But hey,
at leaset it works...
*** Run script..
#+BEGIN_SRC bash
python3 $HOME/scripts_for_matt/covid/main.py
#+END_SRC
* BASH SCRIPTS
These scripts are super simple... I left comments in them to explain exactly what they are doing...
** DEPENDENCIES
- awk
- sed
Check to if you have these installed... you probably do.
#+BEGIN_SRC bash
which awk sed
#+END_SRC
if nothing was returned on the last command you need to install them, use your package manager
#+BEGIN_SRC bash
sudo apt install awk sed -y
#+END_SRC
Give scripts permission to run...
#+BEGIN_SRC bash
chmod +x $HOME/scripts_for_matt/bash_scripts/awk.sh
chmod +x $HOME/scripts_for_matt/bash_scripts/sed.sh
#+END_SRC
*** Run scripts..
#+begin_src bash
$HOME/scripts_for_matt/bash_scripts/awk.sh
$HOME/scripts_for_matt/bash_scripts/sed.sh
#+end_src
or..
#+begin_src bash
cd $HOME/scripts_for_matt/bash_scripts
./awk.sh
./sed.sh
#+end_src