Skip to content

Commit

Permalink
minor changes.
Browse files Browse the repository at this point in the history
  • Loading branch information
MohammadrezaAmani committed Nov 10, 2024
1 parent 79593ea commit 1821848
Show file tree
Hide file tree
Showing 2 changed files with 105 additions and 103 deletions.
205 changes: 102 additions & 103 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# INUI

<a href='https://inui.readthedocs.io/en/latest/?badge=latest'>
<img src='https://readthedocs.org/projects/inui/badge/?version=latest' alt='Documentation Status' />
</a>


<p align="center">
<a>
<img src="https://raw.githubusercontent.com/MohammadrezaAmani/INUI/main/assets/images/inui.png" alt="UniLand" width="256">
Expand All @@ -30,26 +30,26 @@

<br>

# Py INUI
## Py INUI

**INUI** is a powerful and highly customizable Python language library for **UI**, which supports all the components and elements of the html markup language in [Python](https://python.org/), as well as the ability to use libraries such as [Bootstrap](https://getbootstrap.com/), etc. And it brings a new experience of easier work with frontend in Python.

## Contents
### Contents

<!-- vscode-markdown-toc -->

- [INUI](#inui)
- [Py INUI](#py-inui)
- [Contents](#contents)
- [Requirements](#requirements)
- [**Python Compatibility**](#python-compatibility)
- [**Dependencies**](#dependencies)
- [How to Use?](#how-to-use)
- [Installation](#installation)
- [Syntax](#syntax)
- [Supported Elements](#supported-elements)
- [Supported Attributes for each Element](#supported-attributes-for-each-element)
- [LICENSE](#license)
- [Py INUI](#py-inui)
- [Contents](#contents)
- [Requirements](#requirements)
- [**Python Compatibility**](#python-compatibility)
- [**Dependencies**](#dependencies)
- [How to Use?](#how-to-use)
- [Installation](#installation)
- [Syntax](#syntax)
- [Supported Elements](#supported-elements)
- [Supported Attributes for each Element](#supported-attributes-for-each-element)
- [LICENSE](#license)

<!-- vscode-markdown-toc-config
numbering=false
Expand All @@ -58,34 +58,32 @@

<!-- /vscode-markdown-toc -->

## Requirements
### Requirements

### **Python Compatibility**
#### **Python Compatibility**

This Library is written entirely in python. tested versions are `python 3.11, 3.10, 3.9, 3.8, 3.7` while older versions
should not cause any problem, we recommend using the latest version of `python3`.

### **Dependencies**
#### **Dependencies**

This package requires the following packages:

* [BeautifulSoup](https://pypi.org/project/beautifulsoup4/ "BeautifulSoup4") - for Prettifing Code
- [BeautifulSoup](https://pypi.org/project/beautifulsoup4/ "BeautifulSoup4") - for Prettifing Code


## How to Use?
### How to Use?

> read the [documentation](https://inui.readthedocs.io/en/latest/) for more information


### Installation
#### Installation

Just run following command in the Terminal or CMD

```bash
pip install inui --upgrade
```

### Syntax
#### Syntax

The syntax of `INUI` package is very easy, you have some building blocks like HTML tags and you have to
order them to create a new bigger block and in the last, you have your full project.
Expand All @@ -95,13 +93,14 @@ Supppose that the you want to create `Hello World!` project. your buildin block
```python
H1("Hello World!")
```
Now you want to create application that contains `N` times `Hello World!`, in here we just put it in the

Now you want to create application that contains `N` times `Hello World!`, in here we just put it in the
Body tag and use our python code to create our goal. See here:

```python
n = 10
listOfH1 = [H1("Hello World!"+str(i)) for i in range(1,n+1) ]
Body(listOfH1)
list_of_h1 = [H1("Hello World!"+str(i)) for i in range(1,n+1) ]
Body(list_of_h1)

```

Expand Down Expand Up @@ -157,81 +156,81 @@ output = Html(data=(
print(output)
```

## Supported Elements

| id | HTML | INUI | id | HTML | INUI | id | HTML | INUI |
| --|-- | --------- | --|-- | --------- |--|-- | --------- |
| 1|'<> </> ' | BaseElement| 45|figure | Figure|89|em | Em|
| 2|</> | BaseVoidElement | 46|font | Font|90|pre | Pre|
| 3|!DOCTYPE html | Doctype| 47|footer | Footer|91|progress | Progress|
| 4|abbr | Abbr| 48|form | Form|92|q | Q|
| 5|acronym | Acronym| 49|frame | Frame|93|rp | Rp|
| 6|address | Address| 50|frameset | Frameset|94|rt | Rt|
| 7|a | A| 51|head | Head|95|ruby | Ruby|
| 8|applet | Applet| 52|header | Header|96|s | S|
| 9|area | Area| 53|h1 | H1|97|samp | Samp|
| 10|article | Article| 54|h2 | H2|98|script | Script|
| 11|aside | Aside| 55|h3 | H3|99|section | Section|
| 12|audio | Audio| 56|h4 | H4|100|small | Small|
| 13|base | Base| 57|h5 | H5|101|source | Source|
| 14|basefont | Basefont| 58|h6 | H6|102|spacer | Spacer|
| 15|bdi | Bdi| 59|hgroup | Hgroup|103|span | Span|
| 16|bdo | Bdo| 60|hr | Hr|104|strike | Strike|
| 17|bgsound | Bgsound| 61|html | Html|105|strong | Strong|
| 18|big | Big| 62|iframe | Iframe|106|style | Style|
| 19|blockquote | Blockquote| 63|img | Img|107|sub | Sub|
| 20|body | Body| 64|input | Input|108|sup | Sup|
| 21|b | B| 65|ins | Ins|109|summary | Summary|
| 22|br | Br| 66|isindex | Isindex|110|svg | Svg|
| 23|button | Button| 67|i | I|111|table | Table|
| 24|caption | Caption| 68|kbd | Kbd|112|tbody | Tbody|
| 25|canvas | Canvas| 69|keygen | Keygen|113|td | Td|
| 26|center | Center| 70|label | Label|114|template | Template|
| 27|cite | Cite| 71|legend | Legend|115|tfoot | Tfoot|
| 28|code | Code| 72|li | Li|116|th | Th|
| 29|colgroup | Colgroup| 73|main | Main|117|thead | Thead|
| 30|col | Col| 74|mark | Mark|118|time | Time|
| 31|comment | Comment| 75|marquee | Marquee|119|title | Title|
| 32|data | Data| 76|menuitem | Menuitem|120|tr | Tr|
| 33|datalist | Datalist| 77|meta | Meta|121|track | Track|
| 34|dd | Dd| 78|meter | Meter|122|tt | Tt|
| 35|dfn | Dfn| 79|nav | Nav|123|u | U|
| 36|del | Del| 80|nobr | Nobr|124|var | Var|
| 37|details | Details| 81|noembed | Noembed|125|video | Video|
| 38|dialog | Dialog| 82|noscript | Noscript|126|wbr | Wbr|
| 39|dir | Dir| 83|object | Object|127|xmp | Xmp|
| 40|div | Div| 84|ol | Ol|
| 41|dl | Dl| 85|optgroup | Optgroup|
| 42|embed | Embed| 86|option | Option|
| 43|fieldset | Fieldset| 87|output | Output|
| 44|figcaption | Figcaption| 88|p | P|


## Supported Attributes for each Element

| id | HTML | INUI | id | HTML | INUI | id | HTML | INUI |
| --|-- | --------- | --|-- | --------- |--|-- | --------- |
| 1| class | classs | 22| itemid | itemid | 89| elementtiming | elementtiming |
| 2| id | id | 23| itemprop | itemprop | 90| for | forr |
| 3| src | src | 24| itemref | itemref | 91| max | max |
| 4| name | name | 25| itemscope | itemscope | 92| maxlength | maxlength |
| 5| content | content | 26| itemtype | itemtype | 93| min | min |
| 6| charset | charset | 27| lang | lang | 94| minlength | minlength |
| 7| style | style | 28| nonce | nonce | 95| multiple | multiple |
| 8| href | href | 29| part | part | 96| pattern | pattern |
| 9| autocapitalize | autocapitalize | 30| popover | popover | 97| readonly | readonly |
| 10| accesskey | accesskey | 31| slot | slot | 98| rel | rel |
| 11| accessskey | accessskey | 32| spellcheck | spellcheck | 99| required | required |
| 12| autofocus | autofocus | 33| tabindex | tabindex | 100| size | size |
| 13| contenteditable | contenteditable | 34| title | title | 101| step | step |
| 14| dir | dir | 35| translate | translate | 102| typee | typee |
| 15| draggable | draggable | 36| virtualkeyboardpolicy | virtualkeyboardpolicy | 103| placeholder | placeholder |
| 16| enterkeyhint | enterkeyhint | 37| accept | accept | 104| text | text |
| 17| exportparts | exportparts | 38| autocomplete | autocomplete | 105| scope | scope|
| 18| hidden | hidden | 39| capture | capture | 106| colspan | colspan |
| 19| inert | inert | 40| crossorigin | crossorigin | 107|aria-describedby|aria_describedby|
| 20| inputmode | inputmode | 41| dirname | dirname | 108|aria-label|aria_label|
| 21| is | iss | 42| disabled | disabled | 109|selected|selected|
## LICENSE
### Supported Elements

| id | HTML | INUI | id | HTML | INUI | id | HTML | INUI |
| --- | ------------- | --------------- | --- | -------- | -------- | --- | -------- | -------- |
| 1 | '<> </> ' | BaseElement | 45 | figure | Figure | 89 | em | Em |
| 2 | </> | BaseVoidElement | 46 | font | Font | 90 | pre | Pre |
| 3 | !DOCTYPE html | Doctype | 47 | footer | Footer | 91 | progress | Progress |
| 4 | abbr | Abbr | 48 | form | Form | 92 | q | Q |
| 5 | acronym | Acronym | 49 | frame | Frame | 93 | rp | Rp |
| 6 | address | Address | 50 | frameset | Frameset | 94 | rt | Rt |
| 7 | a | A | 51 | head | Head | 95 | ruby | Ruby |
| 8 | applet | Applet | 52 | header | Header | 96 | s | S |
| 9 | area | Area | 53 | h1 | H1 | 97 | samp | Samp |
| 10 | article | Article | 54 | h2 | H2 | 98 | script | Script |
| 11 | aside | Aside | 55 | h3 | H3 | 99 | section | Section |
| 12 | audio | Audio | 56 | h4 | H4 | 100 | small | Small |
| 13 | base | Base | 57 | h5 | H5 | 101 | source | Source |
| 14 | basefont | Basefont | 58 | h6 | H6 | 102 | spacer | Spacer |
| 15 | bdi | Bdi | 59 | hgroup | Hgroup | 103 | span | Span |
| 16 | bdo | Bdo | 60 | hr | Hr | 104 | strike | Strike |
| 17 | bgsound | Bgsound | 61 | html | Html | 105 | strong | Strong |
| 18 | big | Big | 62 | iframe | Iframe | 106 | style | Style |
| 19 | blockquote | Blockquote | 63 | img | Img | 107 | sub | Sub |
| 20 | body | Body | 64 | input | Input | 108 | sup | Sup |
| 21 | b | B | 65 | ins | Ins | 109 | summary | Summary |
| 22 | br | Br | 66 | isindex | Isindex | 110 | svg | Svg |
| 23 | button | Button | 67 | i | I | 111 | table | Table |
| 24 | caption | Caption | 68 | kbd | Kbd | 112 | tbody | Tbody |
| 25 | canvas | Canvas | 69 | keygen | Keygen | 113 | td | Td |
| 26 | center | Center | 70 | label | Label | 114 | template | Template |
| 27 | cite | Cite | 71 | legend | Legend | 115 | tfoot | Tfoot |
| 28 | code | Code | 72 | li | Li | 116 | th | Th |
| 29 | colgroup | Colgroup | 73 | main | Main | 117 | thead | Thead |
| 30 | col | Col | 74 | mark | Mark | 118 | time | Time |
| 31 | comment | Comment | 75 | marquee | Marquee | 119 | title | Title |
| 32 | data | Data | 76 | menuitem | Menuitem | 120 | tr | Tr |
| 33 | datalist | Datalist | 77 | meta | Meta | 121 | track | Track |
| 34 | dd | Dd | 78 | meter | Meter | 122 | tt | Tt |
| 35 | dfn | Dfn | 79 | nav | Nav | 123 | u | U |
| 36 | del | Del | 80 | nobr | Nobr | 124 | var | Var |
| 37 | details | Details | 81 | noembed | Noembed | 125 | video | Video |
| 38 | dialog | Dialog | 82 | noscript | Noscript | 126 | wbr | Wbr |
| 39 | dir | Dir | 83 | object | Object | 127 | xmp | Xmp |
| 40 | div | Div | 84 | ol | Ol |
| 41 | dl | Dl | 85 | optgroup | Optgroup |
| 42 | embed | Embed | 86 | option | Option |
| 43 | fieldset | Fieldset | 87 | output | Output |
| 44 | figcaption | Figcaption | 88 | p | P |

### Supported Attributes for each Element

| id | HTML | INUI | id | HTML | INUI | id | HTML | INUI |
| --- | --------------- | --------------- | --- | --------------------- | --------------------- | --- | ---------------- | ---------------- |
| 1 | class | classs | 22 | itemid | itemid | 89 | elementtiming | elementtiming |
| 2 | id | id | 23 | itemprop | itemprop | 90 | for | forr |
| 3 | src | src | 24 | itemref | itemref | 91 | max | max |
| 4 | name | name | 25 | itemscope | itemscope | 92 | maxlength | maxlength |
| 5 | content | content | 26 | itemtype | itemtype | 93 | min | min |
| 6 | charset | charset | 27 | lang | lang | 94 | minlength | minlength |
| 7 | style | style | 28 | nonce | nonce | 95 | multiple | multiple |
| 8 | href | href | 29 | part | part | 96 | pattern | pattern |
| 9 | autocapitalize | autocapitalize | 30 | popover | popover | 97 | readonly | readonly |
| 10 | accesskey | accesskey | 31 | slot | slot | 98 | rel | rel |
| 11 | accessskey | accessskey | 32 | spellcheck | spellcheck | 99 | required | required |
| 12 | autofocus | autofocus | 33 | tabindex | tabindex | 100 | size | size |
| 13 | contenteditable | contenteditable | 34 | title | title | 101 | step | step |
| 14 | dir | dir | 35 | translate | translate | 102 | typee | typee |
| 15 | draggable | draggable | 36 | virtualkeyboardpolicy | virtualkeyboardpolicy | 103 | placeholder | placeholder |
| 16 | enterkeyhint | enterkeyhint | 37 | accept | accept | 104 | text | text |
| 17 | exportparts | exportparts | 38 | autocomplete | autocomplete | 105 | scope | scope |
| 18 | hidden | hidden | 39 | capture | capture | 106 | colspan | colspan |
| 19 | inert | inert | 40 | crossorigin | crossorigin | 107 | aria-describedby | aria_describedby |
| 20 | inputmode | inputmode | 41 | dirname | dirname | 108 | aria-label | aria_label |
| 21 | is | iss | 42 | disabled | disabled | 109 | selected | selected |

### LICENSE

Distributed under the MIT License. See `LICENSE` for more information.
3 changes: 3 additions & 0 deletions inui/elements.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ class e(BaseElement):
Meta = meta_base("", "", "", "", "", "")


_ = e


class Doctype(BaseVoidElement): ...


Expand Down

0 comments on commit 1821848

Please sign in to comment.