Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/aloisseckar/elvenipsum
Lorem ipsum with Elvish words
https://github.com/aloisseckar/elvenipsum
lorem-ipsum nuxt supabase typescript vuejs
Last synced: 25 days ago
JSON representation
Lorem ipsum with Elvish words
- Host: GitHub
- URL: https://github.com/aloisseckar/elvenipsum
- Owner: AloisSeckar
- License: unlicense
- Created: 2023-11-25T13:40:01.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2023-12-12T19:33:53.000Z (about 1 year ago)
- Last Synced: 2025-01-15T05:19:13.692Z (about 1 month ago)
- Topics: lorem-ipsum, nuxt, supabase, typescript, vuejs
- Language: TypeScript
- Homepage: https://elven-ipsum.netlify.app/
- Size: 487 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# Elven Ipsum
Lorem ipsum with Elvish wordsAvailable at https://elven-ipsum.netlify.app/
## Usage
Hit `Generate` button to get a pure random and nonsensical text built from elvish words of [Quenya](https://en.wikipedia.org/wiki/Quenya) language.You can use number inputs to adjust parameters:
* Paragraphs - total number of generated paragraphs `(min: 1, default: 5, max: 100)`
* Min sentences in paragraph - the smallest possible number of sentences (ended with `.`) in one paragraph. The actual number is randomized for each paragraph between min and max value `(min: 1, default: 5, max: 20)`
* Max sentences in paragraph - the largest possible number of sentences (ended with `.`) in one paragraph. The actual number is randomized for each paragraph between min and max value `(min: 1, default: 5, max: 20)`
* Min words in sentence - the smallest possible number of words (separated with space) in one sentence. The actual number is randomized for each sentence between min and max value `(min: 1, default: 5, max: 20)`
* Max words in sentence - the largest possible number of words (separated with space) in one sentence. The actual number is randomized for each sentence between min and max value `(min: 1, default: 5, max: 50)`Minimum value can't be set higher than respective maximum value.
## API
The service is also available directly at https://elven-ipsum.netlify.app/api/ipsum accepting both GET and POST requests.
The parameters object is of following structure:
```ts
type IpsumOptions = {
paragraphs?: number,
minSentences?: number,
maxSentences?: number,
minWords?: number,
maxWords?: number
}
```Refer to `Usage` for exact meaning and possible values.
All values are optional. Empty options, invalid values and values out of possible bounds are ignored and the default will be used. If a minimum is provided higher than respective maximum a `401` error is thrown.
### Configuring GET request
Parameters can be passed as query parameters, e.g. `/api/ipsum?paragraphs=20`.### Configuring POST request
Set request payload to an object of `IpsumOptions` data type.### Response
Providing the request is valid, data are returned as an array of strings under `paragraphs` key:
```ts
type IpsumResults = {
paragraphs: string[]
}
```
The number of results returned and their structure depends on the input parameters (or defaults).## Troubleshooting
In case something went wrong, feel free to [open an issue here](https://github.com/AloisSeckar/ElvenIpsum/issues) or contact me directly.