add wiki page markdown file
This commit is contained in:
parent
2fbe6f773d
commit
61b2083077
|
@ -20,11 +20,27 @@ def initmd(version1,version2,source):
|
||||||
os.chmod(filename,448)
|
os.chmod(filename,448)
|
||||||
return filename
|
return filename
|
||||||
|
|
||||||
|
#初始化关键词与wiki page的markdown文件
|
||||||
|
def initwikimd():
|
||||||
|
dir = os.getcwd() + "/output/"
|
||||||
|
mkdir(dir)
|
||||||
|
filename = dir + "wikipage.md"
|
||||||
|
if os.path.exists(filename):
|
||||||
|
os.chmod(filename,448)
|
||||||
|
return filename
|
||||||
|
else:
|
||||||
|
with open(filename,mode="w") as file:
|
||||||
|
file.write("# kernel wiki page summary\n")
|
||||||
|
file.write("|keyword | wiki page | \n")
|
||||||
|
file.write("| :----- | :-------- | \n")
|
||||||
|
os.chmod(filename,448)
|
||||||
|
return filename
|
||||||
|
|
||||||
#参考格式
|
#参考格式
|
||||||
#| 2af9b20dbb39 | Sat Oct 28 08:15:07 2023 -1000 | Linus Torvalds | torvalds@linux-foundation.org
|
#| 2af9b20dbb39 | Sat Oct 28 08:15:07 2023 -1000 | Linus Torvalds | torvalds@linux-foundation.org
|
||||||
#| Merge tag 'x86-urgent-2023-10-28' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip<br> Pull misc x86 fixes from Ingo Molnar<br> - Fix a possible CPU hotplug deadlock bug caused by the new TSC synchronization code<br> - Fix a legacy PIC discovery bug that results in device troubles on affected systems, such as non-working keybards, etc<br> - Add a new Intel CPU model number to <asm/intel-family.h><br> * tag 'x86-urgent-2023-10-28' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:<br>  x86/tsc: Defer marking TSC unstable to a worker<br>  x86/i8259: Skip probing when ACPI/MADT advertises PCAT compatibility<br>  x86/cpu: Add model number for Intel Arrow Lake mobile processor
|
#| Merge tag 'x86-urgent-2023-10-28' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip<br> Pull misc x86 fixes from Ingo Molnar<br> - Fix a possible CPU hotplug deadlock bug caused by the new TSC synchronization code<br> - Fix a legacy PIC discovery bug that results in device troubles on affected systems, such as non-working keybards, etc<br> - Add a new Intel CPU model number to <asm/intel-family.h><br> * tag 'x86-urgent-2023-10-28' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:<br>  x86/tsc: Defer marking TSC unstable to a worker<br>  x86/i8259: Skip probing when ACPI/MADT advertises PCAT compatibility<br>  x86/cpu: Add model number for Intel Arrow Lake mobile processor
|
||||||
#| fix<br> add model| X86 CPU | arch/x86/include/asm/i8259.h<br> arch/x86/include/asm/intel-family.h<br> arch/x86/kernel/acpi/boot.c<br> arch/x86/kernel/i8259.c<br> arch/x86/kernel/tsc_sync.c<br>
|
#| fix<br> add model| X86 CPU | arch/x86/include/asm/i8259.h<br> arch/x86/include/asm/intel-family.h<br> arch/x86/kernel/acpi/boot.c<br> arch/x86/kernel/i8259.c<br> arch/x86/kernel/tsc_sync.c<br>
|
||||||
def add_commit_info(filename,hash,hash_list):
|
def add_commit_info(filename,wiki_file_name,hash,hash_list):
|
||||||
count = hash_list.index(hash)
|
count = hash_list.index(hash)
|
||||||
print(hash)
|
print(hash)
|
||||||
print(count)
|
print(count)
|
||||||
|
@ -36,11 +52,11 @@ def add_commit_info(filename,hash,hash_list):
|
||||||
file.write("| " + get_commit_email(hash) + " ")
|
file.write("| " + get_commit_email(hash) + " ")
|
||||||
file.write("| " + format(get_commit_abbr(hash),get_commit_body(hash)) + " ")
|
file.write("| " + format(get_commit_abbr(hash),get_commit_body(hash)) + " ")
|
||||||
file.write("| " + get_commit_type(get_commit_body(hash)) + "<br> ")
|
file.write("| " + get_commit_type(get_commit_body(hash)) + "<br> ")
|
||||||
file.write("| " + get_commit_keyword(get_commit_abbr(hash),hash) + "<br> ")
|
file.write("| " + get_commit_keyword(get_commit_abbr(hash),hash,wiki_file_name) + "<br> ")
|
||||||
file.write("| " + format_diff(get_commit_diff_files(hash)) + " |\n")
|
file.write("| " + format_diff(get_commit_diff_files(hash)) + " |\n")
|
||||||
|
|
||||||
#add_commit_info多线程版本
|
#add_commit_info多线程版本
|
||||||
def add_commit_info_threads(lock,filename,hash,hash_list):
|
def add_commit_info_threads(lock,filename,wiki_file_name,hash,hash_list):
|
||||||
lock.acquire()
|
lock.acquire()
|
||||||
count = hash_list.index(hash)
|
count = hash_list.index(hash)
|
||||||
print(hash)
|
print(hash)
|
||||||
|
@ -53,7 +69,7 @@ def add_commit_info_threads(lock,filename,hash,hash_list):
|
||||||
file.write("| " + get_commit_email(hash) + " ")
|
file.write("| " + get_commit_email(hash) + " ")
|
||||||
file.write("| " + format(get_commit_abbr(hash),get_commit_body(hash)) + " ")
|
file.write("| " + format(get_commit_abbr(hash),get_commit_body(hash)) + " ")
|
||||||
file.write("| " + get_commit_type(get_commit_body(hash)) + "<br> ")
|
file.write("| " + get_commit_type(get_commit_body(hash)) + "<br> ")
|
||||||
file.write("| " + get_commit_keyword(get_commit_abbr(hash),hash) + "<br> ")
|
file.write("| " + get_commit_keyword(get_commit_abbr(hash),hash,wiki_file_name) + "<br> ")
|
||||||
file.write("| " + format_diff(get_commit_diff_files(hash)) + " |\n")
|
file.write("| " + format_diff(get_commit_diff_files(hash)) + " |\n")
|
||||||
lock.release()
|
lock.release()
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue