Skip to content

Commit

Permalink
Merge pull request #48 from Nyx102/main
Browse files Browse the repository at this point in the history
Use padded volume numbers
  • Loading branch information
WorldEnd-Admin authored Sep 8, 2024
2 parents 87fa622 + 115acc6 commit d357c5e
Show file tree
Hide file tree
Showing 97 changed files with 19 additions and 19 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/black.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ on:
workflow_dispatch:
push:
branches:
- 'main'
- "main"
paths:
- '**.py'
- '.github/workflows/black.yml'
- 'requirements.txt'
- "**.py"
- ".github/workflows/black.yml"
- "requirements.txt"

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
Expand All @@ -34,4 +34,4 @@ jobs:
with:
commit_message: Apply formatting changes
skip_fetch: true
skip_checkout: true
skip_checkout: true
8 changes: 4 additions & 4 deletions .github/workflows/test-generation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
echo "PADDED_VOLUME=${padded_volume}" >> $GITHUB_ENV
echo "Generating PDF for Volume ${volume}"
python "Scripts/output_tex.py" "Volumes/Volume ${volume}" "Output_v${padded_volume}" -p
python "Scripts/output_tex.py" "Volumes/Volume_${padded_volume}" "Output_v${padded_volume}" -p
shell: bash
- name: Generate EPUB
run: |
Expand All @@ -45,15 +45,15 @@ jobs:
echo "PADDED_VOLUME=${padded_volume}" >> $GITHUB_ENV
echo "Generating EPUB for Volume ${volume}"
python "Scripts/output_epub.py" "Volumes/Volume ${volume}" "Output_v${padded_volume}"
python "Scripts/output_epub.py" "Volumes/Volume_${padded_volume}" "Output_v${padded_volume}"
shell: bash
- name: Upload PDFs
uses: actions/upload-artifact@v4
with:
name: WorldEnd2 Vol. ${{ matrix.volume }}.pdf
path: Output_v${{ env.PADDED_VOLUME }}/WorldEnd2 v${{ env.PADDED_VOLUME }}.pdf
path: Output_v${{ env.PADDED_VOLUME }}/WorldEnd2_v${{ env.PADDED_VOLUME }}.pdf
- name: Upload EPUBs
uses: actions/upload-artifact@v4
with:
name: WorldEnd2 Vol. ${{ matrix.volume }}.epub
path: Output_v${{ env.PADDED_VOLUME }}/WorldEnd2 v${{ env.PADDED_VOLUME }}.epub
path: Output_v${{ env.PADDED_VOLUME }}/WorldEnd2_v${{ env.PADDED_VOLUME }}.epub
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ You should have the following:
Once you have completed all the prerequisites, you can run `Scripts/output_tex.py`:

```sh
python ./Scripts/output_tex.py "./Volumes/Volume 3/" "./Output/"
python ./Scripts/output_tex.py "./Volumes/Volume_03/" "./Output_v03/"
```

- The first argument (`"./Volumes/Volume 3/"`) specifies the path to the directory containing the volume.
- The second argument (`"./Output/"`) is the location for the output file and any temporary working files.
- The first argument (`"./Volumes/Volume_03/"`) specifies the path to the directory containing the volume.
- The second argument (`"./Output_v03/"`) is the location for the output file and any temporary working files.

### Printing
If you want to generate the PDF for printing in a perfect-bound book, there are three related flags:
Expand All @@ -25,7 +25,7 @@ If you want to generate the PDF for printing in a perfect-bound book, there are
- `-g` (`--gutter-size`): Specify the gutter size.
- `-n` (`--no-cover`): Do not include cover.

By default, the bleed size is 0in, gutter size is 0in, and cover is included.
By default, the bleed size is 0 in, gutter size is 0 in, and cover is included.

For convenience, `-p` (`--print-mode`) is provided, which is short for `-b 0.125in -g 0.15in -n`.

Expand All @@ -35,11 +35,11 @@ It is possible to tweak the print options alongside `--print-mode` by appending
To export to EPUB, run `Scripts/output_epub.py`:

``` sh
python ./Scripts/output_epub.py "./Volumes/Volume 3/" "./Output/"
python ./Scripts/output_epub.py "./Volumes/Volume_03/" "./Output_v03/"
```

- The first argument (`"./Volumes/Volume 3/"`) specifies the path to the directory containing the volume.
- The second argument (`"./Output/"`) is the location for the output file and any temporary working files.
- The first argument (`"./Volumes/Volume_03/"`) specifies the path to the directory containing the volume.
- The second argument (`"./Output_v03/"`) is the location for the output file and any temporary working files.

# Changes from Orlandri Translation
- Use Yen Press names
Expand Down
2 changes: 1 addition & 1 deletion Scripts/output_epub.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ def convert_book(
if os.path.exists(work_dir):
shutil.rmtree(work_dir)
shutil.copytree(common_dir() / "ePub", work_dir)
output_stem = f"WorldEnd2 v{book_config.volume:02}"
output_stem = f"WorldEnd2_v{book_config.volume:02}"

output_file = output_dir / (output_stem + ".epub")
process_images(image_config, images_output_directory, book_config.isbn)
Expand Down
2 changes: 1 addition & 1 deletion Scripts/output_tex.py
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ def convert_book(

intermediate_output_directory = work_dir / "CompilationDir"
os.makedirs(intermediate_output_directory, exist_ok=True)
output_stem = f"WorldEnd2 v{book_config.volume:02}"
output_stem = f"WorldEnd2_v{book_config.volume:02}"
main_tex_file = common_dir() / "TeX" / "WorldEnd2_Common.tex"
tex_inputs = env_path_prepend(os.environ.get("TEXINPUTS"), work_dir, ".")
tex_inputs_no_images = env_path_prepend(
Expand Down
2 changes: 1 addition & 1 deletion Scripts/test.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
from Lib.config import parse_book_config

parse_book_config("Volumes/Volume 3")
parse_book_config("Volumes/Volume_03")
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit d357c5e

Please sign in to comment.