]> git.ipfire.org Git - thirdparty/paperless-ngx.git/commitdiff
Documentation: Fix typos with automated tool (#5319)
authorluzpaz <luzpaz@users.noreply.github.com>
Mon, 8 Jan 2024 16:58:41 +0000 (11:58 -0500)
committerGitHub <noreply@github.com>
Mon, 8 Jan 2024 16:58:41 +0000 (16:58 +0000)
---------

Co-authored-by: shamoon <4887959+shamoon@users.noreply.github.com>
22 files changed:
Dockerfile
docker/compose/docker-compose.ci-test.yml
docs/advanced_usage.md
docs/troubleshooting.md
docs/usage.md
src/documents/double_sided.py
src/documents/file_handling.py
src/documents/management/commands/document_consumer.py
src/documents/matching.py
src/documents/migrations/0017_auto_20170512_0507.py
src/documents/migrations/1000_update_paperless_all.py
src/documents/migrations/1012_fix_archive_files.py
src/documents/serialisers.py
src/documents/signals/handlers.py
src/documents/tests/test_api_documents.py
src/documents/tests/test_api_search.py
src/documents/tests/test_date_parsing.py
src/documents/tests/test_delayedquery.py
src/documents/tests/test_migration_encrypted_webp_conversion.py
src/paperless/checks.py
src/paperless/settings.py
src/paperless_mail/mail.py

index 46fdbcd0bbe1915b51af97f2cc7d13794b4e9f4a..73bd0cf573b3e411195c3fc859e2d976f02de5a8 100644 (file)
@@ -189,7 +189,7 @@ RUN set -eux \
     && chmod 755 /usr/local/bin/paperless_cmd.sh \
     && mv flower-conditional.sh /usr/local/bin/flower-conditional.sh \
     && chmod 755 /usr/local/bin/flower-conditional.sh \
-  && echo "Installing managment commands" \
+  && echo "Installing management commands" \
     && chmod +x install_management_commands.sh \
     && ./install_management_commands.sh
 
index 7987b8798bc2e85232e7ae0f314908b9c99686c9..ddd4ed06e2c7b3e5e5bbfe030a231860933b2893 100644 (file)
@@ -1,6 +1,6 @@
 # Docker Compose file for running paperless testing with actual gotenberg
 # and Tika containers for a more end to end test of the Tika related functionality
-# Can be used locally or by the CI to start the nessecary containers with the
+# Can be used locally or by the CI to start the necessary containers with the
 # correct networking for the tests
 
 version: "3.7"
index 4bbd7753deab007371addc21aaba46d4510ce6c5..b41e9c7f3deb5da38036270b284db73e0fb5652f 100644 (file)
@@ -613,7 +613,7 @@ scan a completely new "odd numbered pages" one. The old staging file will get di
 
 The collation feature can be used together with the [subdirs as tags](configuration.md#consume_config)
 feature (but this is not a requirement). Just create a correctly named double-sided subdir
-in the hierachy and upload your scans there. For example, both `double-sided/foo/bar` as
+in the hierarchy and upload your scans there. For example, both `double-sided/foo/bar` as
 well as `foo/bar/double-sided` will cause the collated document to be treated as if it
 were uploaded into `foo/bar` and receive both `foo` and `bar` tags, but not `double-sided`.
 
index 170e6c027eea9a0a02827c8b8403df025c251d58..40ff0a35c49e3481539db9953184e1d9cfd31f6c 100644 (file)
@@ -138,7 +138,7 @@ command:
 You might encounter errors such as:
 
 ```shell-session
-The following error occured while consuming document.pdf: [Errno 13] Permission denied: '/usr/src/paperless/src/../consume/document.pdf'
+The following error occurred while consuming document.pdf: [Errno 13] Permission denied: '/usr/src/paperless/src/../consume/document.pdf'
 ```
 
 This happens when paperless does not have permission to delete files
index 7e8db4acf3819a33e284abc779f06684fcb9409b..513cc952d654f828f8627218eb11b01739ddf5fc 100644 (file)
@@ -411,7 +411,7 @@ The following custom field types are supported:
 
 ## Share Links
 
-Paperless-ngx added the abiltiy to create shareable links to files in version 2.0. You can find the button for this on the document detail screen.
+Paperless-ngx added the ability to create shareable links to files in version 2.0. You can find the button for this on the document detail screen.
 
 - Share links do not require a user to login and thus link directly to a file.
 - Links are unique and are of the form `{paperless-url}/share/{randomly-generated-slug}`.
index 8bfad3586ba7b25a33ad82d592cb8fa2b0c355a5..5acde159730fe1758fdec253fe9fe2f20d164b7a 100644 (file)
@@ -35,7 +35,7 @@ def collate(input_doc: ConsumableDocument) -> str:
     in reverse order, since the ADF will have scanned the pages from bottom
     to top.
 
-    Returns a status message on succcess, or raises a ConsumerError
+    Returns a status message on success, or raises a ConsumerError
     in case of failure.
     """
 
index 246d03d55aff7289d093c7135b571cab3fe7af25..700a16d8bfd8768f35aecb0fe403be8103b47641 100644 (file)
@@ -224,7 +224,7 @@ def generate_filename(
             if settings.FILENAME_FORMAT_REMOVE_NONE:
                 path = path.replace("/-none-/", "/")  # remove empty directories
                 path = path.replace(" -none-", "")  # remove when spaced, with space
-                path = path.replace("-none-", "")  # remove rest of the occurences
+                path = path.replace("-none-", "")  # remove rest of the occurrences
 
             path = path.replace("-none-", "none")  # backward compatibility
             path = path.strip(os.sep)
index 191f604dec144ff724ea0d79a7e2f04257d95483..16bcf9bd90b3cf2ad92d3e8b2e191808e2f2f550 100644 (file)
@@ -264,7 +264,7 @@ class Command(BaseCommand):
         polling_interval = settings.CONSUMER_POLLING
         if polling_interval == 0:  # pragma: no cover
             # Only happens if INotify failed to import
-            logger.warn("Using polling of 10s, consider settng this")
+            logger.warn("Using polling of 10s, consider setting this")
             polling_interval = 10
 
         with ThreadPoolExecutor(max_workers=4) as pool:
index 15d839db6655e654fead166fd2ba3cb9d3bf2c74..81154b8f46e78c1671fae1f0ac317fdf91f224a6 100644 (file)
@@ -345,7 +345,7 @@ def existing_document_matches_workflow(
         )
         trigger_matched = False
 
-    # Document correpondent vs trigger has_correspondent
+    # Document correspondent vs trigger has_correspondent
     if (
         trigger.filter_has_correspondent is not None
         and document.correspondent != trigger.filter_has_correspondent
index 74cf39854f7b5a242e549e77ab829ad4a55d0c38..b9477a06ccc62e7975282c44153c7bf1b19d1a60 100644 (file)
@@ -22,7 +22,7 @@ class Migration(migrations.Migration):
                     (5, "Fuzzy Match"),
                 ],
                 default=1,
-                help_text='Which algorithm you want to use when matching text to the OCR\'d PDF.  Here, "any" looks for any occurrence of any word provided in the PDF, while "all" requires that every word provided appear in the PDF, albeit not in the order provided.  A "literal" match means that the text you enter must appear in the PDF exactly as you\'ve entered it, and "regular expression" uses a regex to match the PDF.  (If you don\'t know what a regex is, you probably don\'t want this option.)  Finally, a "fuzzy match" looks for words or phrases that are mostly—but not exactly—the same, which can be useful for matching against documents containg imperfections that foil accurate OCR.',
+                help_text='Which algorithm you want to use when matching text to the OCR\'d PDF.  Here, "any" looks for any occurrence of any word provided in the PDF, while "all" requires that every word provided appear in the PDF, albeit not in the order provided.  A "literal" match means that the text you enter must appear in the PDF exactly as you\'ve entered it, and "regular expression" uses a regex to match the PDF.  (If you don\'t know what a regex is, you probably don\'t want this option.)  Finally, a "fuzzy match" looks for words or phrases that are mostly—but not exactly—the same, which can be useful for matching against documents containing imperfections that foil accurate OCR.',
             ),
         ),
         migrations.AlterField(
@@ -37,7 +37,7 @@ class Migration(migrations.Migration):
                     (5, "Fuzzy Match"),
                 ],
                 default=1,
-                help_text='Which algorithm you want to use when matching text to the OCR\'d PDF.  Here, "any" looks for any occurrence of any word provided in the PDF, while "all" requires that every word provided appear in the PDF, albeit not in the order provided.  A "literal" match means that the text you enter must appear in the PDF exactly as you\'ve entered it, and "regular expression" uses a regex to match the PDF.  (If you don\'t know what a regex is, you probably don\'t want this option.)  Finally, a "fuzzy match" looks for words or phrases that are mostly—but not exactly—the same, which can be useful for matching against documents containg imperfections that foil accurate OCR.',
+                help_text='Which algorithm you want to use when matching text to the OCR\'d PDF.  Here, "any" looks for any occurrence of any word provided in the PDF, while "all" requires that every word provided appear in the PDF, albeit not in the order provided.  A "literal" match means that the text you enter must appear in the PDF exactly as you\'ve entered it, and "regular expression" uses a regex to match the PDF.  (If you don\'t know what a regex is, you probably don\'t want this option.)  Finally, a "fuzzy match" looks for words or phrases that are mostly—but not exactly—the same, which can be useful for matching against documents containing imperfections that foil accurate OCR.',
             ),
         ),
     ]
index 6026ce3d2898e48dbd8cddd58f656b78d377705b..ae0d217f694cde15c10e0a5aa3cf586b1cf198ef 100644 (file)
@@ -66,7 +66,7 @@ class Migration(migrations.Migration):
                             (6, "Automatic Classification"),
                         ],
                         default=1,
-                        help_text='Which algorithm you want to use when matching text to the OCR\'d PDF.  Here, "any" looks for any occurrence of any word provided in the PDF, while "all" requires that every word provided appear in the PDF, albeit not in the order provided.  A "literal" match means that the text you enter must appear in the PDF exactly as you\'ve entered it, and "regular expression" uses a regex to match the PDF.  (If you don\'t know what a regex is, you probably don\'t want this option.)  Finally, a "fuzzy match" looks for words or phrases that are mostly—but not exactly—the same, which can be useful for matching against documents containg imperfections that foil accurate OCR.',
+                        help_text='Which algorithm you want to use when matching text to the OCR\'d PDF.  Here, "any" looks for any occurrence of any word provided in the PDF, while "all" requires that every word provided appear in the PDF, albeit not in the order provided.  A "literal" match means that the text you enter must appear in the PDF exactly as you\'ve entered it, and "regular expression" uses a regex to match the PDF.  (If you don\'t know what a regex is, you probably don\'t want this option.)  Finally, a "fuzzy match" looks for words or phrases that are mostly—but not exactly—the same, which can be useful for matching against documents containing imperfections that foil accurate OCR.',
                     ),
                 ),
                 ("is_insensitive", models.BooleanField(default=True)),
@@ -100,7 +100,7 @@ class Migration(migrations.Migration):
                     (6, "Automatic Classification"),
                 ],
                 default=1,
-                help_text='Which algorithm you want to use when matching text to the OCR\'d PDF.  Here, "any" looks for any occurrence of any word provided in the PDF, while "all" requires that every word provided appear in the PDF, albeit not in the order provided.  A "literal" match means that the text you enter must appear in the PDF exactly as you\'ve entered it, and "regular expression" uses a regex to match the PDF.  (If you don\'t know what a regex is, you probably don\'t want this option.)  Finally, a "fuzzy match" looks for words or phrases that are mostly—but not exactly—the same, which can be useful for matching against documents containg imperfections that foil accurate OCR.',
+                help_text='Which algorithm you want to use when matching text to the OCR\'d PDF.  Here, "any" looks for any occurrence of any word provided in the PDF, while "all" requires that every word provided appear in the PDF, albeit not in the order provided.  A "literal" match means that the text you enter must appear in the PDF exactly as you\'ve entered it, and "regular expression" uses a regex to match the PDF.  (If you don\'t know what a regex is, you probably don\'t want this option.)  Finally, a "fuzzy match" looks for words or phrases that are mostly—but not exactly—the same, which can be useful for matching against documents containing imperfections that foil accurate OCR.',
             ),
         ),
         migrations.AlterField(
@@ -116,7 +116,7 @@ class Migration(migrations.Migration):
                     (6, "Automatic Classification"),
                 ],
                 default=1,
-                help_text='Which algorithm you want to use when matching text to the OCR\'d PDF.  Here, "any" looks for any occurrence of any word provided in the PDF, while "all" requires that every word provided appear in the PDF, albeit not in the order provided.  A "literal" match means that the text you enter must appear in the PDF exactly as you\'ve entered it, and "regular expression" uses a regex to match the PDF.  (If you don\'t know what a regex is, you probably don\'t want this option.)  Finally, a "fuzzy match" looks for words or phrases that are mostly—but not exactly—the same, which can be useful for matching against documents containg imperfections that foil accurate OCR.',
+                help_text='Which algorithm you want to use when matching text to the OCR\'d PDF.  Here, "any" looks for any occurrence of any word provided in the PDF, while "all" requires that every word provided appear in the PDF, albeit not in the order provided.  A "literal" match means that the text you enter must appear in the PDF exactly as you\'ve entered it, and "regular expression" uses a regex to match the PDF.  (If you don\'t know what a regex is, you probably don\'t want this option.)  Finally, a "fuzzy match" looks for words or phrases that are mostly—but not exactly—the same, which can be useful for matching against documents containing imperfections that foil accurate OCR.',
             ),
         ),
         migrations.AlterField(
index ee38e16dbaf3c244a79fd660006a79b2d5783b9b..87d6ddc787eab8b18bf121a1209fba71e9b3fc32 100644 (file)
@@ -207,7 +207,7 @@ def create_archive_version(doc, retry_count=3):
                 return
             else:
                 # This is mostly here for the tika parser in docker
-                # environemnts. The servers for parsing need to come up first,
+                # environments. The servers for parsing need to come up first,
                 # and the docker setup doesn't ensure that tika is running
                 # before attempting migrations.
                 logger.error("Parse error, will try again in 5 seconds...")
index 41d3139b35e4e6a0e2472b5eeb814291e86325c8..233c56367d3ed0271649851fd0dcda597866f4ca 100644 (file)
@@ -546,7 +546,7 @@ class CustomFieldInstanceSerializer(serializers.ModelSerializer):
                 if doc_id not in target_doc_ids:
                     self.remove_doclink(document, field, doc_id)
 
-        # Create an instance if target doc doesnt have this field or append it to an existing one
+        # Create an instance if target doc doesn't have this field or append it to an existing one
         existing_custom_field_instances = {
             custom_field.document_id: custom_field
             for custom_field in CustomFieldInstance.objects.filter(
index b782cfa7f6025f2531ead6c7e516ab6cbe869a86..01c62f079b4d30658f2b0c3940eed2a87eae5378 100644 (file)
@@ -617,7 +617,7 @@ def run_workflow(
                             ).count()
                             == 0
                         ):
-                            # can be triggered on existing docs, so only add the field if it doesnt already exist
+                            # can be triggered on existing docs, so only add the field if it doesn't already exist
                             CustomFieldInstance.objects.create(
                                 field=field,
                                 document=document,
index f19711a96c9811fbe19997d5897c9ebc038d1127..66da23ef7bfc0d7409369b49600418da1ba65194 100644 (file)
@@ -1276,7 +1276,7 @@ class TestDocumentApi(DirectoriesMixin, DocumentConsumeDelayMixin, APITestCase):
         GIVEN:
             - NUMBER_OF_SUGGESTED_DATES = 0 (disables feature)
         WHEN:
-            - API reuqest for document suggestions
+            - API request for document suggestions
         THEN:
             - Dont check for suggested dates at all
         """
@@ -1526,7 +1526,7 @@ class TestDocumentApi(DirectoriesMixin, DocumentConsumeDelayMixin, APITestCase):
         GIVEN:
             - A document with a single note
         WHEN:
-            - API reuqest for document notes is made
+            - API request for document notes is made
         THEN:
             - The associated note is returned
         """
index 9f952ec547189e591d0034bac18cbab444452935..0247d3293a43da0c25114a4cd6decc8122a23a3b 100644 (file)
@@ -55,7 +55,7 @@ class TestDocumentSearchApi(DirectoriesMixin, APITestCase):
         with AsyncWriter(index.open_index()) as writer:
             # Note to future self: there is a reason we dont use a model signal handler to update the index: some operations edit many documents at once
             # (retagger, renamer) and we don't want to open a writer for each of these, but rather perform the entire operation with one writer.
-            # That's why we cant open the writer in a model on_save handler or something.
+            # That's why we can't open the writer in a model on_save handler or something.
             index.update_document(writer, d1)
             index.update_document(writer, d2)
             index.update_document(writer, d3)
@@ -903,8 +903,8 @@ class TestDocumentSearchApi(DirectoriesMixin, APITestCase):
         GIVEN:
             - Documents with owners set & without
         WHEN:
-            - API reuqest for advanced query (search) is made by non-superuser
-            - API reuqest for advanced query (search) is made by superuser
+            - API request for advanced query (search) is made by non-superuser
+            - API request for advanced query (search) is made by superuser
         THEN:
             - Only owned docs are returned for regular users
             - All docs are returned for superuser
@@ -959,7 +959,7 @@ class TestDocumentSearchApi(DirectoriesMixin, APITestCase):
         GIVEN:
             - Documents with granted view permissions to others
         WHEN:
-            - API reuqest for advanced query (search) is made by user
+            - API request for advanced query (search) is made by user
         THEN:
             - Only docs with granted view permissions are returned
         """
index 682151a5c437e43fd674d015f524135b0b30e9ee..54b4d7b5325594353ee323d3eacbe3a743a0337d 100644 (file)
@@ -212,8 +212,8 @@ class TestDate(TestCase):
 
     def test_multiple_dates(self):
         text = """This text has multiple dates.
-                  For example 02.02.2018, 22 July 2022 and Dezember 2021.
-                  But not 24-12-9999 because its in the future..."""
+                  For example 02.02.2018, 22 July 2022 and December 2021.
+                  But not 24-12-9999 because it's in the future..."""
         dates = list(parse_date_generator("", text))
         self.assertEqual(len(dates), 3)
         self.assertEqual(
index 962df719286b7eaa51cb1f5eb81c87a3bb3f6097..b0dfc2ed2b07f0bccbd814b9eb6224e4d162fd13 100644 (file)
@@ -43,7 +43,7 @@ class TestDelayedQuery(TestCase):
         )
 
     def test_get_permission_criteria(self):
-        # tests contains touples of user instances and the expected filter
+        # tests contains tuples of user instances and the expected filter
         tests = (
             (None, [query.Term("has_owner", False)]),
             (User(42, username="foo", is_superuser=True), []),
@@ -113,7 +113,7 @@ class TestDelayedQuery(TestCase):
             )
 
     def test_tags_query_filters(self):
-        # tests contains touples of query_parameter dics and the expected whoosh query
+        # tests contains tuples of query_parameter dics and the expected whoosh query
         param = "tags"
         field, _ = DelayedQuery.param_map[param]
         tests = (
index 879f4b0dff1018d3cb80949edc28676b541db508..47b900658c76a6f014d3ca8a59f2f609a3255bb4 100644 (file)
@@ -165,7 +165,7 @@ class TestMigrateToEncrytpedWebPThumbnails(TestMigrations):
     ):
         """
         GIVEN:
-            - Encrytped document exists with existing encrypted WebP thumbnail path
+            - Encrypted document exists with existing encrypted WebP thumbnail path
         WHEN:
             - Migration is attempted
         THEN:
index a9ed6a6ca143281029873fcfa30ddc97a37a2e86..0bfdce2cd8e1f874785fc1c9aa42efc97988a8ba 100644 (file)
@@ -95,8 +95,8 @@ def debug_mode_check(app_configs, **kwargs):
         return [
             Warning(
                 "DEBUG mode is enabled. Disable Debug mode. This is a serious "
-                "security issue, since it puts security overides in place which "
-                "are meant to be only used during development. This "
+                "security issue, since it puts security overrides in place "
+                "which are meant to be only used during development. This "
                 "also means that paperless will tell anyone various "
                 "debugging information when something goes wrong.",
             ),
index f2d306bbf9455f7e158c998326291963c3f25eb3..e13518ce3dc79ecdb07719f9c4f938358eb143c2 100644 (file)
@@ -499,8 +499,8 @@ AUTH_PASSWORD_VALIDATORS = [
 
 # Disable Django's artificial limit on the number of form fields to submit at
 # once. This is a protection against overloading the server, but since this is
-# a self-hosted sort of gig, the benefits of being able to mass-delete a tonne
-# of log entries outweight the benefits of such a safeguard.
+# a self-hosted sort of gig, the benefits of being able to mass-delete a ton
+# of log entries outweigh the benefits of such a safeguard.
 
 DATA_UPLOAD_MAX_NUMBER_FIELDS = None
 
index c79f03affd09435b6617afdb46aa967656e31353..76e5ed2e7821157e3e080d8d2d83af98513f8b06 100644 (file)
@@ -767,7 +767,7 @@ class MailAccountHandler(LoggingMixin):
                 message=message,
             )
         else:
-            # No files to consume, just mark as processed if it wasnt by .eml processing
+            # No files to consume, just mark as processed if it wasn't by .eml processing
             if not ProcessedMail.objects.filter(
                 rule=rule,
                 uid=message.uid,