mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-25 17:12:03 +00:00
Remove unused script #2
This commit is contained in:
parent
aec554c223
commit
eefff21f6d
@ -1,41 +0,0 @@
|
|||||||
#!/usr/bin/env python
|
|
||||||
# -*- coding: utf-8 -*-
|
|
||||||
|
|
||||||
SOURCES_TREE = 'ru'
|
|
||||||
from os import walk
|
|
||||||
|
|
||||||
|
|
||||||
def get_header(filepath):
|
|
||||||
f = open(filepath)
|
|
||||||
header = ''
|
|
||||||
for line in f:
|
|
||||||
if line.startswith('#'):
|
|
||||||
# print line
|
|
||||||
header = line[1:].strip(' \n')
|
|
||||||
break
|
|
||||||
|
|
||||||
f.close()
|
|
||||||
return header
|
|
||||||
|
|
||||||
|
|
||||||
pages_file = open("strings_for_pages.txt", "w")
|
|
||||||
md_links_file = open("links_for_md.txt", "w")
|
|
||||||
|
|
||||||
for (dirpath, dirnames, filenames) in walk(SOURCES_TREE):
|
|
||||||
for filename in filenames:
|
|
||||||
|
|
||||||
if '.md' not in filename:
|
|
||||||
continue
|
|
||||||
|
|
||||||
header = get_header(dirpath + '/' + filename)
|
|
||||||
path = dirpath.replace('docs/', '') + '/' + filename
|
|
||||||
|
|
||||||
if filename == 'index.md':
|
|
||||||
pages_file.write("- '" + header + "': " + "'" + path + "'\n")
|
|
||||||
else:
|
|
||||||
pages_file.write(" - '" + header + "': " + "'" + path + "'\n")
|
|
||||||
|
|
||||||
md_links_file.write("[" + header + "](" + path + ")\n")
|
|
||||||
|
|
||||||
pages_file.close()
|
|
||||||
md_links_file.close()
|
|
Loading…
Reference in New Issue
Block a user