Remove randline, which has graduated to a new repo
- ID
6837064- date
2025-01-11 11:07:34+00:00- author
Alex Chan <alex@alexwlchan.net>- parent
d3334df- message
Remove `randline`, which has graduated to a new repo- changed files
2 files, 1 addition, 29 deletions
Changed files
text/README.md (9038) → text/README.md (8575)
diff --git a/text/README.md b/text/README.md
index 31bc97d..f304df0 100644
--- a/text/README.md
+++ b/text/README.md
@@ -83,10 +83,6 @@ scripts = [
""",
},
{
- "usage": "randline [NUMBER] < [PATH]",
- "description": "prints randomly selected lines from the given text. If `NUMBER` is unspecified, it prints a single line.",
- },
- {
"usage": "recog",
"description": """
Find all the README files under the current folder, and process them using <a href="https://nedbatchelder.com/code/cog">Cog</a>.
@@ -236,15 +232,6 @@ cog_helpers.create_description_table(folder_name=folder_name, scripts=scripts)
</dd>
<dt>
- <a href="https://github.com/alexwlchan/scripts/blob/main/text/randline">
- <code>randline [NUMBER] < [PATH]</code>
- </a>
- </dt>
- <dd>
- prints randomly selected lines from the given text. If `NUMBER` is unspecified, it prints a single line.
- </dd>
-
- <dt>
<a href="https://github.com/alexwlchan/scripts/blob/main/text/recog">
<code>recog</code>
</a>
@@ -293,4 +280,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: a84b7f3702442495b6e7efbc28b5107e) -->
\ No newline at end of file
+<!-- [[[end]]] (checksum: 06f29ab9e718017036fe699b5efafd00) -->
\ No newline at end of file
text/randline (254) → text/randline (0)
diff --git a/text/randline b/text/randline
deleted file mode 100755
index fac50b1..0000000
--- a/text/randline
+++ /dev/null
@@ -1,15 +0,0 @@
-#!/usr/bin/env python3
-
-import random
-import sys
-
-
-if __name__ == "__main__":
- lines = sys.stdin.read().splitlines()
- try:
- k = int(sys.argv[1])
- except IndexError:
- k = 1
-
- random.shuffle(lines)
- print("\n".join(lines[:k]))