Skip to content

Commit e1204d4

Browse files
authored
Merge pull request #325 from plural/add-tasks-to-readme
Add task info to README.md
2 parents 4606c0c + 4ad5ec6 commit e1204d4

File tree

1 file changed

+28
-5
lines changed

1 file changed

+28
-5
lines changed

Diff for: README.md

+28-5
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ repository and accessible at `../netrunner-cards-json` to the application.
1919

2020
This repository has a Devcontainer setup. To use it, first copy the database.yml file.
2121

22-
```
22+
```sh
2323
cp config/database.example.yml config/database.yml
2424
```
2525

@@ -30,28 +30,30 @@ If you open this folder in VS Code it should prompt you to use the devcontainer.
3030
If you have a device with apple silicon, do the following first (adapt the
3131
platform based on your device and error message):
3232

33-
```
33+
```sh
3434
export DOCKER_DEFAULT_PLATFORM=linux/arm64/v8
3535
```
3636

37-
```
37+
```sh
3838
echo "RAILS_ENV=development" > .env
3939
cp config/database.example.yml config/database.yml
4040
docker network create null_signal
4141
docker compose build
4242
docker compose -f docker-compose.yml -f docker-compose.override.init.yml up -d
4343
```
44+
4445
Wait until `docker compose logs nrdb_api_server | tail` shows `Listening on http://0.0.0.0:3000`.
4546

4647
Test that `http://localhost:3000/api/docs/` loads in your browser. Afterwords,
4748

48-
```
49+
```sh
4950
docker compose up -d
5051
```
5152
Is enough to spin up the containers, unless you want to restart the db from scratch (use the above example with init.yml)
5253

5354
To run tests in your docker container, you will need to override the environment, like so:
54-
```
55+
56+
```sh
5557
docker compose exec -e RAILS_ENV=test nrdb_api_server rails test
5658
```
5759

@@ -72,3 +74,24 @@ To re-generate API documentation (in test environment to ensure minimal changes)
7274
```
7375
docker compose run -e RAILS_ENV=test nrdb_api_server bundle exec rake docs:generate
7476
```
77+
78+
## Tasks
79+
80+
If you are using docker, ensure that you are in a shell for the container before running these tasks.
81+
82+
### Importing Cards
83+
84+
To import cards from the `netrunner-cards-json` repository, first ensure that
85+
it is checked out next to this directory, then run:
86+
87+
```sh
88+
bundle exec rake cards:import
89+
```
90+
91+
### Importing Decklists
92+
93+
To import decklists from NRDB Classic, use
94+
95+
```sh
96+
bundle exec rake import_decklists:import[2024-11-09]
97+
```

0 commit comments

Comments
 (0)