Skip to content

Commit

Permalink
README.md improvements.
Browse files Browse the repository at this point in the history
Fixed glitched regen logs when collection is empty.
  • Loading branch information
funmaker committed May 8, 2021
1 parent 5586015 commit 9c7a1b4
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,21 @@ It does not provide any way to manage your posts or tags. The only way to add/mo
changes in Hydrus and then rebuild Hybooru's database again(can be done from the cog menu on search/post page).


## Setup

1) Install NodeJS, npm and PostgreSQL.
2) Create new Postgresql database and user.
3) Allow user to use `pg_trgm` and `intarray` extensions. Either:
- Grant the user permission to create trusted extensions: `GRANT CREATE ON DATABASE <database> TO <user>`.
- Create the extensions yourself: `CREATE EXTENSION IF NOT EXISTS pg_trgm; CREATE EXTENSION IF NOT EXISTS intarray;`.
4) Download latest [Release](/releases) production build [or build it yourself](#development).
5) Extract server files.
6) Edit `configs.json` to specify database credentials, hydrus db location and other options. See [Configuration](#configuration).
7) (Optional) Configure [reverse proxy](#reverse-proxy).
7) Run `npm start` to start server.



## Searching Query Syntax

Searching tries to imitate classical booru's syntax. All tags are lowercase and use `_` instead of space character.
Expand Down
5 changes: 5 additions & 0 deletions server/helpers/dbImport/import.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,11 @@ export abstract class Import {
const total = await this.total();
let count = 0;

if(total === 0) {
printProgress(true, this.display);
return;
}

const input = this.hydrus.prepare(this.inputQuery).raw(true);
const output: Writable = await this.postgres.query(copy.from(this.outputQuery));

Expand Down

0 comments on commit 9c7a1b4

Please sign in to comment.