From 6206d7e0968a0ecd390aa2f6d1d382801f77eefb Mon Sep 17 00:00:00 2001 From: Walter Boring Date: Sun, 25 Jan 2026 19:23:10 -0500 Subject: [PATCH] updated README --- Makefile | 2 +- README.md | 130 +++++++++++++++++++++++++++++++++++++++++++++++++ README.rst | 93 ----------------------------------- pyproject.toml | 2 +- setup.cfg | 8 +-- 5 files changed, 136 insertions(+), 99 deletions(-) create mode 100644 README.md delete mode 100644 README.rst diff --git a/Makefile b/Makefile index 5296742..b349418 100644 --- a/Makefile +++ b/Makefile @@ -17,7 +17,7 @@ help: # Help for the Makefile dev: venv ## Create the virtualenv with all the requirements installed docs: build - cp README.rst docs/readme.rst + cp README.md docs/readme.md cp Changelog docs/changelog.rst tox -edocs diff --git a/README.md b/README.md new file mode 100644 index 0000000..9a65161 --- /dev/null +++ b/README.md @@ -0,0 +1,130 @@ +# APRSD Yahoo Finance Stock Quotes + +[![PyPI](https://img.shields.io/pypi/v/aprsd-stock-plugin.svg)](https://pypi.org/project/aprsd-stock-plugin/) +[![Status](https://img.shields.io/pypi/status/aprsd-stock-plugin.svg)](https://pypi.org/project/aprsd-stock-plugin/) +[![Python Version](https://img.shields.io/pypi/pyversions/aprsd-stock-plugin)](https://pypi.org/project/aprsd-stock-plugin) +[![License](https://img.shields.io/pypi/l/aprsd-stock-plugin)](https://opensource.org/licenses/Apache%20Software%20License%202.0) + +[![Read the Docs](https://img.shields.io/readthedocs/aprsd-stock-plugin/latest.svg?label=Read%20the%20Docs)](https://aprsd-stock-plugin.readthedocs.io/) +[![Tests](https://github.com/hemna/aprsd-stock-plugin/workflows/Tests/badge.svg)](https://github.com/hemna/aprsd-stock-plugin/actions?workflow=Tests) +[![Codecov](https://codecov.io/gh/hemna/aprsd-stock-plugin/branch/main/graph/badge.svg)](https://codecov.io/gh/hemna/aprsd-stock-plugin) +[![pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit&logoColor=white)](https://github.com/pre-commit/pre-commit) + +## Features + +* APRSD Plugin that gets a stock quote from Yahoo Finance python API and returns that. + +## Installation + +You can install **APRSD Yahoo Finance Stock Quotes** via [pip](https://pip.pypa.io/) from [PyPI](https://pypi.org/): + +```console +$ pip install aprsd-stock-plugin +``` + +## Usage + +The stock plugin responds to APRS messages that start with `s` or `S` followed by a stock symbol. + +### Example Interactions + +#### Basic Stock Quote Request + +Send an APRS message to your APRSD instance: + +``` +s AAPL +``` + +**Response:** +``` +AAPL - ask: 175.50 high: 176.20 low: 174.80 +``` + +#### Requesting Different Stocks + +You can query any stock symbol available on Yahoo Finance: + +``` +s TSLA +``` + +**Response:** +``` +TSLA - ask: 245.30 high: 248.50 low: 243.10 +``` + +``` +s MSFT +``` + +**Response:** +``` +MSFT - ask: 380.25 high: 382.00 low: 378.50 +``` + +#### Error Handling + +If you don't provide a stock symbol: + +``` +s +``` + +**Response:** +``` +No stock symbol +``` + +If the stock symbol is invalid or cannot be fetched: + +``` +s INVALID123 +``` + +**Response:** +``` +Failed to fetch stock 'INVALID123' +``` + +### Command Format + +The plugin recognizes commands that: +- Start with `s` or `S` (case-insensitive) +- Are followed by a space and a stock symbol + +**Valid formats:** +- `s AAPL` +- `S TSLA` +- `stock MSFT` +- `Stock GOOGL` + +**Note:** The plugin uses a regex pattern `^[sS]` to match commands, so any message starting with `s` or `S` will trigger the plugin. The stock symbol is extracted from the rest of the message. + +### Configuration + +The plugin can be enabled/disabled via APRSD configuration. By default, the plugin is disabled and needs to be enabled in your APRSD configuration file: + +```ini +[aprsd_stock_plugin] +enabled = True +``` + +## Contributing + +Contributions are very welcome. +To learn more, see the [Contributor Guide](CONTRIBUTING.rst). + +## License + +Distributed under the terms of the [Apache Software License 2.0 license](https://opensource.org/licenses/Apache%20Software%20License%202.0), +**APRSD Yahoo Finance Stock Quotes** is free and open source software. + +## Issues + +If you encounter any problems, +please [file an issue](https://github.com/hemna/aprsd-stock-plugin/issues) along with a detailed description. + +## Credits + +This project was generated from [@hemna](https://github.com/hemna)'s [APRSD Plugin Python Cookiecutter](https://github.com/hemna/cookiecutter-aprsd-plugin) template. diff --git a/README.rst b/README.rst deleted file mode 100644 index 34eabcf..0000000 --- a/README.rst +++ /dev/null @@ -1,93 +0,0 @@ -APRSD Yahoo Finance Stock Quotes -================================ - -|PyPI| |Status| |Python Version| |License| - -|Read the Docs| |Tests| |Codecov| - -|pre-commit| - -.. |PyPI| image:: https://img.shields.io/pypi/v/aprsd-stock-plugin.svg - :target: https://pypi.org/project/aprsd-stock-plugin/ - :alt: PyPI -.. |Status| image:: https://img.shields.io/pypi/status/aprsd-stock-plugin.svg - :target: https://pypi.org/project/aprsd-stock-plugin/ - :alt: Status -.. |Python Version| image:: https://img.shields.io/pypi/pyversions/aprsd-stock-plugin - :target: https://pypi.org/project/aprsd-stock-plugin - :alt: Python Version -.. |License| image:: https://img.shields.io/pypi/l/aprsd-stock-plugin - :target: https://opensource.org/licenses/Apache Software License 2.0 - :alt: License -.. |Read the Docs| image:: https://img.shields.io/readthedocs/aprsd-stock-plugin/latest.svg?label=Read%20the%20Docs - :target: https://aprsd-stock-plugin.readthedocs.io/ - :alt: Read the documentation at https://aprsd-stock-plugin.readthedocs.io/ -.. |Tests| image:: https://github.com/hemna/aprsd-stock-plugin/workflows/Tests/badge.svg - :target: https://github.com/hemna/aprsd-stock-plugin/actions?workflow=Tests - :alt: Tests -.. |Codecov| image:: https://codecov.io/gh/hemna/aprsd-stock-plugin/branch/main/graph/badge.svg - :target: https://codecov.io/gh/hemna/aprsd-stock-plugin - :alt: Codecov -.. |pre-commit| image:: https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit&logoColor=white - :target: https://github.com/pre-commit/pre-commit - :alt: pre-commit - - -Features --------- - -* APRSD Plugin that gets a stock quote from Yahoo Finance python API and returns that. - - -Installation ------------- - -You can install *APRSD Yahoo Finance Stock Quotes* via pip_ from PyPI_: - -.. code:: console - - $ pip install aprsd-stock-plugin - - -Usage ------ - -Please see the `Command-line Reference `_ for details. - - -Contributing ------------- - -Contributions are very welcome. -To learn more, see the `Contributor Guide`_. - - -License -------- - -Distributed under the terms of the `Apache Software License 2.0 license`_, -*APRSD Yahoo Finance Stock Quotes* is free and open source software. - - -Issues ------- - -If you encounter any problems, -please `file an issue`_ along with a detailed description. - - -Credits -------- - -This project was generated from `@hemna`_'s `APRSD Plugin Python Cookiecutter`_ template. - -.. _@hemna: https://github.com/hemna -.. _Cookiecutter: https://github.com/audreyr/cookiecutter -.. _Apache Software License 2.0 license: https://opensource.org/licenses/Apache Software License 2.0 -.. _PyPI: https://pypi.org/ -.. _APRSD Plugin Python Cookiecutter: https://github.com/hemna/cookiecutter-aprsd-plugin -.. _file an issue: https://github.com/hemna/aprsd-stock-plugin/issues -.. _pip: https://pip.pypa.io/ -.. github-only -.. _Contributor Guide: CONTRIBUTING.rst -.. _Usage: https://aprsd-stock-plugin.readthedocs.io/en/latest/usage.html diff --git a/pyproject.toml b/pyproject.toml index f8f8bfb..6d076a1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -6,7 +6,7 @@ build-backend = "setuptools.build_meta" name = "aprsd-stock-plugin" dynamic = ["version"] description = "Ham Radio APRSD Plugin for fetching stock quotes" -readme = "README.rst" +readme = {file = "README.md", content-type = "text/markdown"} requires-python = ">=3.11" license = {text = "Apache-2.0"} authors = [ diff --git a/setup.cfg b/setup.cfg index 51bbf07..0997551 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,11 +1,11 @@ [metadata] name = aprsd_stock_plugin -long_description = file: README.rst -long_description_content_type = text/x-rst +long_description = file: README.md +long_description_content_type = text/markdown author = Walter A. Boring IV author_email = waboring@hemna.com license = Apache-2.0 -license_file = LICENSE +license_files = LICENSE classifiers = License :: OSI Approved :: Apache Software License classifier = @@ -16,7 +16,7 @@ classifier = Programming Language :: Python :: 3.8 Programming Language :: Python :: 3.9 description_file = - README.rst + README.md summary = Ham Radio APRSD Plugin for fetching stock quotes [global]