Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jackc/booklog
https://github.com/jackc/booklog
Last synced: 24 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/jackc/booklog
- Owner: jackc
- Created: 2019-04-05T22:14:32.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2023-06-24T16:06:48.000Z (over 1 year ago)
- Last Synced: 2024-06-20T12:39:24.381Z (5 months ago)
- Language: Go
- Size: 561 KB
- Stars: 7
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Booklog
Booklog is a simple tool to track read books.
## Development
Required Prerequisites:
https://github.com/jackc/tern - for database migrations
https://direnv.net/ - Manage environment variablesHighly Recommended:
https://github.com/asdf-vm/asdf - Version management for Ruby and Node
https://github.com/watchexec/watchexec - Restart server when files change (needed for `rake rerun`)Make a copy of all files that end in `.example` but without the `.example` and edit the new files as needed to configure development environment.
Create database and user.
```
createdb --locale=en_US -T template0 booklog_dev
createuser booklog
``````
npm install
bundle install
tern migrate -m migration -c migration/development.conf
```Run server with rake:
```
rake rerun
```Run asset server:
```
npx vite
```Site will be available at: http://localhost:5173/
## Iterm2 Script
`bin/start-booklog-dev.py.example` contains an example script to start all needed programs for development. It does the following:
* Start booklog server.
* Split the window and run the asset server
* Create a tab for a console.
* Open booklog in VS Code.Make a copy of this file without the `.example`. Symlink the file into `~/Library/Application Support/iTerm2/Scripts`. e.g. `ln -s ~/dev/booklog/bin/start-isoamp-dev.py ~/Library/Application\ Support/iTerm2/Scripts`. This script will then be available in the iTerm2 Scripts menu as well as the cmd+shift+o "Open Quickly" window. You can now edit the file if needed.
## Testing
The following environment variables must be set:
* `TEST_DATABASE`: the test database name
* `TEST_DATABASE_COUNT`: the number of test databases to useSet these variables in `.envrc`.
Run tests with `rake`.