pydocker-cli starter project.
@dennislwm |
pydocker-cli was a personal project to:
pydocker-cli/ <-- Root of your project
|- .gitignore <-- Git ignore file
|- CONTRIBUTING.md <-- Contributing guide
|- README.md <-- This README markdown file
+- .github/ <-- Root of GitHub templates, workflows, actions
+- workflows/ <-- Source files for GitHub workflows
+- biblia/ <-- Source files for bible data
+- etfdata/ <-- Source files for ETF and stock data
+- htmltopdf/ <-- Source files for Html link to PDF conversion
+- textscore/ <-- Source files for text readability score
+- udemyenrol/ <-- Source files for Udemy free course
|- .dockerignore <-- Docker ignore file
|- actions.yml <-- GitHub actions file
|- app.py <-- Tiny Python app
|- Dockerfile <-- Dockerfile for app
|- requirements.txt <-- Tiny Python app dependencies
|- udemyenrol.md <-- Daily Free Udemy Courses published by GitHub Actions
This is the minimum viable product (MVP) to test the above hypothesis.
Count the cost of complexity, i.e. incremental reward and risk reduction, before evolving MVP.
This tiny app prints etf and stock data.
$ python3 etfdata.py
Usage: etfdata.py [OPTIONS] COMMAND [ARGS]...
This script prints etf and stock data
Options:
-o, --out [csv|json|markdown|text]
Output type, default=text
-h, --help Show this message and exit.
Commands:
cal Economic calendar
etf ETF fundamentals
list List of symbols
news Latest market news
stock Stock fundamentals of SYMBOLS where SYMBOLS is one or more...
etfdata requires a config.json to run correctly. This file contains sensitive information, hence it is not checked into repo.
Create a new file config.json in the same folder as etfdata.py and copy and paste below.
{
"FINNHUB_API_KEY": "asdfasdfasdfasfasdfasdf",
"FINNHUB_API_KEY_SANDBOX": "sandbox_asdfasdfasdfsadfasfdsaf"
}
Go to Finnhub Stock API to create a free account. Then copy and paste both of the above api keys.
This tiny app does what its name suggests.
This tiny app is invoked by GitHub Actions daily.
The action file runs this Python app that updates this page at UTC 0:01 daily. You can bookmark this page to save thousands of dollars for Udemy courses every year (legally).
If you want to receive this page in your email, fork this repository. In your forked repository, add these to the GitHub secrets:
GMAIL: user@gmail.com
GMAIL_APP_PASSWORD: generatedpassword
The app uses GMAIL to send both from (sender) and to (recepient). Go to Gmail account to create GMAIL_APP_PASSWORD.
Warning: Do not use your Gmail password for the app password, which is a special password that is used to bypass two-factor authentication.
Udemyenrol requires a settings.yaml to run in your local development. This file contains sensitive information, hence it is not checked into repo.
Create a new file settings.yaml in the same folder as app.py and copy and paste below.
udemy:
email: "name@example.com"
password: "password123"
gmail: "name@gmail.com"
gmail_app_password: "generatedpassword"
This is an explanation of the above settings file.
This tiny app generates a readability score from a file.
$ python3 textscore.py --help
Usage: textscore.py [OPTIONS] TEXTFILE
This script scores the readability of a TEXTFILE
TEXTFILE may include wildcards, e.g. *.txt
Options:
-o, --out [csv|json|markdown|text]
Output type, default=text
-h, --help Show this message and exit.
This tiny app prints bible data from Biblia.
$ python3 biblia.py --help
Usage: biblia.py [OPTIONS] COMMAND [ARGS]...
This script prints bible data
Options:
-o, --out [csv|json|markdown|text]
Output type, default=text
-h, --help Show this message and exit.
Commands:
content Returns the content of a bible
search Searches the text of a bible
toc Returns the table of contents of a bible
votd Returns a carefully chosen verse each day
git
pipenv
Clone the repository to your local workstation with git clone
.
Change directory to the cloned repo and project, e.g. cd pydocker-cli/udemyenrol
.
Create a Python virtual environment with pipenv shell
.
Install the Python dependencies with pipenv install
.
Start coding!
GITHUB_WORKSPACE/ <-- Root of your repository
+- udemyenrol/ <-- Current folder for Dockerfile
|- Dockerfile <-- In Dockerfile, "COPY . ." copies from GITHUB_WORKSPACE instead of current folder
Please read the contributing guide on how you can actively participate in the development of this repository.
Please consider giving this repository a star on GitHub.