https://github.com/codersales/get-html
https://github.com/codersales/get-html
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/codersales/get-html
- Owner: CoderSales
- Created: 2021-09-17T23:34:11.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2021-09-18T00:48:06.000Z (over 4 years ago)
- Last Synced: 2025-06-01T00:45:46.859Z (10 months ago)
- Language: HTML
- Size: 13.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# get-html
## To Run / Usage
### Extensions
Ensure have installed:
Google Developer
GitPod Browser Extension
Visual Studio Code
Primarily:
- Live Server
- Code Runner
Secondarily:
- Live Preview
- Python
- GitHub Pull Requests and Issues
### To Run
Live Server
- Click
- Go Live!
- in bottom right corner of browser
To run get_html.py
either use:
Code Runner
- Press
- Ctrl + Alt N
- (to stop press: Ctrl + Alt + M)
or
Preferred option:
in terminal (Ctrl + J or Ctrl + ')
python3 get_html.py
## Development
### Get News (python)
- extract.py [Extracting text from HTML file using Python](https://stackoverflow.com/questions/328356/extracting-text-from-html-file-using-python)
#### beautifulsoup4 (command line interface)
pip3 install beautifulsoup4
- [beautifulsoup4 4.10.0](https://pypi.org/project/beautifulsoup4/)
### display command line Output on HTML Page
- [Showing command line output on a html page](https://stackoverflow.com/questions/53860093/showing-command-line-output-on-a-html-page)
#### xterm.js
npm install xterm
- index.html code from this site
- [Xterm.js | Build terminals in the browser](https://xtermjs.org/)
### Update dependencies in requirements.txt for Heroku deployment
pip3 freeze > requirements.txt
check old and new each time
## Bug
Background:
xterm.js running from index.html
running get_html.py
Issue:
python3 get_html.py
- prints output to local IDE terminal
Potential Fix:
Run command in xterm.js
python3 get_html.py
Potential Better Way (Reference):
- [cs01 / pyxtermjs](https://github.com/cs01/pyxtermjs)
## Bug
Search String:
xterm.js not taking keyboard input
Search Result:
[How to make xterm.js accept input?](https://stackoverflow.com/questions/44447473/how-to-make-xterm-js-accept-input)
Answer given:
xtermjs is a library that expose an api, that allow us to build fully xterm based terminal emulator.
But for every of the terminal functionalities you need to implement it through the api. Using the event listeners.
And handling them.
And combining it with others packages depend on what you want to achieve.
## References
- extract.py [Extracting text from HTML file using Python](https://stackoverflow.com/questions/328356/extracting-text-from-html-file-using-python)
- pip3 install beautifulsoup4 [beautifulsoup4 4.10.0](https://pypi.org/project/beautifulsoup4/)