Merge branch 'main' into production

This commit is contained in:
Mouse Reeve 2021-03-20 20:47:53 -07:00
commit 94d18f6c24
28 changed files with 586 additions and 380 deletions

View file

@ -1,2 +1,2 @@
[run] [run]
omit = */test*,celerywyrm*,bookwyrm/migrations/* omit = */test*,celerywyrm*,bookwyrm/migrations/*

View file

@ -4,4 +4,4 @@ __pycache__
*.pyd *.pyd
.git .git
.github .github
.pytest* .pytest*

31
.editorconfig Normal file
View file

@ -0,0 +1,31 @@
# @see https://editorconfig.org/
# top-most EditorConfig file
root = true
# Unix-style newlines with a newline ending every file
[*]
charset = utf-8
end_of_line = lf
indent_size = 4
indent_style = space
insert_final_newline = true
max_line_length = 100
# C-style doc comments
block_comment_start = /*
block_comment = *
block_comment_end = */
[{bw-dev,fr-dev,LICENSE}]
max_line_length = off
[*.{csv,json,html,md,po,py,svg,tsv}]
max_line_length = off
[*.{md,markdown}]
trim_trailing_whitespace = false
[*.{yml,yaml}]
indent_size = 2
max_line_length = off

View file

@ -1,4 +1,4 @@
name: Lint name: Lint Python
on: [push, pull_request] on: [push, pull_request]

21
.github/workflows/linters-global.yaml vendored Normal file
View file

@ -0,0 +1,21 @@
# @url https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions
name: Lint Project
on:
push:
branches: [ main, ci ]
pull_request:
branches: [ main, ci ]
jobs:
linters:
name: linters
runs-on: ubuntu-20.04
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
- name: EditorConfig
uses: greut/eclint-action@v0

View file

@ -23,13 +23,13 @@ include:
Examples of unacceptable behavior by participants include: Examples of unacceptable behavior by participants include:
* The use of sexualized language or imagery and unwelcome sexual attention or * The use of sexualized language or imagery and unwelcome sexual attention or
advances advances
* Trolling, insulting/derogatory comments, and personal or political attacks * Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment * Public or private harassment
* Publishing others' private information, such as a physical or electronic * Publishing others' private information, such as a physical or electronic
address, without explicit permission address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a * Other conduct which could reasonably be considered inappropriate in a
professional setting professional setting
## Our Responsibilities ## Our Responsibilities

208
README.md
View file

@ -6,12 +6,12 @@ Social reading and reviewing, decentralized with ActivityPub
- [Joining BookWyrm](#joining-bookwyrm) - [Joining BookWyrm](#joining-bookwyrm)
- [Contributing](#contributing) - [Contributing](#contributing)
- [About BookWyrm](#about-bookwyrm) - [About BookWyrm](#about-bookwyrm)
- [What it is and isn't](#what-it-is-and-isnt) - [What it is and isn't](#what-it-is-and-isnt)
- [The role of federation](#the-role-of-federation) - [The role of federation](#the-role-of-federation)
- [Features](#features) - [Features](#features)
- [Setting up the developer environment](#setting-up-the-developer-environment) - [Setting up the developer environment](#setting-up-the-developer-environment)
- [Installing in Production](#installing-in-production) - [Installing in Production](#installing-in-production)
- [Book data](#book-data) - [Book data](#book-data)
## Joining BookWyrm ## Joining BookWyrm
BookWyrm is still a young piece of software, and isn't at the level of stability and feature-richness that you'd find in a production-ready application. But it does what it says on the box! If you'd like to join an instance, you can check out the [instances](https://github.com/mouse-reeve/bookwyrm/blob/main/instances.md) list. BookWyrm is still a young piece of software, and isn't at the level of stability and feature-richness that you'd find in a production-ready application. But it does what it says on the box! If you'd like to join an instance, you can check out the [instances](https://github.com/mouse-reeve/bookwyrm/blob/main/instances.md) list.
@ -47,49 +47,49 @@ Federation makes it possible to have small, self-determining communities, in con
### Features ### Features
Since the project is still in its early stages, the features are growing every day, and there is plenty of room for suggestions and ideas. Open an [issue](https://github.com/mouse-reeve/bookwyrm/issues) to get the conversation going! Since the project is still in its early stages, the features are growing every day, and there is plenty of room for suggestions and ideas. Open an [issue](https://github.com/mouse-reeve/bookwyrm/issues) to get the conversation going!
- Posting about books - Posting about books
- Compose reviews, with or without ratings, which are aggregated in the book page - Compose reviews, with or without ratings, which are aggregated in the book page
- Compose other kinds of statuses about books, such as: - Compose other kinds of statuses about books, such as:
- Comments on a book - Comments on a book
- Quotes or excerpts - Quotes or excerpts
- Reply to statuses - Reply to statuses
- View aggregate reviews of a book across connected BookWyrm instances - View aggregate reviews of a book across connected BookWyrm instances
- Differentiate local and federated reviews and rating in your activity feed - Differentiate local and federated reviews and rating in your activity feed
- Track reading activity - Track reading activity
- Shelve books on default "to-read," "currently reading," and "read" shelves - Shelve books on default "to-read," "currently reading," and "read" shelves
- Create custom shelves - Create custom shelves
- Store started reading/finished reading dates, as well as progress updates along the way - Store started reading/finished reading dates, as well as progress updates along the way
- Update followers about reading activity (optionally, and with granular privacy controls) - Update followers about reading activity (optionally, and with granular privacy controls)
- Create lists of books which can be open to submissions from anyone, curated, or only edited by the creator - Create lists of books which can be open to submissions from anyone, curated, or only edited by the creator
- Federation with ActivityPub - Federation with ActivityPub
- Broadcast and receive user statuses and activity - Broadcast and receive user statuses and activity
- Share book data between instances to create a networked database of metadata - Share book data between instances to create a networked database of metadata
- Identify shared books across instances and aggregate related content - Identify shared books across instances and aggregate related content
- Follow and interact with users across BookWyrm instances - Follow and interact with users across BookWyrm instances
- Inter-operate with non-BookWyrm ActivityPub services (currently, Mastodon is supported) - Inter-operate with non-BookWyrm ActivityPub services (currently, Mastodon is supported)
- Granular privacy controls - Granular privacy controls
- Private, followers-only, and public privacy levels for posting, shelves, and lists - Private, followers-only, and public privacy levels for posting, shelves, and lists
- Option for users to manually approve followers - Option for users to manually approve followers
- Allow blocking and flagging for moderation - Allow blocking and flagging for moderation
### The Tech Stack ### The Tech Stack
Web backend Web backend
- [Django](https://www.djangoproject.com/) web server - [Django](https://www.djangoproject.com/) web server
- [PostgreSQL](https://www.postgresql.org/) database - [PostgreSQL](https://www.postgresql.org/) database
- [ActivityPub](http://activitypub.rocks/) federation - [ActivityPub](http://activitypub.rocks/) federation
- [Celery](http://celeryproject.org/) task queuing - [Celery](http://celeryproject.org/) task queuing
- [Redis](https://redis.io/) task backend - [Redis](https://redis.io/) task backend
Front end Front end
- Django templates - Django templates
- [Bulma.io](https://bulma.io/) css framework - [Bulma.io](https://bulma.io/) css framework
- Vanilla JavaScript, in moderation - Vanilla JavaScript, in moderation
Deployment Deployment
- [Docker](https://www.docker.com/) and docker-compose - [Docker](https://www.docker.com/) and docker-compose
- [Gunicorn](https://gunicorn.org/) web runner - [Gunicorn](https://gunicorn.org/) web runner
- [Flower](https://github.com/mher/flower) celery monitoring - [Flower](https://github.com/mher/flower) celery monitoring
- [Nginx](https://nginx.org/en/) HTTP server - [Nginx](https://nginx.org/en/) HTTP server
## Setting up the developer environment ## Setting up the developer environment
@ -147,10 +147,10 @@ You can add the `-l <language code>` to only compile one language. When you refr
This project is still young and isn't, at the moment, very stable, so please proceed with caution when running in production. This project is still young and isn't, at the moment, very stable, so please proceed with caution when running in production.
### Server setup ### Server setup
- Get a domain name and set up DNS for your server - Get a domain name and set up DNS for your server
- Set your server up with appropriate firewalls for running a web application (this instruction set is tested against Ubuntu 20.04) - Set your server up with appropriate firewalls for running a web application (this instruction set is tested against Ubuntu 20.04)
- Set up an email service (such as mailgun) and the appropriate SMTP/DNS settings - Set up an email service (such as mailgun) and the appropriate SMTP/DNS settings
- Install Docker and docker-compose - Install Docker and docker-compose
### Install and configure BookWyrm ### Install and configure BookWyrm
@ -158,37 +158,55 @@ The `production` branch of BookWyrm contains a number of tools not on the `main`
Instructions for running BookWyrm in production: Instructions for running BookWyrm in production:
- Get the application code: - Get the application code:
`git clone git@github.com:mouse-reeve/bookwyrm.git` `git clone git@github.com:mouse-reeve/bookwyrm.git`
- Switch to the `production` branch - Switch to the `production` branch
`git checkout production` `git checkout production`
- Create your environment variables file - Create your environment variables file
`cp .env.example .env` `cp .env.example .env`
- Add your domain, email address, SMTP credentials - Add your domain, email address, SMTP credentials
- Set a secure redis password and secret key - Set a secure redis password and secret key
- Set a secure database password for postgres - Set a secure database password for postgres
- Update your nginx configuration in `nginx/default.conf` - Update your nginx configuration in `nginx/default.conf`
- Replace `your-domain.com` with your domain name - Replace `your-domain.com` with your domain name
- If you aren't using the `www` subdomain, remove the www.your-domain.com version of the domain from the `server_name` in the first server block in `nginx/default.conf` and remove the `-d www.${DOMAIN}` flag at the end of the `certbot` command in `docker-compose.yml`. - Run the application (this should also set up a Certbot ssl cert for your domain) with
- If you are running another web-server on your host machine, you will need to follow the [reverse-proxy instructions](#running-bookwyrm-behind-a-reverse-proxy) `docker-compose up --build`, and make sure all the images build successfully
- Run the application (this should also set up a Certbot ssl cert for your domain) with - When docker has built successfully, stop the process with `CTRL-C`
`docker-compose up --build`, and make sure all the images build successfully - Comment out the `command: certonly...` line in `docker-compose.yml`
- Run docker-compose in the background with: `docker-compose up -d`
- Initialize the database with: `./bw-dev initdb`
- Set up schedule backups with cron that runs that `docker-compose exec db pg_dump -U <databasename>` and saves the backup to a safe location
- Get the application code:
`git clone git@github.com:mouse-reeve/bookwyrm.git`
- Switch to the `production` branch
`git checkout production`
- Create your environment variables file
`cp .env.example .env`
- Add your domain, email address, SMTP credentials
- Set a secure redis password and secret key
- Set a secure database password for postgres
- Update your nginx configuration in `nginx/default.conf`
- Replace `your-domain.com` with your domain name
- If you aren't using the `www` subdomain, remove the www.your-domain.com version of the domain from the `server_name` in the first server block in `nginx/default.conf` and remove the `-d www.${DOMAIN}` flag at the end of the `certbot` command in `docker-compose.yml`.
- If you are running another web-server on your host machine, you will need to follow the [reverse-proxy instructions](#running-bookwyrm-behind-a-reverse-proxy)
- Run the application (this should also set up a Certbot ssl cert for your domain) with
`docker-compose up --build`, and make sure all the images build successfully
- If you are running other services on your host machine, you may run into errors where services fail when attempting to bind to a port. - If you are running other services on your host machine, you may run into errors where services fail when attempting to bind to a port.
See the [troubleshooting guide](#port-conflicts) for advice on resolving this. See the [troubleshooting guide](#port-conflicts) for advice on resolving this.
- When docker has built successfully, stop the process with `CTRL-C` - When docker has built successfully, stop the process with `CTRL-C`
- Comment out the `command: certonly...` line in `docker-compose.yml`, and uncomment the following line (`command: renew ...`) so that the certificate will be automatically renewed. - Comment out the `command: certonly...` line in `docker-compose.yml`, and uncomment the following line (`command: renew ...`) so that the certificate will be automatically renewed.
- Uncomment the https redirect and `server` block in `nginx/default.conf` (lines 17-48). - Uncomment the https redirect and `server` block in `nginx/default.conf` (lines 17-48).
- Run docker-compose in the background with: `docker-compose up -d` - Run docker-compose in the background with: `docker-compose up -d`
- Initialize the database with: `./bw-dev initdb` - Initialize the database with: `./bw-dev initdb`
Congrats! You did it, go to your domain and enjoy the fruits of your labors. Congrats! You did it, go to your domain and enjoy the fruits of your labors.
### Configure your instance ### Configure your instance
- Register a user account in the application UI - Register a user account in the application UI
- Make your account a superuser (warning: do *not* use django's `createsuperuser` command) - Make your account a superuser (warning: do *not* use django's `createsuperuser` command)
- On your server, open the django shell - On your server, open the django shell
`./bw-dev shell` `./bw-dev shell`
- Load your user and make it a superuser - Load your user and make it a superuser
```python ```python
from bookwyrm import models from bookwyrm import models
user = models.User.objects.get(id=1) user = models.User.objects.get(id=1)
@ -196,17 +214,17 @@ Congrats! You did it, go to your domain and enjoy the fruits of your labors.
user.is_superuser = True user.is_superuser = True
user.save() user.save()
``` ```
- Go to the site settings (`/settings/site-settings` on your domain) and configure your instance name, description, code of conduct, and toggle whether registration is open on your instance - Go to the site settings (`/settings/site-settings` on your domain) and configure your instance name, description, code of conduct, and toggle whether registration is open on your instance
## Book data ## Book data
The application is set up to share book and author data between instances, and get book data from arbitrary outside sources. Right now, the only connector is to OpenLibrary, but other connectors could be written. The application is set up to share book and author data between instances, and get book data from arbitrary outside sources. Right now, the only connector is to OpenLibrary, but other connectors could be written.
There are three concepts in the book data model: There are three concepts in the book data model:
- `Book`, an abstract, high-level concept that could mean either a `Work` or an `Edition`. No data is saved as a `Book`, it serves as shared model for `Work` and `Edition` - `Book`, an abstract, high-level concept that could mean either a `Work` or an `Edition`. No data is saved as a `Book`, it serves as shared model for `Work` and `Edition`
- `Work`, the theoretical umbrella concept of a book that encompasses every edition of the book, and - `Work`, the theoretical umbrella concept of a book that encompasses every edition of the book, and
- `Edition`, a concrete, actually published version of a book - `Edition`, a concrete, actually published version of a book
Whenever a user interacts with a book, they are interacting with a specific edition. Every work has a default edition, but the user can select other editions. Reviews aggregated for all editions of a work when you view an edition's page. Whenever a user interacts with a book, they are interacting with a specific edition. Every work has a default edition, but the user can select other editions. Reviews aggregated for all editions of a work when you view an edition's page.
### Backups ### Backups
@ -216,12 +234,12 @@ Backups are named `backup__%Y-%m-%d.sql`.
The db service has an optional script for periodically pruning the backups directory so that all recent daily backups are kept, but for older backups, only weekly or monthly backups are kept. The db service has an optional script for periodically pruning the backups directory so that all recent daily backups are kept, but for older backups, only weekly or monthly backups are kept.
To enable this script: To enable this script:
- Uncomment the final line in `postgres-docker/cronfile` - Uncomment the final line in `postgres-docker/cronfile`
- rebuild your instance `docker-compose up --build` - rebuild your instance `docker-compose up --build`
You can copy backups from the backups volume to your host machine with `docker cp`: You can copy backups from the backups volume to your host machine with `docker cp`:
- Run `docker-compose ps` to confirm the db service's full name (it's probably `bookwyrm_db_1`. - Run `docker-compose ps` to confirm the db service's full name (it's probably `bookwyrm_db_1`.
- Run `docker cp <container_name>:/backups <host machine path>` - Run `docker cp <container_name>:/backups <host machine path>`
### Port Conflicts ### Port Conflicts
@ -230,15 +248,15 @@ This means that, depending on what else you are running on your host machine, yo
If this occurs, you will need to change your configuration to run services on different ports. If this occurs, you will need to change your configuration to run services on different ports.
This may require one or more changes the following files: This may require one or more changes the following files:
- `docker-compose.yml` - `docker-compose.yml`
- `nginx/default.conf` - `nginx/default.conf`
- `.env` (You create this file yourself during setup) - `.env` (You create this file yourself during setup)
E.g., If you need Redis to run on a different port: E.g., If you need Redis to run on a different port:
- In `docker-compose.yml`: - In `docker-compose.yml`:
- In `services` -> `redis` -> `command`, add `--port YOUR_PORT` to the command - In `services` -> `redis` -> `command`, add `--port YOUR_PORT` to the command
- In `services` -> `redis` -> `ports`, change `6379:6379` to your port - In `services` -> `redis` -> `ports`, change `6379:6379` to your port
- In `.env`, update `REDIS_PORT` - In `.env`, update `REDIS_PORT`
If you are already running a web-server on your machine, you will need to set up a reverse-proxy. If you are already running a web-server on your machine, you will need to set up a reverse-proxy.
@ -250,11 +268,11 @@ The default BookWyrm configuration already has an nginx server that proxies requ
The static files are stored in a Docker volume that several BookWyrm services access, so it is not recommended to remove this server completely. The static files are stored in a Docker volume that several BookWyrm services access, so it is not recommended to remove this server completely.
To run BookWyrm behind a reverse-proxy, make the following changes: To run BookWyrm behind a reverse-proxy, make the following changes:
- In `nginx/default.conf`: - In `nginx/default.conf`:
- Comment out the two default servers - Comment out the two default servers
- Uncomment the server labeled Reverse-Proxy server - Uncomment the server labeled Reverse-Proxy server
- Replace `your-domain.com` with your domain name - Replace `your-domain.com` with your domain name
- In `docker-compose.yml`: - In `docker-compose.yml`:
- In `services` -> `nginx` -> `ports`, comment out the default ports and add `- 8001:8001` - In `services` -> `nginx` -> `ports`, comment out the default ports and add `- 8001:8001`
- In `services` -> `nginx` -> `volumes`, comment out the two volumes that begin `./certbot/` - In `services` -> `nginx` -> `volumes`, comment out the two volumes that begin `./certbot/`
- In `services`, comment out the `certbot` service - In `services`, comment out the `certbot` service
@ -270,35 +288,35 @@ Before you can set up nginx, you will need to locate your nginx configuration di
See [nginx's guide](http://nginx.org/en/docs/beginners_guide.html) for details. See [nginx's guide](http://nginx.org/en/docs/beginners_guide.html) for details.
To set up your server: To set up your server:
- In you `nginx.conf` file, ensure that `include servers/*;` isn't commented out. - In you `nginx.conf` file, ensure that `include servers/*;` isn't commented out.
- In your nginx `servers` directory, create a new file named after your domain containing the following information: - In your nginx `servers` directory, create a new file named after your domain containing the following information:
```nginx ```nginx
server { server {
server_name your-domain.com www.your-domain.com; server_name your-domain.com www.your-domain.com;
location / { location / {
proxy_pass http://localhost:8000; proxy_pass http://localhost:8000;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $host; proxy_set_header Host $host;
} }
location /images/ { location /images/ {
proxy_pass http://localhost:8001; proxy_pass http://localhost:8001;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $host; proxy_set_header Host $host;
} }
location /static/ { location /static/ {
proxy_pass http://localhost:8001; proxy_pass http://localhost:8001;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $host; proxy_set_header Host $host;
} }
listen [::]:80 ssl; listen [::]:80 ssl;
listen 80 ssl; listen 80 ssl;
} }
``` ```
- run `sudo certbot run --nginx --email YOUR_EMAIL -d your-domain.com -d www.your-domain.com` - run `sudo certbot run --nginx --email YOUR_EMAIL -d your-domain.com -d www.your-domain.com`
- restart nginx - restart nginx
If everything worked correctly, your BookWyrm instance should now be externally accessible. If everything worked correctly, your BookWyrm instance should now be externally accessible.

View file

@ -76,7 +76,16 @@ class ReviewForm(CustomForm):
class CommentForm(CustomForm): class CommentForm(CustomForm):
class Meta: class Meta:
model = models.Comment model = models.Comment
fields = ["user", "book", "content", "content_warning", "sensitive", "privacy"] fields = [
"user",
"book",
"content",
"content_warning",
"sensitive",
"privacy",
"progress",
"progress_mode",
]
class QuotationForm(CustomForm): class QuotationForm(CustomForm):

View file

@ -0,0 +1,34 @@
# Generated by Django 3.1.6 on 2021-03-21 01:01
import django.core.validators
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
("bookwyrm", "0054_auto_20210319_1942"),
]
operations = [
migrations.AddField(
model_name="comment",
name="progress",
field=models.IntegerField(
blank=True,
null=True,
validators=[django.core.validators.MinValueValidator(0)],
),
),
migrations.AddField(
model_name="comment",
name="progress_mode",
field=models.CharField(
blank=True,
choices=[("PG", "page"), ("PCT", "percent")],
default="PG",
max_length=3,
null=True,
),
),
]

View file

@ -7,6 +7,8 @@ from .base_model import BookWyrmModel
class ProgressMode(models.TextChoices): class ProgressMode(models.TextChoices):
""" types of prgress available """
PAGE = "PG", "page" PAGE = "PG", "page"
PERCENT = "PCT", "percent" PERCENT = "PCT", "percent"
@ -32,10 +34,12 @@ class ReadThrough(BookWyrmModel):
super().save(*args, **kwargs) super().save(*args, **kwargs)
def create_update(self): def create_update(self):
""" add update to the readthrough """
if self.progress: if self.progress:
return self.progressupdate_set.create( return self.progressupdate_set.create(
user=self.user, progress=self.progress, mode=self.progress_mode user=self.user, progress=self.progress, mode=self.progress_mode
) )
return None
class ProgressUpdate(BookWyrmModel): class ProgressUpdate(BookWyrmModel):

View file

@ -14,6 +14,7 @@ from .activitypub_mixin import ActivitypubMixin, ActivityMixin
from .activitypub_mixin import OrderedCollectionPageMixin from .activitypub_mixin import OrderedCollectionPageMixin
from .base_model import BookWyrmModel from .base_model import BookWyrmModel
from .fields import image_serializer from .fields import image_serializer
from .readthrough import ProgressMode
from . import fields from . import fields
@ -229,6 +230,19 @@ class Comment(Status):
"Edition", on_delete=models.PROTECT, activitypub_field="inReplyToBook" "Edition", on_delete=models.PROTECT, activitypub_field="inReplyToBook"
) )
# this is it's own field instead of a foreign key to the progress update
# so that the update can be deleted without impacting the status
progress = models.IntegerField(
validators=[MinValueValidator(0)], null=True, blank=True
)
progress_mode = models.CharField(
max_length=3,
choices=ProgressMode.choices,
default=ProgressMode.PAGE,
null=True,
blank=True,
)
@property @property
def pure_content(self): def pure_content(self):
""" indicate the book in question for mastodon (or w/e) users """ """ indicate the book in question for mastodon (or w/e) users """

View file

@ -0,0 +1,4 @@
# @see https://editorconfig.org/
[*.svg]
insert_final_newline = unset

View file

@ -14,9 +14,6 @@ html {
.card { .card {
overflow: visible; overflow: visible;
} }
.card-header-title {
overflow: hidden;
}
/* --- SHELVING --- */ /* --- SHELVING --- */
.shelf-option:disabled > *::after { .shelf-option:disabled > *::after {
@ -70,8 +67,8 @@ html {
content: '\e9d9'; content: '\e9d9';
} }
.form-rate-stars label.icon:hover:before { .form-rate-stars label.icon:hover:before {
content: '\e9d9'; content: '\e9d9';
} }
.form-rate-stars label.icon:hover ~ label.icon:before{ .form-rate-stars label.icon:hover ~ label.icon:before{
content: '\e9d7'; content: '\e9d7';
} }

View file

@ -1,153 +1,153 @@
@font-face { @font-face {
font-family: 'icomoon'; font-family: 'icomoon';
src: url('fonts/icomoon.eot?n5x55'); src: url('fonts/icomoon.eot?n5x55');
src: url('fonts/icomoon.eot?n5x55#iefix') format('embedded-opentype'), src: url('fonts/icomoon.eot?n5x55#iefix') format('embedded-opentype'),
url('fonts/icomoon.ttf?n5x55') format('truetype'), url('fonts/icomoon.ttf?n5x55') format('truetype'),
url('fonts/icomoon.woff?n5x55') format('woff'), url('fonts/icomoon.woff?n5x55') format('woff'),
url('fonts/icomoon.svg?n5x55#icomoon') format('svg'); url('fonts/icomoon.svg?n5x55#icomoon') format('svg');
font-weight: normal; font-weight: normal;
font-style: normal; font-style: normal;
font-display: block; font-display: block;
} }
[class^="icon-"], [class*=" icon-"] { [class^="icon-"], [class*=" icon-"] {
/* use !important to prevent issues with browser extensions that change fonts */ /* use !important to prevent issues with browser extensions that change fonts */
font-family: 'icomoon' !important; font-family: 'icomoon' !important;
speak: never; speak: never;
font-style: normal; font-style: normal;
font-weight: normal; font-weight: normal;
font-variant: normal; font-variant: normal;
text-transform: none; text-transform: none;
line-height: 1; line-height: 1;
/* Better Font Rendering =========== */ /* Better Font Rendering =========== */
-webkit-font-smoothing: antialiased; -webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale; -moz-osx-font-smoothing: grayscale;
} }
.icon-graphic-heart:before { .icon-graphic-heart:before {
content: "\e91e"; content: "\e91e";
} }
.icon-graphic-paperplane:before { .icon-graphic-paperplane:before {
content: "\e91f"; content: "\e91f";
} }
.icon-graphic-banknote:before { .icon-graphic-banknote:before {
content: "\e920"; content: "\e920";
} }
.icon-stars:before { .icon-stars:before {
content: "\e91a"; content: "\e91a";
} }
.icon-warning:before { .icon-warning:before {
content: "\e91b"; content: "\e91b";
} }
.icon-book:before { .icon-book:before {
content: "\e900"; content: "\e900";
} }
.icon-bookmark:before { .icon-bookmark:before {
content: "\e91c"; content: "\e91c";
} }
.icon-rss:before { .icon-rss:before {
content: "\e91d"; content: "\e91d";
} }
.icon-envelope:before { .icon-envelope:before {
content: "\e901"; content: "\e901";
} }
.icon-arrow-right:before { .icon-arrow-right:before {
content: "\e902"; content: "\e902";
} }
.icon-bell:before { .icon-bell:before {
content: "\e903"; content: "\e903";
} }
.icon-x:before { .icon-x:before {
content: "\e904"; content: "\e904";
} }
.icon-quote-close:before { .icon-quote-close:before {
content: "\e905"; content: "\e905";
} }
.icon-quote-open:before { .icon-quote-open:before {
content: "\e906"; content: "\e906";
} }
.icon-image:before { .icon-image:before {
content: "\e907"; content: "\e907";
} }
.icon-pencil:before { .icon-pencil:before {
content: "\e908"; content: "\e908";
} }
.icon-list:before { .icon-list:before {
content: "\e909"; content: "\e909";
} }
.icon-unlock:before { .icon-unlock:before {
content: "\e90a"; content: "\e90a";
} }
.icon-unlisted:before { .icon-unlisted:before {
content: "\e90a"; content: "\e90a";
} }
.icon-globe:before { .icon-globe:before {
content: "\e90b"; content: "\e90b";
} }
.icon-public:before { .icon-public:before {
content: "\e90b"; content: "\e90b";
} }
.icon-lock:before { .icon-lock:before {
content: "\e90c"; content: "\e90c";
} }
.icon-followers:before { .icon-followers:before {
content: "\e90c"; content: "\e90c";
} }
.icon-chain-broken:before { .icon-chain-broken:before {
content: "\e90d"; content: "\e90d";
} }
.icon-chain:before { .icon-chain:before {
content: "\e90e"; content: "\e90e";
} }
.icon-comments:before { .icon-comments:before {
content: "\e90f"; content: "\e90f";
} }
.icon-comment:before { .icon-comment:before {
content: "\e910"; content: "\e910";
} }
.icon-boost:before { .icon-boost:before {
content: "\e911"; content: "\e911";
} }
.icon-arrow-left:before { .icon-arrow-left:before {
content: "\e912"; content: "\e912";
} }
.icon-arrow-up:before { .icon-arrow-up:before {
content: "\e913"; content: "\e913";
} }
.icon-arrow-down:before { .icon-arrow-down:before {
content: "\e914"; content: "\e914";
} }
.icon-home:before { .icon-home:before {
content: "\e915"; content: "\e915";
} }
.icon-local:before { .icon-local:before {
content: "\e916"; content: "\e916";
} }
.icon-dots-three:before { .icon-dots-three:before {
content: "\e917"; content: "\e917";
} }
.icon-check:before { .icon-check:before {
content: "\e918"; content: "\e918";
} }
.icon-dots-three-vertical:before { .icon-dots-three-vertical:before {
content: "\e919"; content: "\e919";
} }
.icon-search:before { .icon-search:before {
content: "\e986"; content: "\e986";
} }
.icon-star-empty:before { .icon-star-empty:before {
content: "\e9d7"; content: "\e9d7";
} }
.icon-star-half:before { .icon-star-half:before {
content: "\e9d8"; content: "\e9d8";
} }
.icon-star-full:before { .icon-star-full:before {
content: "\e9d9"; content: "\e9d9";
} }
.icon-heart:before { .icon-heart:before {
content: "\e9da"; content: "\e9da";
} }
.icon-plus:before { .icon-plus:before {
content: "\ea0a"; content: "\ea0a";
} }

View file

@ -59,7 +59,9 @@ class TabGroup {
} }
initPanels() { initPanels() {
let selectedPanelId = this.tablist.querySelector('[role="tab"][aria-selected="true"]').getAttribute("aria-controls"); let selectedPanelId = this.tablist
.querySelector('[role="tab"][aria-selected="true"]')
.getAttribute("aria-controls");
for(let panel of this.panels) { for(let panel of this.panels) {
if(panel.getAttribute("id") !== selectedPanelId) { if(panel.getAttribute("id") !== selectedPanelId) {
panel.setAttribute("hidden", ""); panel.setAttribute("hidden", "");

View file

@ -47,20 +47,18 @@
{% for book in shelf.books %} {% for book in shelf.books %}
<div class="suggested-tabs card" role="tabpanel" id="book-{{ book.id }}"{% if shelf_counter != 1 or not forloop.first %} hidden{% endif %} aria-labelledby="tab-book-{{ book.id }}"> <div class="suggested-tabs card" role="tabpanel" id="book-{{ book.id }}"{% if shelf_counter != 1 or not forloop.first %} hidden{% endif %} aria-labelledby="tab-book-{{ book.id }}">
<div class="card-header"> <div class="card-header">
<p class="card-header-title"> <div class="card-header-title">
<span>{% include 'snippets/book_titleby.html' with book=book %}</span> <div>
</p> <p class="mb-2">{% include 'snippets/book_titleby.html' with book=book %}</p>
{% include 'snippets/shelve_button/shelve_button.html' with book=book %}
</div>
</div>
<div class="card-header-icon is-hidden-tablet"> <div class="card-header-icon is-hidden-tablet">
{% trans "Close" as button_text %} {% trans "Close" as button_text %}
{% include 'snippets/toggle/toggle_button.html' with label=button_text controls_text="book" controls_uid=book.id class="delete" nonbutton=True pressed=True %} {% include 'snippets/toggle/toggle_button.html' with label=button_text controls_text="book" controls_uid=book.id class="delete" nonbutton=True pressed=True %}
</div> </div>
</div> </div>
<div class="card-content"> <div class="card-content">
{% include 'snippets/shelve_button/shelve_button.html' with book=book %}
{% active_shelf book as active_shelf %}
{% if active_shelf.shelf.identifier == 'reading' and book.latest_readthrough %}
{% include 'snippets/progress_update.html' with readthrough=book.latest_readthrough %}
{% endif %}
{% include 'snippets/create_status.html' with book=book %} {% include 'snippets/create_status.html' with book=book %}
</div> </div>
</div> </div>

View file

@ -11,16 +11,16 @@
{% csrf_token %} {% csrf_token %}
<label class="label" for="source"> <label class="label" for="source">
<p>{% trans "Data source" %}</p> <p>{% trans "Data source" %}</p>
<div class="select {{ class }}"> <div class="select {{ class }}">
<select name="source" id="source"> <select name="source" id="source">
<option value="GoodReads" {% if current == 'GoodReads' %}selected{% endif %}> <option value="GoodReads" {% if current == 'GoodReads' %}selected{% endif %}>
GoodReads GoodReads
</option> </option>
<option value="LibraryThing" {% if current == 'LibraryThing' %}selected{% endif %}> <option value="LibraryThing" {% if current == 'LibraryThing' %}selected{% endif %}>
LibraryThing LibraryThing
</option> </option>
</select> </select>
</div> </div>
</label> </label>

View file

@ -13,7 +13,15 @@
{% endif %} {% endif %}
<div class="control"> <div class="control">
{% if type != 'reply' and type != 'direct' %} {% if type != 'reply' and type != 'direct' %}
<label class="label" for="id_{% if type == 'quotation' %}quote{% else %}content{% endif %}_{{ book.id }}_{{ type }}">{{ type|title }}:</label> <label class="label" for="id_{% if type == 'quotation' %}quote{% else %}content{% endif %}_{{ book.id }}_{{ type }}">
{% if type == 'comment' %}
{% trans "Comment:" %}
{% elif type == 'quotation' %}
{% trans "Quote:" %}
{% elif type == 'review' %}
{% trans "Review:" %}
{% endif %}
</label>
{% endif %} {% endif %}
{% if type == 'review' %} {% if type == 'review' %}
@ -45,6 +53,33 @@
{% include 'snippets/content_warning_field.html' with parent_status=status %} {% include 'snippets/content_warning_field.html' with parent_status=status %}
<textarea name="content" class="textarea is-small" id="id_content_quote-{{ book.id }}"></textarea> <textarea name="content" class="textarea is-small" id="id_content_quote-{{ book.id }}"></textarea>
</div> </div>
{% elif type == 'comment' %}
<div class="control">
{% active_shelf book as active_shelf %}
{% if active_shelf.shelf.identifier == 'reading' and book.latest_readthrough %}
{% with readthrough=book.latest_readthrough %}
<div class="field">
<input type="hidden" name="id" value="{{ readthrough.id }}"/>
<label class="label" for="progress-{{ uuid }}">{% trans "Progress:" %}</label>
<div class="field has-addons mb-0">
<div class="control">
<input aria-label="{% if readthrough.progress_mode == 'PG' %}Current page{% else %}Percent read{% endif %}" class="input" type="number" min="0" name="progress" size="3" value="{{ readthrough.progress|default:'' }}" id="progress-{{ uuid }}">
</div>
<div class="control select">
<select name="progress_mode" aria-label="Progress mode">
<option value="PG" {% if readthrough.progress_mode == 'PG' %}selected{% endif %}>{% trans "pages" %}</option>
<option value="PCT" {% if readthrough.progress_mode == 'PCT' %}selected{% endif %}>{% trans "percent" %}</option>
</select>
</div>
</div>
{% if readthrough.progress_mode == 'PG' and book.pages %}
<p class="help">{% blocktrans with pages=book.pages %}of {{ pages }} pages{% endblocktrans %}</p>
{% endif %}
</div>
{% endwith %}
{% endif %}
</div>
{% endif %} {% endif %}
<input type="checkbox" class="hidden" name="sensitive" id="id_show_spoilers-{{ uuid }}" {% if status.content_warning %}checked{% endif %} aria-hidden="true"> <input type="checkbox" class="hidden" name="sensitive" id="id_show_spoilers-{{ uuid }}" {% if status.content_warning %}checked{% endif %} aria-hidden="true">
{# bottom bar #} {# bottom bar #}

View file

@ -1,28 +0,0 @@
{% load i18n %}
<form class="field is-grouped is-small" action="/edit-readthrough" method="POST">
{% csrf_token %}
<input type="hidden" name="id" value="{{ readthrough.id }}"/>
<div class="field">
<label class="label is-align-self-center mb-0 pr-2" for="progress">{% trans "Progress:" %}</label>
<div class="field has-addons mb-0">
<div class="control">
<input
aria-label="{% if readthrough.progress_mode == 'PG' %}Current page{% else %}Percent read{% endif %}"
class="input is-small" type="number" min="0"
name="progress" size="3" value="{{ readthrough.progress|default:'' }}">
</div>
<div class="control select is-small">
<select name="progress_mode" aria-label="Progress mode">
<option value="PG" {% if readthrough.progress_mode == 'PG' %}selected{% endif %}>{% trans "pages" %}</option>
<option value="PCT" {% if readthrough.progress_mode == 'PCT' %}selected{% endif %}>{% trans "percent" %}</option>
</select>
</div>
<div class="control">
<button class="button is-small px-2 is-primary" type="submit">{% trans "Save" %}</button>
</div>
</div>
{% if readthrough.progress_mode == 'PG' and book.pages %}
<p class="help">{% blocktrans with pages=book.pages %}of {{ pages }} pages{% endblocktrans %}</p>
{% endif %}
</div>
</form>

View file

@ -0,0 +1,46 @@
{% extends 'components/modal.html' %}
{% load i18n %}
{% block modal-title %}
{% trans "Update progress" %}
{% endblock %}
{% block modal-form-open %}
<form action="{% url 'edit-readthrough' %}" method="POST">
{% endblock %}
{% block modal-body %}
{% csrf_token %}
<input type="hidden" name="id" value="{{ readthrough.id }}"/>
<div class="field">
<label class="label is-align-self-center mb-0 pr-2" for="progress">{% trans "Progress:" %}</label>
<div class="field has-addons mb-0">
<div class="control">
<input
aria-label="{% if readthrough.progress_mode == 'PG' %}Current page{% else %}Percent read{% endif %}"
class="input"
type="number"
min="0"
name="progress"
size="3"
value="{{ readthrough.progress|default:'' }}">
</div>
<div class="control select">
<select name="progress_mode" aria-label="Progress mode">
<option value="PG" {% if readthrough.progress_mode == 'PG' %}selected{% endif %}>{% trans "pages" %}</option>
<option value="PCT" {% if readthrough.progress_mode == 'PCT' %}selected{% endif %}>{% trans "percent" %}</option>
</select>
</div>
</div>
{% if readthrough.progress_mode == 'PG' and book.pages %}
<p class="help">{% blocktrans with pages=book.pages %}of {{ pages }} pages{% endblocktrans %}</p>
{% endif %}
</div>
{% endblock %}
{% block modal-footer %}
<button class="button is-success" type="submit">{% trans "Save" %}</button>
{% trans "Cancel" as button_text %}
{% include 'snippets/toggle/toggle_button.html' with text=button_text %}
{% endblock %}
{% block modal-form-close %}</form>{% endblock %}

View file

@ -3,7 +3,7 @@
{% with book.id|uuid as uuid %} {% with book.id|uuid as uuid %}
{% active_shelf book as active_shelf %} {% active_shelf book as active_shelf %}
<div class="field has-addons"> <div class="field has-addons mb-0">
{% if switch_mode and active_shelf.book != book %} {% if switch_mode and active_shelf.book != book %}
<div class="control"> <div class="control">
{% include 'snippets/switch_edition_button.html' with edition=book size='is-small' %} {% include 'snippets/switch_edition_button.html' with edition=book size='is-small' %}
@ -23,5 +23,7 @@
{% latest_read_through book request.user as readthrough %} {% latest_read_through book request.user as readthrough %}
{% include 'snippets/shelve_button/finish_reading_modal.html' with book=active_shelf.book controls_text="finish-reading" controls_uid=uuid readthrough=readthrough %} {% include 'snippets/shelve_button/finish_reading_modal.html' with book=active_shelf.book controls_text="finish-reading" controls_uid=uuid readthrough=readthrough %}
{% include 'snippets/shelve_button/progress_update_modal.html' with book=shelf_book.book controls_text="progress-update" controls_uid=uuid readthrough=readthrough %}
{% endwith %} {% endwith %}
{% endif %} {% endif %}

View file

@ -27,3 +27,11 @@
</div> </div>
{% if dropdown %}</li>{% endif %} {% if dropdown %}</li>{% endif %}
{% endfor %} {% endfor %}
{% if dropdown %}
<li role="menuitem">
<div class="dropdown-item pt-0 pb-0">
{% trans "Update progress" as button_text %}
{% include 'snippets/toggle/toggle_button.html' with class=class text=button_text controls_text="progress-update" controls_uid=button_uuid focus="modal-title-progress-update" %}
</div>
</li>
{% endif %}

View file

@ -35,3 +35,9 @@
{% elif status.mention_books %} {% elif status.mention_books %}
<a href="/book/{{ status.mention_books.first.id }}">{{ status.mention_books.first.title }}</a> <a href="/book/{{ status.mention_books.first.id }}">{{ status.mention_books.first.title }}</a>
{% endif %} {% endif %}
{% if status.progress %}
<p class="help">
({% if status.progress_mode == 'PG' %}page {{ status.progress }}{%else %}{{ status.progress }}%{% endif %})
</p>
{% endif %}

View file

@ -1,45 +1,45 @@
{ {
"ISBN:9782070427796": { "ISBN:9782070427796": {
"url": "https://openlibrary.org/books/OL16262504M/Les_ombres_errantes", "url": "https://openlibrary.org/books/OL16262504M/Les_ombres_errantes",
"key": "/books/OL16262504M", "key": "/books/OL16262504M",
"title": "Les ombres errantes", "title": "Les ombres errantes",
"authors": [ "authors": [
{ {
"url": "https://openlibrary.org/authors/OL269675A/Pascal_Quignard", "url": "https://openlibrary.org/authors/OL269675A/Pascal_Quignard",
"name": "Pascal Quignard" "name": "Pascal Quignard"
} }
], ],
"by_statement": "Pascal Quignard.", "by_statement": "Pascal Quignard.",
"identifiers": { "identifiers": {
"goodreads": [ "goodreads": [
"1835483" "1835483"
], ],
"librarything": [ "librarything": [
"983474" "983474"
], ],
"isbn_10": [ "isbn_10": [
"207042779X" "207042779X"
], ],
"openlibrary": [ "openlibrary": [
"OL16262504M" "OL16262504M"
] ]
}, },
"classifications": { "classifications": {
"dewey_decimal_class": [ "dewey_decimal_class": [
"848/.91403" "848/.91403"
] ]
}, },
"publishers": [ "publishers": [
{ {
"name": "Gallimard" "name": "Gallimard"
} }
], ],
"publish_places": [ "publish_places": [
{ {
"name": "Paris" "name": "Paris"
} }
], ],
"publish_date": "2002", "publish_date": "2002",
"notes": "Hardback published Grasset, 2002." "notes": "Hardback published Grasset, 2002."
} }
} }

View file

@ -183,7 +183,7 @@ urlpatterns = [
re_path(r"^shelve/?$", views.shelve), re_path(r"^shelve/?$", views.shelve),
re_path(r"^unshelve/?$", views.unshelve), re_path(r"^unshelve/?$", views.unshelve),
# reading progress # reading progress
re_path(r"^edit-readthrough/?$", views.edit_readthrough), re_path(r"^edit-readthrough/?$", views.edit_readthrough, name="edit-readthrough"),
re_path(r"^delete-readthrough/?$", views.delete_readthrough), re_path(r"^delete-readthrough/?$", views.delete_readthrough),
re_path(r"^create-readthrough/?$", views.create_readthrough), re_path(r"^create-readthrough/?$", views.create_readthrough),
re_path(r"^delete-progressupdate/?$", views.delete_progressupdate), re_path(r"^delete-progressupdate/?$", views.delete_progressupdate),

View file

@ -13,6 +13,7 @@ from bookwyrm.settings import DOMAIN
from bookwyrm.status import delete_status from bookwyrm.status import delete_status
from bookwyrm.utils import regex from bookwyrm.utils import regex
from .helpers import handle_remote_webfinger from .helpers import handle_remote_webfinger
from .reading import edit_readthrough
# pylint: disable= no-self-use # pylint: disable= no-self-use
@ -64,6 +65,10 @@ class CreateStatus(View):
status.quote = to_markdown(status.quote) status.quote = to_markdown(status.quote)
status.save(created=True) status.save(created=True)
# update a readthorugh, if needed
edit_readthrough(request)
return redirect(request.headers.get("Referer", "/")) return redirect(request.headers.get("Referer", "/"))

View file

@ -1,97 +1,97 @@
version: '3' version: '3'
services: services:
nginx: nginx:
image: nginx:latest image: nginx:latest
ports: ports:
- 80:80 - 80:80
- 443:443 - 443:443
depends_on: depends_on:
- web - web
networks: networks:
- main - main
volumes: volumes:
- ./nginx:/etc/nginx/conf.d - ./nginx:/etc/nginx/conf.d
- ./certbot/conf:/etc/nginx/ssl - ./certbot/conf:/etc/nginx/ssl
- ./certbot/data:/var/www/certbot - ./certbot/data:/var/www/certbot
- static_volume:/app/static - static_volume:/app/static
- media_volume:/app/images - media_volume:/app/images
certbot: certbot:
image: certbot/certbot:latest image: certbot/certbot:latest
command: certonly --webroot --webroot-path=/var/www/certbot --email ${EMAIL} --agree-tos --no-eff-email -d ${DOMAIN} -d www.${DOMAIN} command: certonly --webroot --webroot-path=/var/www/certbot --email ${EMAIL} --agree-tos --no-eff-email -d ${DOMAIN} -d www.${DOMAIN}
#command: renew --webroot --webroot-path /var/www/certbot #command: renew --webroot --webroot-path /var/www/certbot
volumes: volumes:
- ./certbot/conf:/etc/letsencrypt - ./certbot/conf:/etc/letsencrypt
- ./certbot/logs:/var/log/letsencrypt - ./certbot/logs:/var/log/letsencrypt
- ./certbot/data:/var/www/certbot - ./certbot/data:/var/www/certbot
db: db:
build: postgres-docker build: postgres-docker
env_file: .env env_file: .env
entrypoint: /bookwyrm-entrypoint.sh entrypoint: /bookwyrm-entrypoint.sh
command: cron postgres command: cron postgres
volumes: volumes:
- pgdata:/var/lib/postgresql/data - pgdata:/var/lib/postgresql/data
- backups:/backups - backups:/backups
networks: networks:
- main - main
web: web:
build: . build: .
env_file: .env env_file: .env
command: gunicorn bookwyrm.wsgi:application --bind 0.0.0.0:8000 command: gunicorn bookwyrm.wsgi:application --bind 0.0.0.0:8000
volumes: volumes:
- .:/app - .:/app
- static_volume:/app/static - static_volume:/app/static
- media_volume:/app/images - media_volume:/app/images
depends_on: depends_on:
- db - db
- celery_worker - celery_worker
networks: networks:
- main - main
ports: ports:
- 8000:8000 - 8000:8000
redis: redis:
image: redis image: redis
command: redis-server --requirepass ${REDIS_PASSWORD} command: redis-server --requirepass ${REDIS_PASSWORD}
volumes: volumes:
- ./redis.conf:/etc/redis/redis.conf - ./redis.conf:/etc/redis/redis.conf
env_file: .env env_file: .env
ports: ports:
- 6379:6379 - 6379:6379
networks: networks:
- main - main
restart: on-failure restart: on-failure
celery_worker: celery_worker:
env_file: .env env_file: .env
build: . build: .
networks: networks:
- main - main
command: celery -A celerywyrm worker -l info command: celery -A celerywyrm worker -l info
volumes: volumes:
- .:/app - .:/app
- static_volume:/app/static - static_volume:/app/static
- media_volume:/app/images - media_volume:/app/images
depends_on: depends_on:
- db - db
- redis - redis
restart: on-failure restart: on-failure
flower: flower:
build: . build: .
command: flower --port=8888 --basic_auth=${FLOWER_USER}:${FLOWER_PASSWORD} command: flower --port=8888 --basic_auth=${FLOWER_USER}:${FLOWER_PASSWORD}
env_file: .env env_file: .env
environment: environment:
- CELERY_BROKER_URL=${CELERY_BROKER} - CELERY_BROKER_URL=${CELERY_BROKER}
networks: networks:
- main - main
depends_on: depends_on:
- db - db
- redis - redis
restart: on-failure restart: on-failure
ports: ports:
- 8888:8888 - 8888:8888
volumes: volumes:
pgdata: pgdata:
backups: backups:
static_volume: static_volume:
media_volume: media_volume:
networks: networks:
main: main:

View file

@ -73,7 +73,7 @@ msgstr "Deutsch"
#: bookwyrm/settings.py:144 #: bookwyrm/settings.py:144
msgid "Spanish" msgid "Spanish"
msgstr "" msgstr "Spanisch"
#: bookwyrm/settings.py:145 #: bookwyrm/settings.py:145
msgid "French" msgid "French"
@ -139,7 +139,7 @@ msgstr "%(pages)s Seiten"
#: bookwyrm/templates/book/book.html:86 #: bookwyrm/templates/book/book.html:86
#, python-format #, python-format
msgid "Published %(date)s by %(publisher)s." msgid "Published %(date)s by %(publisher)s."
msgstr "" msgstr "Am %(date)s von %(publisher)s veröffentlicht."
#: bookwyrm/templates/book/book.html:88 #: bookwyrm/templates/book/book.html:88
#, fuzzy, python-format #, fuzzy, python-format
@ -150,7 +150,7 @@ msgstr "Veröffentlichungsdatum:"
#: bookwyrm/templates/book/book.html:90 #: bookwyrm/templates/book/book.html:90
#, python-format #, python-format
msgid "Published by %(publisher)s." msgid "Published by %(publisher)s."
msgstr "" msgstr "Veröffentlicht von %(publisher)s."
#: bookwyrm/templates/book/book.html:95 #: bookwyrm/templates/book/book.html:95
msgid "View on OpenLibrary" msgid "View on OpenLibrary"
@ -283,7 +283,7 @@ msgstr "Cover hinzufügen"
#: bookwyrm/templates/book/cover_modal.html:23 #: bookwyrm/templates/book/cover_modal.html:23
#: bookwyrm/templates/book/edit_book.html:169 #: bookwyrm/templates/book/edit_book.html:169
msgid "Load cover from url:" msgid "Load cover from url:"
msgstr "" msgstr "Cover von URL laden:"
#: bookwyrm/templates/book/edit_book.html:5 #: bookwyrm/templates/book/edit_book.html:5
#: bookwyrm/templates/book/edit_book.html:11 #: bookwyrm/templates/book/edit_book.html:11
@ -316,12 +316,12 @@ msgstr "Zuletzt bearbeitet von:"
#: bookwyrm/templates/book/edit_book.html:40 #: bookwyrm/templates/book/edit_book.html:40
msgid "Confirm Book Info" msgid "Confirm Book Info"
msgstr "" msgstr "Buchinfo bestätigen"
#: bookwyrm/templates/book/edit_book.html:47 #: bookwyrm/templates/book/edit_book.html:47
#, python-format #, python-format
msgid "Is \"%(name)s\" an existing author?" msgid "Is \"%(name)s\" an existing author?"
msgstr "" msgstr "Existiert \"%(name)s\" bereits als Autor:in?"
#: bookwyrm/templates/book/edit_book.html:52 #: bookwyrm/templates/book/edit_book.html:52
#, fuzzy, python-format #, fuzzy, python-format
@ -331,20 +331,20 @@ msgstr "\"<em>%(book_title)s</em>\" beginnen"
#: bookwyrm/templates/book/edit_book.html:55 #: bookwyrm/templates/book/edit_book.html:55
msgid "This is a new author" msgid "This is a new author"
msgstr "" msgstr "Neue:r Autor:in"
#: bookwyrm/templates/book/edit_book.html:61 #: bookwyrm/templates/book/edit_book.html:61
#, python-format #, python-format
msgid "Creating a new author: %(name)s" msgid "Creating a new author: %(name)s"
msgstr "" msgstr "Neu als Autor:in erstellen: %(name)s"
#: bookwyrm/templates/book/edit_book.html:67 #: bookwyrm/templates/book/edit_book.html:67
msgid "Is this an edition of an existing work?" msgid "Is this an edition of an existing work?"
msgstr "" msgstr "Ist das eine Edition eines vorhandenen Werkes?"
#: bookwyrm/templates/book/edit_book.html:71 #: bookwyrm/templates/book/edit_book.html:71
msgid "This is a new work" msgid "This is a new work"
msgstr "" msgstr "Dies ist ein neues Werk."
#: bookwyrm/templates/book/edit_book.html:77 #: bookwyrm/templates/book/edit_book.html:77
#: bookwyrm/templates/password_reset.html:30 #: bookwyrm/templates/password_reset.html:30
@ -385,7 +385,7 @@ msgstr "Veröffentlicht"
#: bookwyrm/templates/book/edit_book.html:119 #: bookwyrm/templates/book/edit_book.html:119
msgid "Separate multiple publishers with commas." msgid "Separate multiple publishers with commas."
msgstr "" msgstr "Mehrere Herausgeber:innen durch Kommata trennen"
#: bookwyrm/templates/book/edit_book.html:125 #: bookwyrm/templates/book/edit_book.html:125
msgid "First published date:" msgid "First published date:"
@ -729,7 +729,7 @@ msgstr "Laden fehlgeschlagen"
#: bookwyrm/templates/import_status.html:44 #: bookwyrm/templates/import_status.html:44
#, python-format #, python-format
msgid "Jump to the bottom of the list to select the %(failed_count)s items which failed to import." msgid "Jump to the bottom of the list to select the %(failed_count)s items which failed to import."
msgstr "" msgstr "Zum Ende der Liste springen, um die %(failed_count)s Einträge, deren Import fehlschlug, auszuwählen."
#: bookwyrm/templates/import_status.html:79 #: bookwyrm/templates/import_status.html:79
msgid "Select all" msgid "Select all"
@ -882,7 +882,7 @@ msgstr "Admin kontaktieren"
#: bookwyrm/templates/layout.html:202 #: bookwyrm/templates/layout.html:202
#, python-format #, python-format
msgid "Support %(site_name)s on <a href=\"%(support_link)s\" target=\"_blank\">%(support_title)s</a>" msgid "Support %(site_name)s on <a href=\"%(support_link)s\" target=\"_blank\">%(support_title)s</a>"
msgstr "" msgstr "%(site_name)s auf <a href=\"%(support_link)s\" target=\"_blank\">%(support_title)s</a> unterstützen"
#: bookwyrm/templates/layout.html:206 #: bookwyrm/templates/layout.html:206
msgid "BookWyrm is open source software. You can contribute or report issues on <a href=\"https://github.com/mouse-reeve/bookwyrm\">GitHub</a>." msgid "BookWyrm is open source software. You can contribute or report issues on <a href=\"https://github.com/mouse-reeve/bookwyrm\">GitHub</a>."
@ -1046,11 +1046,11 @@ msgstr "Mehr über diese Seite"
#: bookwyrm/templates/moderation/report_preview.html:6 #: bookwyrm/templates/moderation/report_preview.html:6
#, python-format #, python-format
msgid "Report #%(report_id)s: %(username)s" msgid "Report #%(report_id)s: %(username)s"
msgstr "" msgstr "Meldung #%(report_id)s: %(username)s"
#: bookwyrm/templates/moderation/report.html:10 #: bookwyrm/templates/moderation/report.html:10
msgid "Back to reports" msgid "Back to reports"
msgstr "" msgstr "Zurück zu den Meldungen"
#: bookwyrm/templates/moderation/report.html:18 #: bookwyrm/templates/moderation/report.html:18
#, fuzzy #, fuzzy
@ -1072,15 +1072,15 @@ msgstr "Direktnachricht senden"
#: bookwyrm/templates/moderation/report.html:27 #: bookwyrm/templates/moderation/report.html:27
msgid "Deactivate user" msgid "Deactivate user"
msgstr "" msgstr "Nutzer:in deaktivieren"
#: bookwyrm/templates/moderation/report.html:29 #: bookwyrm/templates/moderation/report.html:29
msgid "Reactivate user" msgid "Reactivate user"
msgstr "" msgstr "Nutzer:in reaktivieren"
#: bookwyrm/templates/moderation/report.html:36 #: bookwyrm/templates/moderation/report.html:36
msgid "Moderator Comments" msgid "Moderator Comments"
msgstr "" msgstr "Moderator:innenkommentare"
#: bookwyrm/templates/moderation/report.html:54 #: bookwyrm/templates/moderation/report.html:54
#: bookwyrm/templates/snippets/create_status.html:12 #: bookwyrm/templates/snippets/create_status.html:12
@ -1096,11 +1096,11 @@ msgstr "Post löschen"
#: bookwyrm/templates/moderation/report.html:61 #: bookwyrm/templates/moderation/report.html:61
msgid "No statuses reported" msgid "No statuses reported"
msgstr "" msgstr "Keine Beiträge gemeldet"
#: bookwyrm/templates/moderation/report.html:67 #: bookwyrm/templates/moderation/report.html:67
msgid "Statuses has been deleted" msgid "Statuses has been deleted"
msgstr "" msgstr "Beiträge wurden gelöscht"
#: bookwyrm/templates/moderation/report_modal.html:6 #: bookwyrm/templates/moderation/report_modal.html:6
#, fuzzy, python-format #, fuzzy, python-format
@ -1111,7 +1111,7 @@ msgstr "Listen: %(username)s"
#: bookwyrm/templates/moderation/report_modal.html:21 #: bookwyrm/templates/moderation/report_modal.html:21
#, python-format #, python-format
msgid "This report will be sent to %(site_name)s's moderators for review." msgid "This report will be sent to %(site_name)s's moderators for review."
msgstr "" msgstr "Diese Meldung wird an die Moderator:innen von %(site_name)s weitergeletiet."
#: bookwyrm/templates/moderation/report_modal.html:22 #: bookwyrm/templates/moderation/report_modal.html:22
#, fuzzy #, fuzzy
@ -1121,11 +1121,11 @@ msgstr "Mehr über diese Seite"
#: bookwyrm/templates/moderation/report_modal.html:31 #: bookwyrm/templates/moderation/report_modal.html:31
msgid "Submit" msgid "Submit"
msgstr "" msgstr "Absenden"
#: bookwyrm/templates/moderation/report_preview.html:13 #: bookwyrm/templates/moderation/report_preview.html:13
msgid "No notes provided" msgid "No notes provided"
msgstr "" msgstr "Keine Notizen angegeben."
#: bookwyrm/templates/moderation/report_preview.html:20 #: bookwyrm/templates/moderation/report_preview.html:20
#, fuzzy, python-format #, fuzzy, python-format
@ -1135,11 +1135,11 @@ msgstr "Direktnachrichten mit <a href=\"%(path)s\">%(username)s</a>"
#: bookwyrm/templates/moderation/report_preview.html:30 #: bookwyrm/templates/moderation/report_preview.html:30
msgid "Re-open" msgid "Re-open"
msgstr "" msgstr "Wiedereröffnen"
#: bookwyrm/templates/moderation/report_preview.html:32 #: bookwyrm/templates/moderation/report_preview.html:32
msgid "Resolve" msgid "Resolve"
msgstr "" msgstr "Lösen"
#: bookwyrm/templates/moderation/reports.html:4 #: bookwyrm/templates/moderation/reports.html:4
#: bookwyrm/templates/moderation/reports.html:5 #: bookwyrm/templates/moderation/reports.html:5
@ -1273,7 +1273,7 @@ msgstr "Dein <a href=\"/import/%(related_id)s\">Import</a> ist abgeschlossen."
#: bookwyrm/templates/notifications.html:113 #: bookwyrm/templates/notifications.html:113
#, python-format #, python-format
msgid "A new <a href=\"%(path)s\">report</a> needs moderation." msgid "A new <a href=\"%(path)s\">report</a> needs moderation."
msgstr "" msgstr "Eine neue <a href=\"%(path)s\">Meldung</a> muss moderiert werden."
#: bookwyrm/templates/notifications.html:139 #: bookwyrm/templates/notifications.html:139
msgid "You're all caught up!" msgid "You're all caught up!"
@ -1345,7 +1345,7 @@ msgstr "Bio:"
#: bookwyrm/templates/preferences/edit_user.html:46 #: bookwyrm/templates/preferences/edit_user.html:46
msgid "Show set reading goal prompt in feed:" msgid "Show set reading goal prompt in feed:"
msgstr "" msgstr "Angegebenes Leseziel im Feed anzeigen."
#: bookwyrm/templates/preferences/edit_user.html:52 #: bookwyrm/templates/preferences/edit_user.html:52
msgid "Manually approve followers:" msgid "Manually approve followers:"