Skip to content

Commit 2172e69

Browse files
committed
update README
1 parent 2b6fd2a commit 2172e69

File tree

1 file changed

+35
-5
lines changed

1 file changed

+35
-5
lines changed

README.md

Lines changed: 35 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ Create an up-to-date list of Corporate Memory plugin packages.
55
This repository contains an up-to-date list of Python packages starting with the prefix `cmem-plugin`, fetched from [PyPI](https://pypi.org).
66
It is updated daily through an automated GitHub Action, which queries the PyPI simple index and gathers details for all plugins starting with `cmem-plugin`.
77

8-
[![workflow](https://github.com/eccenca/cmem-plugin-index/actions/workflows/check.yml/badge.svg)](https://github.com/eccenca/cmem-plugin-index/actions)
9-
[![poetry][poetry-shield]][poetry-link] [![ruff][ruff-shield]][ruff-link] [![mypy][mypy-shield]][mypy-link] [![copier][copier-shield]][copier]
8+
[![workflow](https://github.com/eccenca/cmem-plugin-index/actions/workflows/check.yml/badge.svg)](https://github.com/eccenca/cmem-plugin-index/actions)
9+
[![poetry][poetry-shield]][poetry-link] [![ruff][ruff-shield]][ruff-link] [![mypy][mypy-shield]][mypy-link] [![copier][copier-shield]][copier]
1010

1111
## Development
1212

@@ -16,15 +16,15 @@ It is updated daily through an automated GitHub Action, which queries the PyPI s
1616

1717
## Repository Structure
1818

19-
- `src/`: Contains the Python script (`plugin_info.py`) that queries PyPI and fetches details of plugins starting with `cmem-plugin`.
19+
- `cmem_plugin_index//`: Contains the Python package, a CLI that queries PyPI and fetches details of plugins.
2020
- `data/`: Stores the generated JSON file (`plugins_info.json`) with details about each `cmem-plugin` package, including the package ID, name, summary, and latest version.
2121
- `.github/`: Contains GitHub Actions workflow files that automate the daily updates.
2222
- `README.md`: This file.
2323

2424
## How It Works
2525

26-
1. **GitHub Action**: The `update_plugins.yml` workflow in the `.github/workflows/` directory runs daily to fetch the list of `cmem-plugin` packages from PyPI and save the information into a `plugins_info.json` file in the `data/` folder.
27-
26+
1. **GitHub Action**: The `update_plugins.yml` workflow in the `.github/workflows/` directory runs daily to fetch the list of `cmem-plugin` packages from pypi.org and saves the information into a `plugins_info.json` file in the `data/` folder.
27+
2828
2. **Plugin Information**: The script fetches the following details for each plugin:
2929
- **ID**: The package name.
3030
- **Name**: The display name of the package.
@@ -38,6 +38,36 @@ It is updated daily through an automated GitHub Action, which queries the PyPI s
3838

3939
You can manually trigger the GitHub Action by going to the **Actions** tab of this repository and selecting the **Update CMEM Plugin List** workflow. From there, you can click the **Run workflow** button.
4040

41+
You can also use the command line directly:
42+
43+
```
44+
$ poetry install
45+
Installing dependencies from lock file
46+
...
47+
48+
$ poetry run cmem-plugin-index --help
49+
Usage: cmem-plugin-index [OPTIONS] OUTPUT_FILE
50+
51+
Fetch and save a list of plugin details from pypi.org
52+
53+
Options:
54+
--prefix TEXT Prefix of the packages to fetch. [default: cmem-plugin-]
55+
--ignore TEXT Ignore given packages. [default: cmem-plugin-base, cmem-
56+
client]
57+
--help Show this message and exit.
58+
59+
$ poetry run cmem-plugin-index data/plugins_info.json
60+
2024-12-16 16:47:38.499 | WARNING | cmem_plugin_index.cli:cli:28 - Output file data/plugins_info.json exists, will overwrite it
61+
2024-12-16 16:47:38.499 | INFO | cmem_plugin_index.plugin_info:get_package_names:14 - Start fetching plugin names from pypi.org
62+
2024-12-16 16:47:47.319 | INFO | cmem_plugin_index.plugin_info:get_package_names:20 - Got 593112 package names from pypi.org
63+
2024-12-16 16:47:47.348 | INFO | cmem_plugin_index.plugin_info:get_package_names_with_prefix:28 - Found 25 packages with prefix 'cmem-plugin-' (ignoring ('cmem-plugin-base', 'cmem-client'))
64+
2024-12-16 16:47:51.984 | INFO | cmem_plugin_index.cli:cli:39 - Data saved to data/plugins_info.json
65+
```
66+
67+
Be aware that cmemc itself fetches the information from [download.eccenca.com](https://download.eccenca.com/cmem-plugin-index/cmem-plugin-index.json).
68+
Uploading the JSON dataset to this host is part of the github action mentioned above.
69+
70+
4171
[poetry-link]: https://python-poetry.org/
4272
[poetry-shield]: https://img.shields.io/endpoint?url=https://python-poetry.org/badge/v0.json
4373
[ruff-link]: https://docs.astral.sh/ruff/

0 commit comments

Comments
 (0)