Add README.md and LICENSE
This commit is contained in:
parent
17c0ab5f99
commit
f80fb70bb8
21
LICENSE
Normal file
21
LICENSE
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
MIT License
|
||||||
|
|
||||||
|
Copyright (c) 2023 Edward Betts <edward@4angle.com>
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
in the Software without restriction, including without limitation the rights
|
||||||
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
copies of the Software, and to permit persons to whom the Software is
|
||||||
|
furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in all
|
||||||
|
copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
|
SOFTWARE.
|
71
README.md
Normal file
71
README.md
Normal file
|
@ -0,0 +1,71 @@
|
||||||
|
# Google Stock Index Lookup
|
||||||
|
|
||||||
|
## Description
|
||||||
|
This Python library provides command line tools to lookup the current value of
|
||||||
|
a stock index via a Google search and output the information as a single line.
|
||||||
|
It leverages the Playwright library to scrape data from Google search results
|
||||||
|
and parse the relevant information.
|
||||||
|
|
||||||
|
## Prerequisites
|
||||||
|
- Python 3
|
||||||
|
- Playwright Python package
|
||||||
|
|
||||||
|
## Installation
|
||||||
|
1. Clone this repository to your local machine.
|
||||||
|
|
||||||
|
```shell
|
||||||
|
git clone https://git.4angle.com/edward/google-stocks.git
|
||||||
|
cd google-stocks
|
||||||
|
```
|
||||||
|
|
||||||
|
2. Install the required Python packages:
|
||||||
|
|
||||||
|
```shell
|
||||||
|
pip install playwright
|
||||||
|
```
|
||||||
|
|
||||||
|
## Usage
|
||||||
|
|
||||||
|
### Lookup a Stock Index
|
||||||
|
To lookup the current value of a stock index and display it as a single line,
|
||||||
|
you can use the provided scripts.
|
||||||
|
|
||||||
|
#### FTSE All Share Example
|
||||||
|
|
||||||
|
```shell
|
||||||
|
ftse_all_share
|
||||||
|
```
|
||||||
|
|
||||||
|
Sample Output:
|
||||||
|
```
|
||||||
|
FTSE All-Share Index: 4153.35 (0.85%)
|
||||||
|
```
|
||||||
|
|
||||||
|
#### S&P Total Market Example
|
||||||
|
|
||||||
|
```shell
|
||||||
|
s_and_p_total_market
|
||||||
|
```
|
||||||
|
|
||||||
|
Sample Output:
|
||||||
|
```
|
||||||
|
S&P Total Market Index (TMI): 4329.32 (0.64%)
|
||||||
|
```
|
||||||
|
|
||||||
|
## Customization
|
||||||
|
You can customize the tool by modifying the scripts in the repository. Each
|
||||||
|
script corresponds to a specific stock index lookup.
|
||||||
|
|
||||||
|
## Contributing
|
||||||
|
Feel free to contribute to this project by opening issues or submitting pull
|
||||||
|
requests.
|
||||||
|
|
||||||
|
## License
|
||||||
|
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file
|
||||||
|
for details.
|
||||||
|
|
||||||
|
## Author
|
||||||
|
Edward Betts (edward@4angle.com)
|
||||||
|
|
||||||
|
## Acknowledgments
|
||||||
|
- Playwright: [https://playwright.dev/](https://playwright.dev/)
|
Loading…
Reference in a new issue