Skip to content

Commit 6009b30

Browse files
committed
Update README.md for Wikifactory URLs
Explain setting environmental variables to set Wikifactory API and project URL domains.
1 parent 77977f0 commit 6009b30

1 file changed

Lines changed: 28 additions & 14 deletions

File tree

README.md

Lines changed: 28 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
'# OSD status dashboard _(wp2.2_dev)_
1+
# OSD status dashboard _(wp2.2_dev)_
22

33
[![Demo backend API](https://img.shields.io/badge/Demo-CLICK%20HERE-red.svg?style=flat)](https://wp22dev.herokuapp.com/)
44
[![Python version](https://img.shields.io/badge/Python-3.10-blue.svg?style=flat&logo=Python&logoColor=white)](https://docs.python.org/3.8/)
@@ -17,19 +17,21 @@ Targeted at hosters of version control platforms (such as [Wikifactory](https://
1717
**Please see the [Install](#install) and [Usage](#usage) sections to get up and running with this tool**. For more details on its background and design considerations, please see the [Background](#background), ~~[Design notes](#design-notes), and [Future work](#future-work) sections. There is also a detailed [step-by-step walkthrough](docs/usage-example.md).~~
1818
## Table of Contents
1919

20-
- [Table of Contents](#table-of-contents)
21-
- [Background](#background)
22-
- [Install](#install)
23-
- [Running from source](#running-from-source)
24-
- [Deploy as container](#deploy-as-container)
25-
- [Usage](#usage)
26-
- [Making requests to the REST API](#making-requests-to-the-rest-api)
27-
- [API response format](#api-response-format)
28-
- [Design notes](#design-notes)
29-
- [Maintainers](#maintainers)
30-
- [Contributing](#contributing)
31-
- [Acknowledgements](#acknowledgements)
32-
- [License](#license)
20+
- [OSD status dashboard _(wp2.2_dev)_](#osd-status-dashboard-wp22_dev)
21+
- [Table of Contents](#table-of-contents)
22+
- [Background](#background)
23+
- [Install](#install)
24+
- [Running from source](#running-from-source)
25+
- [Deploy as container](#deploy-as-container)
26+
- [Usage](#usage)
27+
- [Making requests to the REST API](#making-requests-to-the-rest-api)
28+
- [API response format](#api-response-format)
29+
- [Custom Wikifactory URLs](#custom-wikifactory-urls)
30+
- [Design notes](#design-notes)
31+
- [Maintainers](#maintainers)
32+
- [Contributing](#contributing)
33+
- [Acknowledgements](#acknowledgements)
34+
- [License](#license)
3335

3436
## Background
3537

@@ -259,6 +261,18 @@ Notes:
259261
* For `files_info` above, filetypes are identified by file extensions. The categories and mapping are located in [`oshminer/filetypes.py`](./oshminer/filetypes.py).
260262
* The `license` information and formatting is largely based on that from the GitHub-managed [choosealicense.com repository](https://github.com/github/choosealicense.com), with the exception of some open source hardware licenses which were manually added.
261263

264+
### Custom Wikifactory URLs
265+
266+
By default, this tool will:
267+
268+
1. Identify whether a provided repository URL in the JSON request body as a Wikifactory project if it is under the domain `wikifactory.com`
269+
2. Use the public Wikifactory GraphQL API endpoint at `https://wikifactory.com/api/graphql`
270+
271+
Both can be customised with the following environmental variables:
272+
273+
1. `WIF_BASE_URL` - (default: `wikifactory.com`) The base domain used for pattern-matching and identifying Wikifactory project URLs in the JSON request body in the form of `example.com`. If this is customised, then the requested Wikifactory project URLs passed to this tool should also use that domain instead of `wikifactory.com`. Otherwise, an "Repository URL domain not supported" error will be returned.
274+
2. `WIF_API_URL` - (default: `https://wikifactory.com/api/graphql`) The full URL of the GraphQL API endpoint to make queries regarding Wikifactory projects in the form of `https://example.com[:port]/foo/bar`.
275+
262276
## Design notes
263277

264278
[to be updated]

0 commit comments

Comments
 (0)