Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

📝 Add binary links to documentation site #404

Merged
merged 2 commits into from
Aug 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions core/src/db/entity/user/permissions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ impl UserPermission {
/// Return a list of permissions, if any, which are inherited by self
///
/// For example, UserPermission::CreateNotifier implies UserPermission::ReadNotifier
// TODO: revisit these. I am mixing patterns, e.g. manage vs explicit edit+create+delete. Pick one!
pub fn associated(&self) -> Vec<UserPermission> {
match self {
UserPermission::CreateBookClub => vec![UserPermission::AccessBookClub],
Expand Down
24 changes: 17 additions & 7 deletions docs/components/DownloadLinks.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
import { SiAndroid, SiApple, SiDocker, SiLinux, SiWindows10 } from '@icons-pack/react-simple-icons'
import {
SiAndroid,
SiApple,
SiDocker,
SiIos,
SiLinux,
SiWindows10,
} from '@icons-pack/react-simple-icons'
import clsx from 'clsx'
import { motion } from 'framer-motion'
import React from 'react'
Expand Down Expand Up @@ -40,20 +47,17 @@ export default function DownloadLinks() {

const links = [
{
disabled: true,
href: '#',
href: 'https://github.com/stumpapp/stump/releases/latest',
icon: SiLinux,
title: 'Linux',
},
{
disabled: true,
href: '#',
href: 'https://github.com/stumpapp/stump/releases/latest',
icon: SiApple,
title: 'macOS',
},
{
disabled: true,
href: '#',
href: 'https://github.com/stumpapp/stump/releases/latest',
icon: SiWindows10,
title: 'Windows',
},
Expand All @@ -68,4 +72,10 @@ const links = [
icon: SiAndroid,
title: 'Android',
},
{
disabled: true,
href: '#',
icon: SiIos,
title: 'iOS',
},
]
2 changes: 1 addition & 1 deletion docs/pages/guides/_meta.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"configuration": "Configuration",
"smart-list": "Smart Lists",
"reading-list": "Reading Lists",
"library-explorer": "Library Explorer",
"file-explorer": "File Explorer",
"opds": "OPDS",
"api": "API",
"cli": "CLI",
Expand Down
30 changes: 30 additions & 0 deletions docs/pages/guides/access-control/permissions.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Permissions

Users can be assigned permissions that grant (or deny) them access to various features or actions within Stump. This allows for granular and flexible control over who can do what within your server.

## Available Permissions

| Permission | Shorthand | Description | Associated/Included Permissions |
| ----------------- | ---------------------- | -------------------------------------------- | ---------------------------------------------------- |
| Access Book Club | `bookclub:read` | Allows access to the Book Club feature | |
| Create Book Club | `bookclub:create` | Allows creating new Book Clubs | `bookclub:read` |
| Access Smart List | `smartlist:read` | Allows access to all Smart List features | |
| Read Emailers | `emailer:read` | Allows access read configured emailers | `email:send` |
| Create Emailers | `emailer:create` | Allows creating new emailers | `emailer:read` |
| Manage Emailers | `emailer:manage` | Allows managing existing emailers | `emailer:read` |
| Send Email | `email:send` | Allows sending emails to known emails | `emailer:read` |
| Arbitrary Email | `email:arbitrary_send` | Allows sending emails to arbitrary emails | `emailer:read` |
| File Explorer | `file:explorer` | Allows access to the File Explorer feature | |
| File Upload | `file:upload` | Allows uploading files to the server | |
| File Download | `file:download` | Allows downloading files from the server | |
| Read Notifiers | `notifier:read` | Allows access to read configured notifiers | |
| Create Notifiers | `notifier:create` | Allows creating new notifiers | `notifier:read` |
| Delete Notifiers | `notifier:delete` | Allows deleting notifiers | `notifier:read` |
| Manage Notifiers | `notifier:manage` | Allows managing existing notifiers | `notifier:read`, `notifier:create`,`notifier:delete` |
| Create Library | `library:create` | Allows creating new libraries | |
| Edit Library | `library:edit` | Allows editing basic details of libraries | |
| Scan Library | `library:scan` | Allows scanning libraries for new content | |
| Manage Library | `library:manage` | Allows managing the contents of libraries | `library:edit`, `library:scan` |
| Delete Library | `library:delete` | Allows deleting libraries | `library:manage` |
| Manage Users | `user:manage` | Allows managing users and their permissions | |
| Manage Server | `server:manage` | Allows managing server settings and features | `user:manage`, `library:manage` |
25 changes: 0 additions & 25 deletions docs/pages/guides/access-control/permissions.mdx

This file was deleted.

18 changes: 17 additions & 1 deletion docs/pages/guides/api.md → docs/pages/guides/api.mdx
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# Stump's REST API
import { Callout } from 'nextra-theme-docs'

# REST API

Stump exposes a REST API that allows you to interact with your Stump server.

Expand All @@ -10,8 +12,22 @@ Stump uses server-side sessions to authenticate users. These sessions are stored

### Basic Authentication

<Callout emoji="🔐">
This functionality is only available on OPDS endpoints. You cannot authenticate with Basic
Authentication on the REST API
</Callout>

Stump supports [Basic Authentication](https://developer.mozilla.org/en-US/docs/Web/HTTP/Authentication) in order to properly support OPDS clients. Authenticating using this method will still create a server-side session for you.

### JWT Access Tokens

<Callout emoji="🚧">
This functionality is not fully implemented and subject to change. You can track the progress on
this feature in [this issue](https://github.com/stumpapp/stump/issues/219)
</Callout>

Short-lived JWT access tokens are available for API access, aimed at better enabling third-party applications and extensions to interact with Stump. While you can generate these tokens and use them to authenticate API requests, the API is still in development and subject to change. Once the API is more stable, we will provide more relevant documentation on how to generate and use these tokens.

## Swagger UI

Stump's REST API is documented using Swagger. You can access Swagger UI by visiting visiting `http(s)://your-server(:10801)/swagger-ui`. If you aren't familiar with Swagger, you can read more about it [here](https://swagger.io/). Under the hood, Stump uses [utoipa](https://github.com/juhaku/utoipa) for semi-automated Swagger generation. If you find any issues or inconsistencies with the API options available while using the Swagger UI, please open an [issue](https://github.com/stumpapp/stump/issues) outlining the problem.
Expand Down
7 changes: 6 additions & 1 deletion docs/pages/guides/book-clubs/overview.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Callout } from 'nextra-theme-docs'

# Book Club Overview
# Book Clubs

<Callout emoji="🚧">
This feature is not yet available. You can track the progress on this feature in [this
Expand All @@ -9,6 +9,11 @@ import { Callout } from 'nextra-theme-docs'
possible.
</Callout>

<Callout emoji="🔐">
This functionality is gated behind the `bookclub:read` user permission. To learn more about
permissions, see the [Permissions](/guides/access-control/permissions) guide.
</Callout>

You can use Stump to host your own book club! This guide will overview how this feature works, what functionalities are available, and walk you through the process of setting up a book club in Stump.

## Basic requirements
Expand Down
17 changes: 17 additions & 0 deletions docs/pages/guides/file-explorer.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import { Callout } from 'nextra-theme-docs'

# File Explorer

Certain entities throughout Stump have a file explorer scoped to them, allowing you to traverse the files and directories within that entity. The entities that have a file explorer are:

- **Libraries**
- **Series**

## Accessing a File Explorer

<Callout emoji="🔐">
This functionality is gated behind the `file:explorer` user permission. To learn more about
permissions, see the [Permissions](/guides/access-control/permissions) guide.
</Callout>

Generally, you can access a file explorer by clicking on the `Files` tab in an entity's page. This will render the file explorer for that entity, which effectively is just sets the root directory of the file explorer to the entity's path.
11 changes: 0 additions & 11 deletions docs/pages/guides/library-explorer.mdx

This file was deleted.

26 changes: 13 additions & 13 deletions docs/pages/guides/opds.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,26 +2,22 @@

Open Publication Distribution System ([OPDS](https://opds.io/)) is a specification for generating and serving catalogs of digital content. It is used by many applications, such as [Panels](https://panels.app/) and [Chunky Reader](https://apps.apple.com/us/app/chunky-comic-reader/id663567628).

So long as an OPDS client _properly_ implements the OPDS specification, you should be able to use it with Stump. The general structure of the URL to connect to your Stump server is:
So long as an OPDS client _properly_ implements the OPDS specification, you should be able to use it with Stump. Each OPDS client might have a different way of collecting this information during their onboarding steps. If you have any trouble using your preferred client, please open an issue on [GitHub](https://github.com/stumpapp/stump/issues/new/choose) or feel free to pop into the [Discord](https://discord.gg/63Ybb7J3as) for help. This page can be updated with your findings to help others in the future.

`http(s)://your-server(:10801)(/baseUrl)/opds/(v1.2|v2.0)/catalog`
## Supported OPDS Versions

For example, if you are running Stump on your local machine, with the default port and base URL, the URL would be:
Stump fully supports OPDS 1.2 and has experimental support for 2.0. At the time of writing, there are few clients which actually support 2.0, so it is difficult to test. If you have any experiences with OPDS 2.0, please consider updating this page with your findings!

`http://localhost:10801/opds/v1.2/catalog` or `http://localhost:10801/opds/v2.0/catalog`
### OPDS 1.2

Each OPDS client might have a different way of collecting this information during their onboarding steps. If you have any trouble using your preferred client, please open an issue on [GitHub](https://github.com/stumpapp/stump/issues/new/choose) or feel free to pop into the [Discord](https://discord.gg/63Ybb7J3as) for help. This page can be updated with your findings to help others in the future.
The general structure of the URL to connect to your Stump server is:

## Supported OPDS versions
`http(s)://your-server(:10801)(/baseUrl)/opds/v1.2/catalog`

Stump fully supports OPDS 1.2, and has experimental support for 2.0. At the time of writing, there are few clients which actually support 2.0, so it is difficult to test. If you have any experiences with OPDS 2.0, please consider updating this page with your findings!

## OPDS 1.2
#### Tested Clients

> **Note:** The ✨ emoji indicates a client which the developer of Stump personally uses

### Tested Clients

The following clients have been tested with Stump:

| OS | Application | Page Streaming | Issues/Notes |
Expand All @@ -33,9 +29,13 @@ The following clients have been tested with Stump:

If you have any experiences, good or bad, using any of these clients or another client not listed here, please consider updating this page with your findings.

## OPDS 2.0
### OPDS 2.0

The general structure of the URL to connect to your Stump server is:

`http(s)://your-server(:10801)(/baseUrl)/opds/v2.0/catalog`

### Tested Clients
#### Tested Clients

The following clients have been tested with Stump:

Expand Down
4 changes: 3 additions & 1 deletion docs/pages/guides/reading-list.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@ import { Callout } from 'nextra-theme-docs'
# Reading Lists

<Callout emoji="🚧">
This functionality is not yet fully implemented. Check back soon for updates.
This feature is not yet available. You can track the progress on this feature in [this issue](
https://github.com/stumpapp/stump/issues/37 ). If you'd like to help out, please comment on the
issue!
</Callout>

Reading lists are a way to group a set of books together. They were originally designed for feature parity with ComicRack's reading lists, but they are equally useful for any other categorical grouping of books:
Expand Down
4 changes: 2 additions & 2 deletions docs/pages/guides/smart-list.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { Callout } from 'nextra-theme-docs'
editing them, and the internal structures are subject to change
</Callout>

Smart lists are stored combinations of filters that can be applied to your database, generating pseudo-lists on the fly.
Smart lists are stored combinations of filters that can be applied to your database, generating pseudo-lists on the fly. They are a powerful tool for organizing your books in a way that makes sense to you.

## Components

Expand Down Expand Up @@ -58,7 +58,7 @@ While interacting with a smart list on the UI, you can manipulate the view to yo

By default, any changes you make won't be persisted. However, the UI will detect and allow you to save any adjustments as a view. This view will then be available to you in the future, along with any other views you create. If you have a view selected, the changes will provide you with the additional option of updating the view.

## Creating a smart list
## Creating a Smart List

Currently, the only way to create a smart list is to use the Stump API directly. You can use the swagger UI to do this, or use a tool like Postman.

Expand Down
8 changes: 3 additions & 5 deletions docs/pages/installation/getting-started.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@ import { Callout } from 'nextra-theme-docs'
# Getting Started

<Callout emoji="🚧">
This documentation is under active development. Please keep that in mind while using this guide.
This documentation is under active development. Please keep that in mind while using this guide
and feel free to [open an issue]( https://github.com/stumpapp/stump/issues/new/choose) if you
encounter any problems or inconsistencies
</Callout>

## Demo
Expand All @@ -24,7 +26,3 @@ There are three ways to install Stump:
3. Install directly from [source](/installation/source)

If you go through any of these installation methods and experience issues, or just want to improve the existing documentation, please feel free to [open an issue](https://github.com/stumpapp/stump/issues/new).

<Callout emoji="🚧">
At the time of writing, only the Docker installation is _readily_ available.
</Callout>
Loading