Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename batch builder #340

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
/build-concourse/webhosting-*.yml
/build-concourse/corgi-*.yml

cross-lib/book-data
cross-lib/logs
batch-builder/book-data
batch-builder/logs

/bakery-src/scripts/build
/bakery-src/scripts/cops_bakery_scripts.egg-info
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ WORKDIR /code
RUN apt-get update && \
apt-get install -y curl

COPY [cross-lib, ./cross-lib]
COPY [batch-builder, ./batch-builder]
8 changes: 4 additions & 4 deletions cross-lib/README.md → batch-builder/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Note: All data files should end with a single newline.

### Scripts

All scripts are meant to be run from Enki root (eg. by calling `./cross-lib/updater.sh` from enki folder).
All scripts are meant to be run from Enki root (eg. by calling `./batch-builder/updater.sh` from enki folder).

`update_books.rb` - Updates or creates the list of books in `AUTO_books.txt`. Requires Ruby to be installed.

Expand All @@ -35,9 +35,9 @@ Options:

Examples:
```
./cross-lib/run_enki_on_all.sh --command all-pdf
./cross-lib/run_enki_on_all.sh --command all-epub --data-dir ./data/v1 --echo --continue
STOP_AT_STEP=step-bake ./cross-lib/run_enki_on_all.sh --command all-web
./batch-builder/run_enki_on_all.sh --command all-pdf
./batch-builder/run_enki_on_all.sh --command all-epub --data-dir ./data/v1 --echo --continue
STOP_AT_STEP=step-bake ./batch-builder/run_enki_on_all.sh --command all-web
```

## Logs
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ done

[[ $arg_data_dir ]] || arg_data_dir="./data"

root="cross-lib"
root="batch-builder"
all_books="$root/book-data/AUTO_books.txt"
test -f $all_books || ( echo "ERROR: Book list not found at ${all_books}" && exit 1 )

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
require 'set'

# Files
base_dir = 'cross-lib/book-data'
base_dir = 'batch-builder/book-data'
out_file = "#{base_dir}/AUTO_books.txt"
ubl = "#{base_dir}/USER_ubl.txt"
`mkdir -p #{base_dir}; touch #{out_file}; touch #{ubl}`
Expand Down
11 changes: 11 additions & 0 deletions batch-builder/updater.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/bash

# Run this to update the book list without having ruby installed.
root_dir=batch-builder
docker build --tag batch-builder --file $root_dir/Dockerfile.ruby_env $root_dir/.
docker run \
--rm -it \
--mount type=bind,source=$(pwd)/batch-builder,target=/code/batch-builder \
--name batch-builder-builder \
batch-builder \
$root_dir/update_books.rb
11 changes: 0 additions & 11 deletions cross-lib/updater.sh

This file was deleted.

Loading