## Print Something
```bash
from mahdix import p
p('YOUR TXT')
```
## Get Current Time
```bash
from mahdix import time
print(time())
```
## Generate Text Logo
```bash
from mahdix import makelogo
logo = makelogo(text='Mahdi')
print(logo)
```
## Random Numbers
```bash
from mahdix import random7, random8, random9, random1_2, random1_3, random1_4, random10
print(random7())
print(random8())
print(random9())
print(random1_2())
print(random1_3())
print(random1_4())
print(random10())
```
## html_req Function
The html_req function fetches HTML content from the specified URL, using optional headers and data for the request.
```bash
from mahdix import html_req
url = 'https://example.com'
headers = {
'User-Agent': 'Your User Agent',
'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8',
'Accept-Language': 'en-US,en;q=0.9',
'Accept-Encoding': 'gzip, deflate, br',
'Connection': 'keep-alive',
}
cookie = {'key': 'value'} ## Optional Cookes for POST requests
data = {'key': 'value'} ## Optional data for POST requests
params = {
'q': 'params_valu',
}
# you can add json-- json_data={"json" : "valu"}
parsed_html = html_req(url, Headers=headers, Data=data,Cookie=cookie,Params=params) ## data for POST requests
parsed_html = html_req(url, Headers=headers,Cookie=cookie,Params=params) ## for Get requests
print(parsed_html)
```
The html_txt function fetches HTML content from any request responce.
```bash
from mahdix import html_txt
responce=requests.get('https://example.com').text
text_html = html_txt(responce)
print(text_html)#get respone as html text
```
## search_as_re Function
```bash
# this function is search a Specific text from any text base on re moduls
from mahdix import findall_as_re
full_text = "This is some example text. Starting:apple, Finding:banana, Finding:orange, Ending:grape, Finding:pear,"// Default value None
starting_text = "Starting:" // Default value None
finding_text = "Finding:" // Default value None
ending_text = "," // Default value ','
# Using search_as_re
result_search = search_as_re(full_text, starting_text, ending_text)
print("Result from search_as_re:", result_search)
# out put : apple
```
## findall_as_re Function
```bash
#this function find a list of Specific text from any text ans return
from mahdix import findall_as_re
full_text = "This is some example text. Starting:apple, Finding:banana, Finding:orange, Ending:grape, Finding:pear,"// Default value None
starting_text = "Starting:" // Default value None
finding_text = "Finding:" // Default value None
ending_text = "," // Default value ','
result_findall = findall_as_re(full_text, finding_text, ending_text)
print("Result from findall_as_re:", result_findall)
# out put : {'banana', 'pear', 'orange'}
```
## System Commands
```bash
from mahdix import sysT
sysT('YOUR COMMAND')
```
## HTTP Requests
```bash
from mahdix import rqg, rqp
response_get = rqg('https://example.com')
response_post = rqp('https://example.com', data={'key': 'value'})
```
## Random Choices
```bash
from mahdix import rc
print(rc([1, 2, 3, 4]))
```
## Base64 Encoding/Decoding
```bash
from mahdix import bsec, bsdc
encoded_data = bsec('Hello, World!')
decoded_data = bsdc(encoded_data)
```
## Colors
```bash
# ---[coloure]------
RED = mahdix.RED
GREEN = mahdix.GREEN
YELLOW = mahdix.YELLOW
BLUE=mahdix.BLUE
ORANGE =mahdix.ORANGE
LI_BLUE = Light_BLUE
LI_MAGENTA = Light_MAGENTA
LI_CYAN = Light_CYAN
LI_WHITE = Light_WHITE
Background colors
BG_BLACK = Background_BLACK
BG_RED = Background_RED
BG_GREEN = Background_GREEN
```
## get any Facebook id created date
```bash
from mahdix import getyearid
# Example: cid = '100000000023456'
print(getyearid(cid))
```
### [Example of html_txt function](https://github.com/Shuvo-BBHH/mahdix/tree/main/html_txt).
## html_txt Function
Raw data
{
"_id": null,
"home_page": "https://www.facebook.com/bk4human",
"name": "mahdix",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.11",
"maintainer_email": "",
"keywords": "Shuvo-BBHH,MAHDI HASAN,Shuvo BBHH,Bk4kuman",
"author": "Mahdi Hasan Shuvo",
"author_email": "shvo.mex@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/28/9e/051e39a7eb051efd8bf346ab9fe4f43f0778e9434e3f86e4d59e2b8b6c48/mahdix-0.1.6.8.tar.gz",
"platform": null,
"description": "## Print Something\n\n```bash\nfrom mahdix import p\n\np('YOUR TXT')\n```\n\n## Get Current Time\n\n```bash\nfrom mahdix import time\n\nprint(time())\n```\n\n## Generate Text Logo\n\n```bash\nfrom mahdix import makelogo\n\nlogo = makelogo(text='Mahdi')\nprint(logo)\n```\n\n## Random Numbers\n\n```bash\nfrom mahdix import random7, random8, random9, random1_2, random1_3, random1_4, random10\n\nprint(random7())\nprint(random8())\nprint(random9())\nprint(random1_2())\nprint(random1_3())\nprint(random1_4())\nprint(random10())\n```\n\n## html_req Function\n\nThe html_req function fetches HTML content from the specified URL, using optional headers and data for the request.\n\n```bash\nfrom mahdix import html_req\n\nurl = 'https://example.com'\nheaders = {\n 'User-Agent': 'Your User Agent',\n 'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8',\n 'Accept-Language': 'en-US,en;q=0.9',\n 'Accept-Encoding': 'gzip, deflate, br',\n 'Connection': 'keep-alive',\n}\ncookie = {'key': 'value'} ## Optional Cookes for POST requests\ndata = {'key': 'value'} ## Optional data for POST requests\nparams = {\n 'q': 'params_valu',\n }\n# you can add json-- json_data={\"json\" : \"valu\"}\nparsed_html = html_req(url, Headers=headers, Data=data,Cookie=cookie,Params=params) ## data for POST requests \nparsed_html = html_req(url, Headers=headers,Cookie=cookie,Params=params) ## for Get requests \nprint(parsed_html)\n```\n\n\nThe html_txt function fetches HTML content from any request responce.\n\n```bash\nfrom mahdix import html_txt\nresponce=requests.get('https://example.com').text\ntext_html = html_txt(responce)\nprint(text_html)#get respone as html text\n```\n\n\n## search_as_re Function\n```bash\n# this function is search a Specific text from any text base on re moduls\nfrom mahdix import findall_as_re\nfull_text = \"This is some example text. Starting:apple, Finding:banana, Finding:orange, Ending:grape, Finding:pear,\"// Default value None\nstarting_text = \"Starting:\" // Default value None\nfinding_text = \"Finding:\" // Default value None\nending_text = \",\" // Default value ','\n# Using search_as_re\nresult_search = search_as_re(full_text, starting_text, ending_text)\nprint(\"Result from search_as_re:\", result_search)\n\n\n# out put : apple\n\n```\n\n\n\n## findall_as_re Function\n```bash\n#this function find a list of Specific text from any text ans return\nfrom mahdix import findall_as_re\nfull_text = \"This is some example text. Starting:apple, Finding:banana, Finding:orange, Ending:grape, Finding:pear,\"// Default value None\nstarting_text = \"Starting:\" // Default value None\nfinding_text = \"Finding:\" // Default value None\nending_text = \",\" // Default value ','\n\nresult_findall = findall_as_re(full_text, finding_text, ending_text)\nprint(\"Result from findall_as_re:\", result_findall)\n\n\n# out put : {'banana', 'pear', 'orange'}\n```\n\n## System Commands\n\n```bash\nfrom mahdix import sysT\n\nsysT('YOUR COMMAND')\n```\n\n## HTTP Requests\n\n```bash\nfrom mahdix import rqg, rqp\n\nresponse_get = rqg('https://example.com')\nresponse_post = rqp('https://example.com', data={'key': 'value'})\n```\n\n## Random Choices\n\n```bash\nfrom mahdix import rc\n\nprint(rc([1, 2, 3, 4]))\n\n```\n\n## Base64 Encoding/Decoding\n\n```bash\nfrom mahdix import bsec, bsdc\n\nencoded_data = bsec('Hello, World!')\ndecoded_data = bsdc(encoded_data)\n```\n\n\n\n## Colors\n\n```bash\n# ---[coloure]------\n\nRED = mahdix.RED\n\nGREEN = mahdix.GREEN\n\nYELLOW = mahdix.YELLOW\n\nBLUE=mahdix.BLUE\n\nORANGE =mahdix.ORANGE\n\nLI_BLUE = Light_BLUE\n\nLI_MAGENTA = Light_MAGENTA\n\nLI_CYAN = Light_CYAN\n\nLI_WHITE = Light_WHITE\n\nBackground colors\n\nBG_BLACK = Background_BLACK\n\nBG_RED = Background_RED\n\nBG_GREEN = Background_GREEN \n\n```\n\n## get any Facebook id created date\n\n```bash\nfrom mahdix import getyearid\n\n# Example: cid = '100000000023456'\nprint(getyearid(cid))\n```\n\n\n\n### [Example of html_txt function](https://github.com/Shuvo-BBHH/mahdix/tree/main/html_txt).\n\n## html_txt Function\n\n\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "An application that informs you of the different modules and very easy to use.",
"version": "0.1.6.8",
"project_urls": {
"Bug Reports": "https://www.facebook.com/bk4human",
"GitHub": "https://github.com/Shuvo-BBHH/",
"Homepage": "https://www.facebook.com/bk4human",
"Source": "https://github.com/Shuvo-BBHH/mahdix"
},
"split_keywords": [
"shuvo-bbhh",
"mahdi hasan",
"shuvo bbhh",
"bk4kuman"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "289e051e39a7eb051efd8bf346ab9fe4f43f0778e9434e3f86e4d59e2b8b6c48",
"md5": "06f0858fb253e09c23cecb2033cf2824",
"sha256": "7b083ed069178b1689362dc2ab76dcbdbc5a0f7f6e6abbf2eea9c81f47e40b43"
},
"downloads": -1,
"filename": "mahdix-0.1.6.8.tar.gz",
"has_sig": false,
"md5_digest": "06f0858fb253e09c23cecb2033cf2824",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.11",
"size": 10200,
"upload_time": "2024-02-11T20:17:58",
"upload_time_iso_8601": "2024-02-11T20:17:58.624422Z",
"url": "https://files.pythonhosted.org/packages/28/9e/051e39a7eb051efd8bf346ab9fe4f43f0778e9434e3f86e4d59e2b8b6c48/mahdix-0.1.6.8.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-02-11 20:17:58",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "Shuvo-BBHH",
"github_project": "mahdix",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "mahdix"
}