# README.md
https://github.com/TITIR1X/PyLogManagement
Designed to create variables with results that you can obtain by filtering the log that your terminal gives you by OS commands.
Instalation:
pip install PyLogManagement
>>> import PyLogManagement
>>> ip_adress = PyLogManagement.os_commands_regex(os_command='ipconfig', regex_function='search', regex_parameters='IP Address.+: (\d{1,3}.\d{1,3}.\d{1,3}.\d{1,3})')
>>> print(ip_adress)
['192.168.0.101']
# convert list to string:
>>> ip =''.join(ip_adress)
>>> print(ip)
192.168.0.101
show_last_log()
"""_summary_
It is useful for copying special characters (which do not load in your text editor) and using them in regex parameters.
example:
>>> import PyLogManagement
>>> PyLogManagement.show_last_log()
INFO:root:
Configuraci¢n IP de Windows
Adaptador de LAN inal mbrica Wi-Fi:
Sufijo DNS espec¡fico para la conexi¢n. . : home
Direcci¢n IPv6 . . . . . . . . . . : 444:444:444:4444:4444:4444:4444:4444
Direcci¢n IPv6 . . . . . . . . . . : 333:333:333::3
Direcci¢n IPv6 . . . . . . . . . . : 333:333:333::3
V¡nculo: direcci¢n IPv6 local. . . : 222::222:222:222:222%2
Direcci¢n IPv4. . . . . . . . . . . . . . : 192.168.1.2
MÂ scara de subred . . . . . . . . . . . . : 111.111.111.111
Puerta de enlace predeterminada . . . . . : 1111:1111:d1::a11f:c11a
>>>>>> ip_adress = os_commands_regex(os_command='ipconfig', regex_function='search', regex_parameters='Direcci¢n IPv4.+: (\d{1,3}.\d{1,3}.\d{1,3}.\d{1,3})')
>>> print(ip_adress)
['192.168.1.2']
"""
Content of interest:
[*] regex101.com -> build, test and debug regex
[*] Tutorial práctico REGEX en español: https://www.youtube.com/watch?v=Mc2j8Q-MHB4&ab_channel=ThePyCoach -> credits: The PyCoach
Raw data
{
"_id": null,
"home_page": "https://github.com/TITIR1X/PyLogManagement",
"name": "LogManagement",
"maintainer": "",
"docs_url": null,
"requires_python": "",
"maintainer_email": "",
"keywords": "Python,Console,Log,Management,RegEx,Variable,String,Output of OS commands to str or list",
"author": "Santiago Benavidez (TITIR1X)",
"author_email": "SantiagoBenavidez@pythondeveloper.com",
"download_url": "https://files.pythonhosted.org/packages/95/ae/5a7295eff1c7b7f56f3e93ae91085925cab6d5005be0398859fc467e5dbe/LogManagement-0.0.3.tar.gz",
"platform": null,
"description": "# README.md\r\n\r\nhttps://github.com/TITIR1X/PyLogManagement\r\n\r\nDesigned to create variables with results that you can obtain by filtering the log that your terminal gives you by OS commands. \r\n\r\nInstalation:\r\npip install PyLogManagement\r\n\r\n >>> import PyLogManagement\r\n >>> ip_adress = PyLogManagement.os_commands_regex(os_command='ipconfig', regex_function='search', regex_parameters='IP Address.+: (\\d{1,3}.\\d{1,3}.\\d{1,3}.\\d{1,3})')\r\n >>> print(ip_adress)\r\n ['192.168.0.101']\r\n\r\n # convert list to string:\r\n >>> ip =''.join(ip_adress)\r\n >>> print(ip)\r\n 192.168.0.101\r\n\r\n\r\nshow_last_log()\r\n \"\"\"_summary_\r\n It is useful for copying special characters (which do not load in your text editor) and using them in regex parameters.\r\n example:\r\n \r\n >>> import PyLogManagement\r\n >>> PyLogManagement.show_last_log()\r\n INFO:root:\r\n Configuraci\u00c2\u00a2n IP de Windows\r\n\r\n Adaptador de LAN inal\u00c2\u00a0mbrica Wi-Fi:\r\n\r\n Sufijo DNS espec\u00c2\u00a1fico para la conexi\u00c2\u00a2n. . : home\r\n Direcci\u00c2\u00a2n IPv6 . . . . . . . . . . : 444:444:444:4444:4444:4444:4444:4444\r\n Direcci\u00c2\u00a2n IPv6 . . . . . . . . . . : 333:333:333::3\r\n Direcci\u00c2\u00a2n IPv6 . . . . . . . . . . : 333:333:333::3\r\n V\u00c2\u00a1nculo: direcci\u00c2\u00a2n IPv6 local. . . : 222::222:222:222:222%2\r\n Direcci\u00c2\u00a2n IPv4. . . . . . . . . . . . . . : 192.168.1.2\r\n M\u00c2\u00a0scara de subred . . . . . . . . . . . . : 111.111.111.111\r\n Puerta de enlace predeterminada . . . . . : 1111:1111:d1::a11f:c11a\r\n \r\n\r\n >>>>>> ip_adress = os_commands_regex(os_command='ipconfig', regex_function='search', regex_parameters='Direcci\u00c2\u00a2n IPv4.+: (\\d{1,3}.\\d{1,3}.\\d{1,3}.\\d{1,3})')\r\n >>> print(ip_adress)\r\n ['192.168.1.2']\r\n \"\"\"\r\n\r\nContent of interest:\r\n\r\n[*] regex101.com -> build, test and debug regex\r\n\r\n[*] Tutorial pr\u00c3\u00a1ctico REGEX en espa\u00c3\u00b1ol: https://www.youtube.com/watch?v=Mc2j8Q-MHB4&ab_channel=ThePyCoach -> credits: The PyCoach\r\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Output of OS commands to str or list",
"version": "0.0.3",
"split_keywords": [
"python",
"console",
"log",
"management",
"regex",
"variable",
"string",
"output of os commands to str or list"
],
"urls": [
{
"comment_text": "",
"digests": {
"md5": "3d633c6af7a81dc0657fe19181f8de18",
"sha256": "2df333b9763ec63f6362c4de58d0ad83471170a91b152429c6c31896829b6a33"
},
"downloads": -1,
"filename": "LogManagement-0.0.3.tar.gz",
"has_sig": false,
"md5_digest": "3d633c6af7a81dc0657fe19181f8de18",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 3854,
"upload_time": "2022-12-03T19:25:34",
"upload_time_iso_8601": "2022-12-03T19:25:34.626591Z",
"url": "https://files.pythonhosted.org/packages/95/ae/5a7295eff1c7b7f56f3e93ae91085925cab6d5005be0398859fc467e5dbe/LogManagement-0.0.3.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2022-12-03 19:25:34",
"github": true,
"gitlab": false,
"bitbucket": false,
"github_user": "TITIR1X",
"github_project": "PyLogManagement",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "logmanagement"
}