[lint] Fix indentation in .md files.

This commit is contained in:
Fabien Basmaison 2021-03-04 19:05:01 +01:00
parent 99d2b34a1e
commit 4a8d9bee73
3 changed files with 64 additions and 64 deletions

View file

@ -24,15 +24,15 @@ A clear and concise description of what you expected to happen.
If applicable, add screenshots to help explain your problem. If applicable, add screenshots to help explain your problem.
**Desktop (please complete the following information):** **Desktop (please complete the following information):**
- OS: [e.g. iOS] - OS: [e.g. iOS]
- Browser [e.g. chrome, safari] - Browser [e.g. chrome, safari]
- Version [e.g. 22] - Version [e.g. 22]
**Smartphone (please complete the following information):** **Smartphone (please complete the following information):**
- Device: [e.g. iPhone6] - Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1] - OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari] - Browser [e.g. stock browser, safari]
- Version [e.g. 22] - Version [e.g. 22]
**Additional context** **Additional context**
Add any other context about the problem here. Add any other context about the problem here.

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

108
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
@ -144,10 +144,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
@ -155,33 +155,33 @@ 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
- Run the application (this should also set up a Certbot ssl cert for your domain) with - 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 `docker-compose up --build`, and make sure all the images build successfully
- 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` - Comment out the `command: certonly...` line in `docker-compose.yml`
- 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`
- 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 - 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
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)
@ -189,16 +189,16 @@ 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.