Command line application for displaying random facts from wikipedia on the console. Available as a python package on PyPI:
pip install x-ae-a-12
Documentation available at: X-AE-A-12 docs
- Built With
- Features
- Code Example
- Prerequisites
- Installation
- Tests
- Deployment
- Contributions
- Bug / Feature Request
- Authors
- License
- Python 3.8 - The programming language used.
- Poetry - The dependency manager used.
- Nox - The automation tool used.
- Pytest - The testing framework used.
- Flake8 - The linting tool used.
- Sphinx - The documentation generator used.
- GitHub Actions - CI-CD tool used.
- Display random facts from Wikipedia.
- Select Wikipedia language edition to be used.
def main(language: str) -> None:
"""The X-AE-A-12 Python project."""
page = wikipedia.random_page(language=language)
click.secho(page.title, fg="green")
click.echo(textwrap.fill(page.extract))
What things you need to install the software and how to install them
- python 3.8
Linux:
sudo apt-get install python3.8
Windows:
Download from python.org
Mac OS:
brew install python3
- pip
Linux and Mac OS:
pip install -U pip
Windows:
python -m pip install -U pip
- poetry
curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | python
- nox
pip install --user --upgrade nox
Clone this repository:
git clone https://github.com/SpencerOfwiti/X-AE-A-12
To set up virtual environment and install dependencies:
poetry install
To run application (by default the English language edition is selected):
poetry run x-ae-a-12
To run Swahili language edition:
poetry run x-ae-a-12 -l sw
This system uses pytest to run automated tests.
To run automated tests:
nox -s tests
To deploy application on PyPI(Python Package Index):
poetry build
poetry publish
To contribute, follow these steps:
- Fork this repository.
- Create a branch:
git checkout -b <branch_name>
. - Make your changes and commit them:
git commit -m '<commit_message>'
- Push to the original branch:
git push origin <project_name>/<location>
- Create the pull request.
Alternatively see the GitHub documentation on creating a pull request.
If you find a bug (the website couldn't handle the query and / or gave undesired results), kindly open an issue here by including your search query and the expected result.
If you'd like to request a new function, feel free to do so by opening an issue here. Please include sample queries and their corresponding results.
- Spencer Ofwiti - Initial work
See also the list of contributors who participated in this project.
This project is licensed under the MIT License - see the LICENSE.md file for details