Skip to content
This repository has been archived by the owner on Jan 24, 2025. It is now read-only.

Commit

Permalink
Update doc
Browse files Browse the repository at this point in the history
  • Loading branch information
SergioMendolia committed Nov 30, 2024
1 parent 4f6df12 commit 1619a59
Show file tree
Hide file tree
Showing 28 changed files with 209 additions and 102 deletions.
16 changes: 7 additions & 9 deletions astro.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -7,26 +7,24 @@ export default defineConfig({
base: import.meta.env.PROD?'biblioteca-doc':'',
integrations: [
starlight({
title: 'Biblioteca',
title: 'Biblioteca Docs',
social: {
github: 'https://github.com/biblioverse/biblioteca',
},
lastUpdated: true,

customCss: [
// Relative path to your custom CSS file
'./src/custom.css',
],
sidebar: [
{ label: 'Home', link: '/' },
{ label: 'Important concepts', link: '/concepts' },
{
label: 'Installation',
autogenerate: { directory: 'installing' },
},
{
label: 'User accounts',
autogenerate: { directory: 'account' },
},
{
label: 'Managing your books',
autogenerate: { directory: 'managing_books' },
label: 'User Guides',
autogenerate: { directory: 'guides' },
},
],
}),
Expand Down
3 changes: 0 additions & 3 deletions src/content/docs/account/managing-your-account.md

This file was deleted.

3 changes: 0 additions & 3 deletions src/content/docs/account/themes.md

This file was deleted.

31 changes: 0 additions & 31 deletions src/content/docs/concepts.mdx

This file was deleted.

33 changes: 33 additions & 0 deletions src/content/docs/guides/Administrator/adding-books.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
---
title: Adding books
---
import { LinkCard } from '@astrojs/starlight/components';

Books can be of multiple formats, but for now every book only has one format. Supported formats are
- epub
- pdf
- mobi
- cbr
- cbz


## Add books from command
Any book in the `public/books` folder will be added to the database when you run the `books:scan` command. If a book
already exists, its location in the filesystem will be updated, but metadata will not be overwritten.

You can periodically run this command to automatically add new books.

## Adding books from the interface
Adding books to the `public/books/consume` will list them in the `/books/new/consume/files` page.
This is useful when you want to add books to the library but don't want to add them to the database yet or to mount a
folder where books might arrive later (Maybe like a download folder 🫢).


## Verified status
When books are added to the database, their "verified" status is set to false and a link to all unverified books is
available in the menu.


<LinkCard href="/guides/administrator/verified" title="More about verified status">

</LinkCard>
52 changes: 52 additions & 0 deletions src/content/docs/guides/Administrator/commands.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
---
title: Running commands
---

Multiple helper commands are available to help you manage your library.
For simplicity, only the command is listed here, you will need to prefix it depending on your installation:


With a standard docker compose environment: `docker-compose exec php bin/console <command>`

With ddev: `ddev exec bin/console <command>`

## `app:create-admin-user`
Create an admin user. This commande takes the username and the password as parameters. You should need this command only
during the first installation, as you can create users from the interface.

## `books:check`
Check the integrity of all books.

## `books:extract-cover`
Tries to extract the cover from all books that do not have one and saves it in the `public/covers` folder.

## `books:relocate`
Relocate all books to their calculated folder. This is necessary only if you want Biblioteca to manage your library structure.

## `books:scan`
Will scan the `public/books` folder and add all books to the database. If a book already exists, it will be updated.

## `books:tag`

> First you will need to setup an openAi chatgpt key in a user's properties and run the command as this user
Then you can run the command to generate tag for all books in the library:

```bash
bin/console books:tag <user_id>
```

## `cache:clear`
Clears the cache

## `doctrine:migrations:migrate`
Executes all missing database migrations.

## `symandy:databases:backup`
Creates a sql backup of the database in the `backups folder`.

## `typesense:create`
Will re-create the search engine index.

## `typesense:import`
Will re-import all books from the database to the search engine.
6 changes: 6 additions & 0 deletions src/content/docs/guides/Administrator/filesystem.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
title: Filesystem and relocation
---

You can manage the file structure of your book by hand and run a command to have them in biblioteca, or you can ask biblioteca
to relocate them to a path format of your choice.
11 changes: 11 additions & 0 deletions src/content/docs/guides/Administrator/verified.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
title: Verified books
---

The verification status is a flag on the books. When you add a book, it will be set to false.

If you are an administrator, there is a link in the application menu listing all boks that have not been verified yet.

This feature allows you to know which books have been added recently and for whom you need to verify and update the metadata.

When the flag is checked, the edition controls are removed until you uncheck it.
28 changes: 28 additions & 0 deletions src/content/docs/guides/Developer/themes.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
---
title: Themes
---

Biblioteca is configured to be easily themeable.

By default all the template in the `templates` directory are used.

If you create a new theme,

1. Add your theme in the user form:
```php
->add('theme', ChoiceType::class, [
'label' => 'Theme',
'choices' => [
'Default' => 'default',
'Dark' => 'dark',
'Cool Theme' => 'cool',
],
])
```
2. You can overwrite all the original templates by adding a file with the same structure under your theme directory:

In `templates/themes/<your theme>/<original_folder>/<original_template_name>` you can rewrite the template with your theme markup

Every time a template is called, it will first check if the template exists in the theme's folder or fall back to the original one

3. Update the CSS asset as necessary.
3 changes: 3 additions & 0 deletions src/content/docs/guides/User/homepage.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---
title: Your homepage
---
11 changes: 11 additions & 0 deletions src/content/docs/guides/User/shelf.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
title: Simple shelves
---

Shelves are groups of books, they can be static or dynamic.

You can manually add books to static shelves and that's it.

You can also create dynamic shelves, which are based on a query. For example, you can create a shelf that contains all
books from your favorite authors that you haven't read and if you or an administrator adds books from these authors,
they will automatically be listed in there.
3 changes: 3 additions & 0 deletions src/content/docs/guides/User/sync-kobo.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---
title: Sync Kobo Devices
---
3 changes: 3 additions & 0 deletions src/content/docs/guides/User/update-settings.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---
title: Updating your preferences
---
60 changes: 27 additions & 33 deletions src/content/docs/index.mdx
Original file line number Diff line number Diff line change
@@ -1,44 +1,38 @@
---
title: Biblioteca
description: Get started building your docs site with Starlight.
title: Biblioteca Book Management
description: Welcome to the official Biblioteca Documentation page! Here you will find all the information you need to get started with and use Biblioteca.
tableOfContents: false
hero:
tagline: Managing your local library with Biblioteca
image:
file: ../../assets/houston.webp
tagline: Welcome to the official Biblioteca Documentation page! Here you will find all the information you need to get started with and use Biblioteca.
actions:
- text: Concepts
link: concepts
icon: information
- text: Install
- text: Installation Guide
link: installing/1-initial-setup
icon: right-arrow
icon: right-caret

---

import { Card, CardGrid } from '@astrojs/starlight/components';

## Welcome to Biblioteca
Welcome to the official Biblioteca Documentation page! Here you will find all the information you need to get started with
and use Biblioteca.
<CardGrid>
<Card title="What is Biblioteca?">
Biblioteca is a web application created to manage your personal library. This is an alternative to Calibre and other similar
software.
#### Why another library system?
I created Biblioteca because I wanted to have a simple and easy-to-use library manager. I was not satisfied with the existing
solutions, so I decided to make my own.
</Card>
<Card title="Features" >
- Efficient and fast search
- Tagging and summarization with ChatGPT
- Easy to use interface
- Mobile friendly
- E-INK friendly
- Synchronization with Kobo Devices
- Easily Themeable
- Dynamic Shelves
- Focused on maintaing coherent metadata how you want it
- Easy to deploy with Docker
- Customizable file system structure
</Card>

## What is Biblioteca?
Biblioteca is a web application created to manage your personal library. This is an alternative to Calibre and other similar
software.

## Why another online library?
I created Biblioteca because I wanted to have a simple and easy-to-use library manager. I was not satisfied with the existing
solutions, so I decided to make my own.

## Features
- Efficient and fast search
- Tagging and summarization with ChatGPT
- Easy to use interface
- Mobile friendly
- E-INK friendly
- Synchronization with Kobo Devices
- Easily Themeable
- Dynamic Shelves
- Focused on maintaing coherent metadata how you want it
- Easy to deploy with Docker
- Customizable file system structure
</CardGrid>
10 changes: 8 additions & 2 deletions src/content/docs/installing/2-new-versions.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,21 @@ import { Steps } from '@astrojs/starlight/components';
```bash
docker compose exec biblioteca bin/console doctrine:migration:migrate --no-interaction
```
3. Run the following command to rebuild the frontend assets:

3. If needed, update the typesense schema:
```bash
docker compose exec biblioteca npm i
docker compose exec biblioteca npm run build
```

4. If needed, update the typesense schema:

```bash
docker-compose exec biblioteca bin/console typesense:create
docker-compose exec biblioteca bin/console typesense:import
```

4. Clear the cache:
5. Clear the cache:

```bash
docker-compose exec biblioteca bin/console cache:clear
Expand Down
13 changes: 13 additions & 0 deletions src/content/docs/installing/dotenv-config.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,16 @@ KOBO_PROXY_USE_DEV=0
KOBO_PROXY_USE_EVERYWHERE=0
KOBO_PROXY_ENABLED=1
```

- `APP_ENV`: The environment the application is running in. This can be `dev` or `prod`. You should always use `prod` unless you need to debug the application.
- `APP_SECRET`: A secret key used to secure the application. Make it unique!
- `DATABASE_URL`: The URL to the database. You should not need to change this unless you are using a different database.
- `MESSENGER_TRANSPORT_DSN`: Do not change it.
- `MAILER_DSN`: Currently not used.
- `TYPESENSE_URL`: The URL to the typesense server. You should not need to change this unless you are using a different server.
- `TYPESENSE_KEY`: The key to access the typesense server. Needs to correspond to the one you set in your docker-compose file.
- `BOOK_FOLDER_NAMING_FORMAT`: The format to use to name the folders where the books are stored. You can use the following placeholders: `{authorFirst}`, `{author}`, `{title}`, `{serie}`.
- `BOOK_FILE_NAMING_FORMAT`: The format to use to name the files where the books are stored. You can use the following placeholders: `{serie}`, `{serieIndex}`, `{title}`.
- `KOBO_PROXY_USE_DEV`: If set to `1`, the kobo proxy will be used in development.
- `KOBO_PROXY_USE_EVERYWHERE`: If set to `1`, the kobo proxy will be used everywhere and all request will be forwarded to the original store.
- `KOBO_PROXY_ENABLED`: If set to `0`, the kobo proxy will be disabled.
3 changes: 0 additions & 3 deletions src/content/docs/kobosync/docker.md

This file was deleted.

3 changes: 0 additions & 3 deletions src/content/docs/managing_books/Adding Books/from-folder.md

This file was deleted.

This file was deleted.

3 changes: 0 additions & 3 deletions src/content/docs/managing_books/Shelves/dynamic.md

This file was deleted.

3 changes: 0 additions & 3 deletions src/content/docs/managing_books/Shelves/shelf.md

This file was deleted.

This file was deleted.

This file was deleted.

4 changes: 4 additions & 0 deletions src/custom.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
:root {
--sl-content-width: 90%;
--sl-text-5xl: 3.5rem;
}

0 comments on commit 1619a59

Please sign in to comment.