emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/sqlite3 84bd83a7fa 42/62: Removed unused codes from consts


From: ELPA Syncer
Subject: [nongnu] elpa/sqlite3 84bd83a7fa 42/62: Removed unused codes from consts.c
Date: Tue, 14 Mar 2023 11:01:47 -0400 (EDT)

branch: elpa/sqlite3
commit 84bd83a7faf8b25aad8d1679ea9cd415eb0c8228
Author: Uphill Battler <code@uphill.me>
Commit: Uphill Battler <code@uphill.me>

    Removed unused codes from consts.c
---
 tools/md-toc.py | 43 -------------------------------------------
 1 file changed, 43 deletions(-)

diff --git a/tools/md-toc.py b/tools/md-toc.py
deleted file mode 100755
index 410401fa7d..0000000000
--- a/tools/md-toc.py
+++ /dev/null
@@ -1,43 +0,0 @@
-#!/usr/bin/env python3
-
-# Usage: md-toc.py in_file.md > out_file.md
-#
-# Generate a TOC for markdown
-# for 2nd- ("## ....") and 3rd-level ("### ....") headings
-# Put <<TOC>> in the file to mark the location of the TOC
-
-import sys
-
-def main():
-  in_file = sys.argv[1]
-  toc_lines = []
-  lines_before_toc = []
-  lines_after_toc = []
-  anchor_count = 1
-
-  dest = lines_before_toc
-
-  with open(in_file, 'r') as fp:
-    for l in fp.readlines():
-      l = l.rstrip()
-      if l == '<<TOC>>':
-        dest = lines_after_toc
-        dest.append('')
-      elif l.startswith('## '):
-        toc_lines.append(f'* [{l[3:]}](#{anchor_count})')
-        dest.append(f'## <a name="{anchor_count}"/> {l[3:]}')
-        anchor_count += 1
-      elif l.startswith('### '):
-        toc_lines.append(f'    * [{l[4:]}](#{anchor_count})')
-        dest.append(f'### <a name="{anchor_count}"/> {l[4:]}')
-        anchor_count += 1
-      else:
-        dest.append(l)
-
-  for ls in [lines_before_toc, toc_lines, lines_after_toc]:
-    for l in ls:
-      print(l)
-
-
-if __name__ == '__main__':
-  main()



reply via email to

[Prev in Thread] Current Thread [Next in Thread]