diff --git a/CHANGELOG.md b/CHANGELOG.md index 9d752eef..b335a74a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 @@ -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 @@ -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 @@ -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 @@ -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, `` in epigraph ending in a period @@ -1256,7 +1256,7 @@ - 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 @@ -1264,7 +1264,7 @@ - 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`. @@ -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 @@ -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 @@ -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 @@ -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 @@ -1809,7 +1809,7 @@ - Add t-050, possessive `'s` outside of persona element -- Add t-051, dialog in `

` without closing double quote, but next `

` doesn't have opening double qoute +- Add t-051, dialog in `

` without closing double quote, but next `

` doesn't have opening double quote - Add t-052, stage direction without ending punctuation @@ -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-` 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-` property. - Use EasyXhtmlTree instead of raw lxml for various operations across the codebase @@ -2181,9 +2181,9 @@ ## se lint -- t-032: Ignore abbrevations that contain ``, like `ro` +- t-032: Ignore abbreviations that contain ``, like `ro` -- 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 @@ -2475,7 +2475,7 @@ ## se modernize-spelling -- Various additions. Thanks to matistric +- Various additions. Thanks to maticstric ## se print-manifest @@ -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 `` element @@ -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 `` elements +- Add s-058, stage direction semantics only allowed in `` elements - Add s-059 internal link beginning with ../text/ @@ -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 `
` @@ -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 diff --git a/README.md b/README.md index 1a22621c..7b8c4069 100644 --- a/README.md +++ b/README.md @@ -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 @@ -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. @@ -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. @@ -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? diff --git a/se/commands/build_loi.py b/se/commands/build_loi.py index 3e3a4628..f5054d3f 100644 --- a/se/commands/build_loi.py +++ b/se/commands/build_loi.py @@ -13,7 +13,7 @@ def build_loi(plain_output: bool) -> int: """ parser = argparse.ArgumentParser(description="Update the LoI file based on all

elements that contain an .") - 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() diff --git a/se/commands/build_title.py b/se/commands/build_title.py index 83630710..03953d6b 100644 --- a/se/commands/build_title.py +++ b/se/commands/build_title.py @@ -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 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() diff --git a/se/commands/build_toc.py b/se/commands/build_toc.py index 366bfcb3..b6ed06cc 100644 --- a/se/commands/build_toc.py +++ b/se/commands/build_toc.py @@ -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() diff --git a/se/commands/create_draft.py b/se/commands/create_draft.py index 0abb2b19..97cdae80 100644 --- a/se/commands/create_draft.py +++ b/se/commands/create_draft.py @@ -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 diff --git a/se/completions/fish/se.fish b/se/completions/fish/se.fish index 34b805c8..35351879 100644 --- a/se/completions/fish/se.fish +++ b/se/completions/fish/se.fish @@ -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" @@ -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" diff --git a/se/completions/zsh/_se b/se/completions/zsh/_se index c855dd4e..63c23c47 100644 --- a/se/completions/zsh/_se +++ b/se/completions/zsh/_se @@ -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) @@ -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)