Skip to main content

Check that all these files actually exist

ID
2755935
date
2023-12-26 22:20:45+00:00
author
Alex Chan <alex@alexwlchan.net>
parent
067ebb8
message
Check that all these files actually exist
changed files
3 files, 11 additions, 6 deletions

Changed files

cog_helpers.py (1962) → cog_helpers.py (2084)

diff --git a/cog_helpers.py b/cog_helpers.py
index fc0c35e..f3b1be8 100644
--- a/cog_helpers.py
+++ b/cog_helpers.py
@@ -7,6 +7,7 @@ Here Cog is Ned Batchelder's file generation tool, described here:
 https://nedbatchelder.com/code/cog
 """
 
+import os
 import textwrap
 from typing import TypedDict
 
@@ -56,6 +57,9 @@ def create_description_table(
         for index, v in enumerate(variants, start=1):
             name = v.split()[0]
 
+            path = os.path.join(folder_name, name)
+            assert os.path.exists(path), os.path.join(path)
+
             outl(
                 f'<a href="https://github.com/{repo_name}/blob/{primary_branch}/{folder_name}/{name}">',
                 indent=4,

fs/README.md (4350) → fs/README.md (4359)

diff --git a/fs/README.md b/fs/README.md
index c68b3e8..68644b0 100644
--- a/fs/README.md
+++ b/fs/README.md
@@ -36,7 +36,7 @@ scripts = [
         "description": "prints the directory which is the deepest child of the given directory"
     },
     {
-        "name": "emptydir",
+        "name": "emptydir.py",
         "description": "removes any empty directories under the current one (including directories that are empty aside from files that can be safely deleted, e.g. <code>.DS_Store</code>)"
     },
     {
@@ -100,8 +100,8 @@ cog_helpers.create_description_table(folder_name=folder_name, scripts=scripts)
   </dd>
 
   <dt>
-    <a href="https://github.com/alexwlchan/scripts/blob/main/fs/emptydir">
-      <code>emptydir</code>
+    <a href="https://github.com/alexwlchan/scripts/blob/main/fs/emptydir.py">
+      <code>emptydir.py</code>
     </a>
   </dt>
   <dd>
@@ -156,4 +156,4 @@ cog_helpers.create_description_table(folder_name=folder_name, scripts=scripts)
       7.58M ~/repos/scripts</code></pre></p>
   </dd>
 </dl>
-<!-- [[[end]]] (checksum: f58d126f6b43914a355f95c7476ecd35) -->
+<!-- [[[end]]] (checksum: 76e15300c60dae8de5db3c785debc5cf) -->

text/README.md (6120) → text/README.md (6152)

diff --git a/text/README.md b/text/README.md
index 2a208f6..3af6d72 100644
--- a/text/README.md
+++ b/text/README.md
@@ -78,6 +78,7 @@ scripts = [
         "description": "prints a tally of lines in the given text.",
     },
     {
+        "name": "utf8info",
         "usage": "echo [STRING] | utf8info",
         "description": """
         read UTF-8 on stdin and print out the raw Unicode "
@@ -195,7 +196,7 @@ cog_helpers.create_description_table(folder_name=folder_name, scripts=scripts)
   </dd>
 
   <dt>
-    <a href="https://github.com/alexwlchan/scripts/blob/main/text/echo">
+    <a href="https://github.com/alexwlchan/scripts/blob/main/text/utf8info">
       <code>echo [STRING] | utf8info</code>
     </a>
   </dt>
@@ -204,4 +205,4 @@ cog_helpers.create_description_table(folder_name=folder_name, scripts=scripts)
     "codepoints. This is a Docker wrapper around <a href="https://github.com/lunasorcery/utf8info">a tool of the same name</a> by @lunasorcery.
   </dd>
 </dl>
-<!-- [[[end]]] (checksum: 6abfdf25169d3fba58601dec88f4bd9f) -->
\ No newline at end of file
+<!-- [[[end]]] (checksum: 679627866c7239d6d4d5db3a8f03ab91) -->
\ No newline at end of file