NexusInstruments commited on
Commit
2a8c0b3
·
verified ·
1 Parent(s): 894c2eb

Update utils/docgen.py

Browse files
Files changed (1) hide show
  1. utils/docgen.py +5 -4
utils/docgen.py CHANGED
@@ -1,13 +1,14 @@
1
  import hashlib
2
 
3
  def generate_doc(name: str, path: str, content: str) -> str:
4
- """Generate basic README-style documentation for a script"""
5
  sha1 = hashlib.sha1(content.encode()).hexdigest()
6
  usage = "bash " + name if name.endswith(".sh") else f"python {name}"
7
  preview = content[:300]
8
 
9
  return f"""# {name}
10
- **Path:** {path}
11
- **SHA1:** {sha1}
12
 
13
- ## Preview
 
 
 
 
1
  import hashlib
2
 
3
  def generate_doc(name: str, path: str, content: str) -> str:
4
+ """Generate basic README-style documentation for a script."""
5
  sha1 = hashlib.sha1(content.encode()).hexdigest()
6
  usage = "bash " + name if name.endswith(".sh") else f"python {name}"
7
  preview = content[:300]
8
 
9
  return f"""# {name}
 
 
10
 
11
+ **Path:** `{path}`
12
+ **SHA1:** `{sha1}`
13
+
14
+ ## Usage