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

Fix many typos #778

Merged
merged 5 commits into from
Dec 30, 2024
Merged
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
42 changes: 21 additions & 21 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@

- Improve y-013

- Merge and reogranize several codes. Thanks to Vince Rice
- Merge and reorganize several codes. Thanks to Vince Rice

- Remove some xpath redundancies. Thanks to Vince Rice

Expand Down Expand Up @@ -380,7 +380,7 @@

- Add y-033, incorrect three-em-dash usage

- Sort c-006 matches so tests are reproducable
- Sort c-006 matches so tests are reproducible

- Add checks for missing dedication and epigraph CSS. Thanks to Erin Endrei

Expand Down Expand Up @@ -438,7 +438,7 @@

- Redirect ACE stderr output to /dev/null to avoid warnings from headless Chrome

- Don't add several deprecated ARIA roles that are now depracated to the compatible build
- Don't add several deprecated ARIA roles that are now deprecated to the compatible build

## se lint

Expand Down Expand Up @@ -548,7 +548,7 @@

- Truncate GitHub repo name to 100 characters max. Thanks to Robin Whittleton

- Remove duplicate `xml:lang` attibute that is sometimes added by lxml
- Remove duplicate `xml:lang` attribute that is sometimes added by lxml

## se lint

Expand Down Expand Up @@ -806,7 +806,7 @@

- Merge t-043 and t-036 into t-042

- Add m-044, possessive `'s` inside link in long descriptoin
- Add m-044, possessive `'s` inside link in long description

- Add t-070, `<cite>` in epigraph ending in a period

Expand Down Expand Up @@ -1256,15 +1256,15 @@

- Only emit m-071, m-072, m-041 if there are fewer than 2 sources

- Add Ukranian to the set of scripts that need a Latn suffix. Thanks to Robin Whittleton
- Add Ukrainian to the set of scripts that need a Latn suffix. Thanks to Robin Whittleton

- Add s-094, endnote out of sequence

- Stop extremely long filenames from breaking lint output. Thanks to Robin Whittleton

- Add t-067, plural grapheme formed without apostrophe

- Merge multiple s-094 messsages into one entry
- Merge multiple s-094 messages into one entry

- Add `--allow` option to allow passing through specific errors that are ignored in `se-lint-ignore.xml`.

Expand Down Expand Up @@ -1634,7 +1634,7 @@

## se build

- Add compatibility code to allow Kindle to display pages whose only content is an aboslutely positioned image
- Add compatibility code to allow Kindle to display pages whose only content is an absolutely positioned image

- Replace vh/vw units with percent for compatible epub

Expand Down Expand Up @@ -1672,7 +1672,7 @@

- Ensure NACOAF prefix is http. Thanks to Vince Rice

- Add `unlocked` accesibility feature to `content.opf` template
- Add `unlocked` accessibility feature to `content.opf` template

## se lint

Expand All @@ -1694,7 +1694,7 @@

## se print-spine

- Add dramatis-personae and halftitlepage to exluded files. Thanks to Asher Smith
- Add dramatis-personae and halftitlepage to excluded files. Thanks to Asher Smith

## se reorder-endnotes

Expand Down Expand Up @@ -1746,7 +1746,7 @@

## se lint

- Update t-011 to exlude quotations in letter signatures
- Update t-011 to exclude quotations in letter signatures

- Add c-022, illegal rem unit

Expand Down Expand Up @@ -1809,7 +1809,7 @@

- Add t-050, possessive `'s` outside of persona element

- Add t-051, dialog in `<p>` without closing double quote, but next `<p>` doesn't have opening double qoute
- Add t-051, dialog in `<p>` without closing double quote, but next `<p>` doesn't have opening double quote

- Add t-052, stage direction without ending punctuation

Expand Down Expand Up @@ -1929,7 +1929,7 @@

## General

- Add the ability to apply a stylesheet to an EasyXml DOM tree. Applied styles can be accessed on an EaxyXmlElement by getting the `data-css-<attr>` property.
- Add the ability to apply a stylesheet to an EasyXml DOM tree. Applied styles can be accessed on an EasyXmlElement by getting the `data-css-<attr>` property.

- Use EasyXhtmlTree instead of raw lxml for various operations across the codebase

Expand Down Expand Up @@ -2181,9 +2181,9 @@

## se lint

- t-032: Ignore abbrevations that contain `<sup>`, like `r<sup>o</sup>`
- t-032: Ignore abbreviations that contain `<sup>`, like `r<sup>o</sup>`

- t-032: Ignore abbrevations ending in numbers, like stage direction
- t-032: Ignore abbreviations ending in numbers, like stage direction

- Add new Google Books URL structure to checks

Expand Down Expand Up @@ -2475,7 +2475,7 @@

## se modernize-spelling

- Various additions. Thanks to matistric
- Various additions. Thanks to maticstric

## se print-manifest

Expand All @@ -2495,7 +2495,7 @@

- Add a no break space before ampersands

- Remove word joiners and nbsps from alt attributs
- Remove word joiners and nbsps from alt attributes

- Don't add an nbsp before `St.` if it is within an `<abbr class="name">` element

Expand Down Expand Up @@ -2641,7 +2641,7 @@ Released in error; no changes.

- Add m-056, author name present in long description but first instance isn't hyperlinked

- Add s-058, stage direction sematnics only allowed in `<i>` elements
- Add s-058, stage direction semantics only allowed in `<i>` elements

- Add s-059 internal link beginning with ../text/

Expand Down Expand Up @@ -2855,7 +2855,7 @@ Released in error; no changes.

- Internally, convert all instances of BS4 to LXML for consistency and performance

- If invoked with multiple ebooks, and one throws an exception (like invald XHTML), print to console and continue linting the rest of the books instead of exiting
- If invoked with multiple ebooks, and one throws an exception (like invalid XHTML), print to console and continue linting the rest of the books instead of exiting

- Add s-053, newlines in colophon not preceded by `<br/>`

Expand Down Expand Up @@ -2905,9 +2905,9 @@ Released in error; no changes.

- Fix maneuver modernization

- Add punctuation after some abbrevations even if not followed by white space
- Add punctuation after some abbreviations even if not followed by white space

- Internally, remove some duplicate checks and merge some othes
- Internally, remove some duplicate checks and merge some others


## se print-title
Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ ln -s $(pipx environment --value PIPX_LOCAL_VENVS)/standardebooks/lib/python3.*/

## macOS users

1. Install the [Homebrew package manager](https://brew.sh). Or, if you already have it installed, make sure it’s up to date:
1. Install the [Homebrew package manager](https://brew.sh). Or, if you already have it installed, make sure it’s up-to-date:

```shell
brew update
Expand Down Expand Up @@ -147,7 +147,7 @@ se lint /path/to/ebook/repos/*
export COLUMNS; parallel --keep-order se lint ::: /path/to/ebook/repos/*
```

The toolset tries to detect when it’s being invoked from `parallel`, and it adjusts its output to accomodate.
The toolset tries to detect when it’s being invoked from `parallel`, and it adjusts its output to accommodate.

We export `COLUMNS` because `se lint` needs to know the width of the terminal so that it can format its tabular output correctly. We pass the `--keep-order` flag to output results in the order we passed them in, which is useful if comparing the results of multiple runs.

Expand All @@ -172,7 +172,7 @@ Instructions are found in the testing [README](tests/README.md).

### Code style

- In general we follow a relaxed version of [PEP 8](https://www.python.org/dev/peps/pep-0008/). In particular, we use tabs instead of spaces, and there is no line length limit.
- In general, we follow a relaxed version of [PEP 8](https://www.python.org/dev/peps/pep-0008/). In particular, we use tabs instead of spaces, and there is no line length limit.

- Always use the `regex` module instead of the `re` module.

Expand All @@ -182,9 +182,9 @@ We need volunteers to take the lead on the following goals:

- Add more test cases to the test framework.

- Writing installation instructions for Bash and ZSH completions for MacOS.
- Writing installation instructions for Bash and ZSH completions for macOS.

- Currently the toolset requires the whole Calibre package, which is very big, but it’s only used to convert epub to azw3. Can we inline Calibre’s azw3 conversion code into our `./vendor/` directory, to avoid having to install the entire Calibre package as a big dependency? If so, how do we keep it updated as Calibre evolves?
- Currently, the toolset requires the whole Calibre package, which is very big, but it’s only used to convert epub to azw3. Can we inline Calibre’s azw3 conversion code into our `./vendor/` directory, to avoid having to install the entire Calibre package as a big dependency? If so, how do we keep it updated as Calibre evolves?

- Over the years, `./se/se_epub_build.py` has evolved to become very large and unwieldy. Is there a better, clearer way to organize this code?

Expand Down
2 changes: 1 addition & 1 deletion se/commands/build_loi.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ def build_loi(plain_output: bool) -> int:
"""

parser = argparse.ArgumentParser(description="Update the LoI file based on all <figure> elements that contain an <img>.")
parser.add_argument("-s", "--stdout", action="store_true", help="print to stdout intead of writing to the LoI file")
parser.add_argument("-s", "--stdout", action="store_true", help="print to stdout instead of writing to the LoI file")
parser.add_argument("directories", metavar="DIRECTORY", nargs="+", help="a Standard Ebooks source directory")
args = parser.parse_args()

Expand Down
2 changes: 1 addition & 1 deletion se/commands/build_title.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ def build_title(plain_output: bool) -> int:

parser = argparse.ArgumentParser(description="Generate the title of an XHTML file based on its headings and update the file’s <title> element.")
parser.add_argument("-n", "--no-newline", dest="newline", action="store_false", help="with --stdout, don’t end output with a newline")
parser.add_argument("-s", "--stdout", action="store_true", help="print to stdout intead of writing to the file")
parser.add_argument("-s", "--stdout", action="store_true", help="print to stdout instead of writing to the file")
parser.add_argument("targets", metavar="TARGET", nargs="+", help="an XHTML file, or a directory containing XHTML files")
args = parser.parse_args()

Expand Down
2 changes: 1 addition & 1 deletion se/commands/build_toc.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ def build_toc(plain_output: bool) -> int:
"""

parser = argparse.ArgumentParser(description="Generate the table of contents for the ebook’s source directory and update the ToC file.")
parser.add_argument("-s", "--stdout", action="store_true", help="print to stdout intead of writing to the ToC file")
parser.add_argument("-s", "--stdout", action="store_true", help="print to stdout instead of writing to the ToC file")
parser.add_argument("directories", metavar="DIRECTORY", nargs="+", help="a Standard Ebooks source directory")
args = parser.parse_args()

Expand Down
2 changes: 1 addition & 1 deletion se/commands/create_draft.py
Original file line number Diff line number Diff line change
Expand Up @@ -425,7 +425,7 @@ def _generate_contributor_string(contributors: List[Dict], include_xhtml: bool)

INPUTS
contributors: A list of contributor dicts
include_xhtml: Include <b> or <a> for each contributor, making the output suitable for the coloiphon
include_xhtml: Include <b> or <a> for each contributor, making the output suitable for the colophon

OUTPUTS
A string of XML representing the contributors
Expand Down
6 changes: 3 additions & 3 deletions se/completions/fish/se.fish
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ complete -c se -A -n "__fish_seen_subcommand_from prepare-release" -s v -l verbo

complete -c se -n "__fish_se_no_subcommand" -a build-loi -d "Update the LoI file based on all <figure> elements that contain an <img>."
complete -c se -A -n "__fish_seen_subcommand_from build-loi" -s h -l help -x -d "show this help message and exit"
complete -c se -A -n "__fish_seen_subcommand_from build-loi" -s s -l stdout -d "print to stdout intead of writing to the LoI file"
complete -c se -A -n "__fish_seen_subcommand_from build-loi" -s s -l stdout -d "print to stdout instead of writing to the LoI file"

complete -c se -n "__fish_se_no_subcommand" -a build-manifest -d "Generate the <manifest> element for the given Standard Ebooks source directory and write it to the ebook’s metadata file."
complete -c se -A -n "__fish_seen_subcommand_from build-manifest" -s h -l help -x -d "show this help message and exit"
Expand All @@ -129,11 +129,11 @@ complete -c se -A -n "__fish_seen_subcommand_from build-spine" -s s -l stdout -d
complete -c se -n "__fish_se_no_subcommand" -a build-title -d "Generate the title of an XHTML file based on its headings and update the file’s <title> element."
complete -c se -A -n "__fish_seen_subcommand_from build-title" -s h -l help -x -d "show this help message and exit"
complete -c se -A -n "__fish_seen_subcommand_from build-title" -s n -l no-newline -d "with --stdout, don’t end output with a newline"
complete -c se -A -n "__fish_seen_subcommand_from build-title" -s s -l stdout -d "print to stdout intead of writing to the file"
complete -c se -A -n "__fish_seen_subcommand_from build-title" -s s -l stdout -d "print to stdout instead of writing to the file"

complete -c se -n "__fish_se_no_subcommand" -a build-toc -d "Generate the table of contents for the ebook’s source directory and update the ToC file."
complete -c se -A -n "__fish_seen_subcommand_from build-toc" -s h -l help -x -d "show this help message and exit"
complete -c se -A -n "__fish_seen_subcommand_from build-toc" -s s -l stdout -d "print to stdout intead of writing to the ToC file"
complete -c se -A -n "__fish_seen_subcommand_from build-toc" -s s -l stdout -d "print to stdout instead of writing to the ToC file"

complete -c se -n "__fish_se_no_subcommand" -a recompose-epub -d "Recompose a Standard Ebooks source directory into a single HTML5 file, and print to standard output"
complete -c se -A -n "__fish_seen_subcommand_from recompose-epub" -s h -l help -x -d "show this help message and exit"
Expand Down
6 changes: 3 additions & 3 deletions se/completions/zsh/_se
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ case $state in
build-loi)
_arguments -s \
{-h,--help}'[show a help message and exit]' \
{-s,--stdout}'[print to stdout intead of writing to the LoI file]' \
{-s,--stdout}'[print to stdout instead of writing to the LoI file]' \
'*: :_directories'
;;
build-manifest)
Expand All @@ -106,13 +106,13 @@ case $state in
_arguments -s \
{-h,--help}'[show a help message and exit]' \
{-n,--no-newline}'[with --stdout, don’t end output with a newline]' \
{-s,--stdout}'[print to stdout intead of writing to the file]' \
{-s,--stdout}'[print to stdout instead of writing to the file]' \
'*: :_files -g \*.xhtml'
;;
build-toc)
_arguments -s \
{-h,--help}'[show a help message and exit]' \
{-s,--stdout}'[print to stdout intead of writing to the ToC file]' \
{-s,--stdout}'[print to stdout instead of writing to the ToC file]' \
'*: :_directories'
;;
clean)
Expand Down