Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/albertsmit/sitecite
Check if your cited sources are still up! 🚀
https://github.com/albertsmit/sitecite
Last synced: about 1 month ago
JSON representation
Check if your cited sources are still up! 🚀
- Host: GitHub
- URL: https://github.com/albertsmit/sitecite
- Owner: AlbertSmit
- License: mit
- Created: 2021-03-02T15:23:35.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2023-01-04T23:03:20.000Z (about 2 years ago)
- Last Synced: 2024-12-18T01:16:44.898Z (about 2 months ago)
- Language: TypeScript
- Homepage:
- Size: 3.29 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
sitecite
Check if your cited sources are still up. :rocket:## Usage
You can now consume the action by referencing the v1 branch
```yaml
uses: albertsmit/sitecite@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
urlfield: "link"
textfield: "quote"
path: "./data/quotes.json"
failOnNotFound: true
```## Inputs
| Input | Type | Required | Default |
| ---------------- | ------- | -------- | ----------------- |
| `token` | string | `true` | `null` |
| `urlfield` | string | `true` | `link` |
| `textfield` | string | `true` | `quote` |
| `path` | string | `true` | `./sitecite.json` |
| `failOnNotFound` | boolean | `false` | `false` |## Outputs
| Output | Type | Description |
| ---------- | ------- | --------------------------------------------- |
| `failures` | boolean | Wether any quote has been failed to be found |
| `results` | array | The actual results as found in the PR comment |## Expected JSON format
The expected JSON format is as follows.\
**Sitecite** looks for a `quotes` key in the root of the provided JSON.\
Then, from that **array**, it takes the data from these keys:- **URL** key from your `urlfield` input/key.
- **Quote** key from your `textfield` input/key.### Example:
```json
{
"quotes": [
{
"link": "https://policies.google.com/terms?hl=en",
"quote": "respect the rights of others"
},
{
"link": "https://www.apple.com/legal/internet-services/itunes/us/terms.html",
"quote": "Please carefully read the information presented"
}
]
}
```This means that if, for instance, your:
- `urlfield` is `tomato`, and
- your `textfield` is `textgoeshere`**sitecite** will look for this:
```json
"quotes": [
{
"tomato": "https://www.url-goes-here.io",
"textgoeshere": "Guess what goes here! Woohoo!"
}
]
```## Special thanks
Credit where credit is due!
Thanks for some functions :heart:- [Firebase Deploy Action](https://github.com/FirebaseExtended/action-hosting-deploy)
- [JS Action Template](https://github.com/actions/javascript-action)