Skip to content

Git-Harshit/Random_Text_Generator-Brython

Repository files navigation

Random Text Generator using Brython

GitHub issues GitHub repo size GitHub code size in bytes GitHub license Website GitHub Hacktoberfest combined status

This program generates a random (usually non-readable, meaningless) text for n number of paragraphs where n is taken as the user's input. It is capped to generate 1-100 random paragraphs, to keep the performance significant.

🚀 Check out the live tool here.

Table of Contents

About

This program executes Browser Python (Brython). Wait, what? What is meant by “Browser Python”?
It means that the Random Text is generated with a simple Python script (also using random module to ensure fresh, distinguished and unidentical result on every load), and the generated content is loaded on webpage using Brython.

Usage

Requirement - Python 3x should be installed, for running localhost

The code can be run through localhost. Assuming that Python (Python v3, specifically) is already configured on your system, one simple way to setup a localhost would be by using the Command Line/Command Prompt in the same directory, and entering:

python -m http.server [port]

where using a custom port number is optional, as port number defaults to 8000 with http.server. More about it can be found here.

▶ For Python 2 supported terminals, SimpleHTTPServer can be used instead.

Note: To launch the code in local machine, index.html file cannot be directly opened, as the brython file may not get executed successfully while opening the index file from the repository source folder (with "IOError: can't load external script ... (AJAX calls not supported with protocol file:///" ). So, localhost server setup is preferred.

Technology Stack

The following tools and technology are currently in use here.

  1. Brython
  2. Python
  3. HTML
  4. CSS

Contributing

Your contributions are always welcome! 😀
Please take a look at our contributing guidelines if you're interested in helping towards making the repository better!

Thanks to GitHub CodeSpaces, you can start editing the source files here in Visual Studio Code in the browser under github.dev domain, by simply pressing '.' (dot) key in your keyboard.

Every change counts! 🔄