Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create new functions for console Py.Html #22

Closed
4 tasks done
FelipeKatao opened this issue Oct 28, 2019 · 4 comments
Closed
4 tasks done

Create new functions for console Py.Html #22

FelipeKatao opened this issue Oct 28, 2019 · 4 comments
Assignees
Labels
enhancement New feature or request

Comments

@FelipeKatao
Copy link
Owner

FelipeKatao commented Oct 28, 2019

Create news functions for PyHtmlConsole.py
Targets: https://github.com/FelipeKatao/Py.Html/blob/master/PyHtmlConsole.py and https://github.com/FelipeKatao/Py.Html/blob/master/Framework/StyleTools.py

How add new function for console Py.Html
First add the new command to the command list in the PyHtmlConsole.py module.
LISTCOMMAND= ["help","create.html","exit","create.html.menu","create.html.form","set.path","link.css","create.element","create.html.responsive"]

After inside the ExecuteCommand method, add an if with the new command you created.
if command == "create.html.form": pass

Following are the commands you should add to the list and variable:

  • create.css
  • create.css.rule.class
  • create.css.rule.id
  • responsive.create

After creating these commands, later we will implement their use.

@FelipeKatao FelipeKatao added the enhancement New feature or request label Oct 28, 2019
@FelipeKatao
Copy link
Owner Author

Now implement the functions you created in the console within the https://github.com/FelipeKatao/Py.Html/blob/master/Framework/StyleTools.py file.
Has all the methods to work inside the console.

Within ifs put another if to detect if the location has been set:
if(dt._localHtmlFiles[con._SETFILE]!="0"): else:

Attach at the end of each if and within each else a print on the screen to show that the operation was successful:
print("Css file was created successfully")
Customize the message according to the operation that was done

@FelipeKatao
Copy link
Owner Author

For example:
if command == "link.css": if(dt._localHtmlFiles[con._SETFILE]!="0"): print("Css Link anexed with susefull") pass else: print("Css Link anexed with susefull") pass

@FelipeKatao FelipeKatao pinned this issue Oct 28, 2019
@paulinhomacedo
Copy link
Contributor

Done man!

@FelipeKatao
Copy link
Owner Author

Closed the Issue @PauloAMacedo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants