Python package to help with HTML development.
Project description
alienHtml
- A Python package to help with HTML development.
Features
- Creates a HTML file in a specified directory.
- Helps you edit it through functions and parameters.
- Allows you to open the HTML file in your browser with one simple function.
- You can edit an already existing file, or create a new one.
- Indentation!
Example:
from alienHTML import *
# "w" is the mode to open, in this case write.
mypage = WebPage("/path/to/file/to/create/or/edit", "w", tabhead="Hello World", bgcolour="powderblue",icon="path/to/icon.ico")
# If you put it as "a" it switches to edit mode
# For tabhead, bgcolour and icon, if not set it will automatically set itself to some defaults.
# This creates a heading of the largest size as the number is one.
# It will ask you where you want it in the <body> section of your code
mypage.Heading("Hello World",1)
# Similar for images, just with different parameters. The second is the alt text.
mypage.Image("/path/to/image.png", "Image!")
mypage.showfile() # Prints the contents of the file with line numbers and indentation.
mypage.openpage() # Opens the HTML file in web browser.
Outputs:
- Ask you where to put code for heading and image.
- Prints the file in shell.
- Opens the page in a web browser
To do:
- Add more web page features.
- Make the showfile function open the HTML file in web browser, so there is syntax highlighting.
Credits:
- Made by TomTheCodingGuy
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
alienHTML-0.0.4.tar.gz
(3.8 kB
view hashes)
Built Distribution
Close
Hashes for alienHTML-0.0.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f2e65a00e69538c8798ea8e5c555cd01d25600c1ed7031ed78ea9f688ff6ba6b |
|
MD5 | f859c238462ff9ab967b74d46fdc944a |
|
BLAKE2b-256 | ec20030d8d45714c212e797948627c52085fad8b4f7bb67f6d7f4ff0d12cd6a2 |