-
Notifications
You must be signed in to change notification settings - Fork 72
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Upload asm dump to GitHub Pages (#997)
Also clean up the CI scripts a bit.
- Loading branch information
Showing
10 changed files
with
165 additions
and
55 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
#!/usr/bin/env bash | ||
set -euo pipefail | ||
|
||
mwcc_exe=/opt/mwcc_compiler/1.2.5n/mwcceppc.exe | ||
mwcc_args=( | ||
'-nowraplines' | ||
'-msgstyle' 'gcc' | ||
'-lang' 'c' | ||
'-cwd' 'source' | ||
'-Cpp_exceptions' 'off' | ||
'-proc' 'gekko' | ||
'-DGEKKO' | ||
'-fp' 'hard' | ||
'-fp_contract' 'on' | ||
'-O4,p' | ||
'-enum' 'int' | ||
'-nodefaults' | ||
'-inline' 'auto' | ||
'-requireprotos' | ||
'-warn' 'iserror' | ||
'-i' 'src/melee' | ||
'-i' 'src/melee/ft/chara' | ||
'-I-' | ||
'-i' 'src' | ||
'-i' 'src/MSL' | ||
'-i' 'src/Runtime' | ||
'-i' 'src/sysdolphin' | ||
'-c' | ||
) | ||
|
||
"$WINE" "$mwcc_exe" "${mwcc_args[@]}" "$@" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,16 @@ | ||
argcomplete==2.0.0 | ||
black==23.1.0 | ||
colorama==0.4.6 | ||
coverage==7.1.0 | ||
cxxfilt==0.3.0 | ||
argcomplete>=2.0.0 | ||
beautifulsoup4>=4.12.2 | ||
black>=23.1.0 | ||
colorama>=0.4.6 | ||
coverage>=7.1.0 | ||
cxxfilt>=0.3.0 | ||
GitPython>=3.1.32 | ||
graphviz==0.20.1 | ||
isort==5.12.0 | ||
humanfriendly==10.0 | ||
pcpp==1.30 | ||
pyelftools==0.29 | ||
graphviz>=0.20.1 | ||
isort>=5.12.0 | ||
humanfriendly>=10.0 | ||
pcpp>=1.30 | ||
pyelftools>=0.29 | ||
Pygments>=2.15.0 | ||
pyperclip==1.8.2 | ||
pyperclip>=1.8.2 | ||
python_Levenshtein>=0.20.9 | ||
watchdog==2.2.1 | ||
watchdog>=2.2.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
#!/usr/bin/python3 | ||
import argparse | ||
from pathlib import Path | ||
from typing import cast | ||
|
||
from bs4 import BeautifulSoup, Tag | ||
|
||
|
||
def generate_nested_html_list(directory_path): | ||
root = Path(directory_path) | ||
|
||
# Create a new BeautifulSoup object | ||
soup = BeautifulSoup("<ul></ul>", "html.parser") | ||
ul = cast(Tag, soup.ul) | ||
|
||
# Iterate over the directory structure using a stack | ||
stack = [(root, ul)] | ||
|
||
while stack: | ||
current_dir, current_ul = stack.pop() | ||
|
||
# Iterate over the subdirectories and files in the current directory | ||
for item in sorted(current_dir.iterdir()): | ||
if item.is_dir(): | ||
# Create a new <li> element for the subdirectory | ||
li = soup.new_tag("li") | ||
li.string = item.name | ||
|
||
# Create a new <ul> element for the subdirectory's contents | ||
sub_ul = soup.new_tag("ul") | ||
|
||
# Append the <li> and <ul> elements to the current <ul> | ||
current_ul.append(li) | ||
current_ul.append(sub_ul) | ||
|
||
# Push the subdirectory and its <ul> element to the stack | ||
stack.append((item, sub_ul)) | ||
|
||
else: | ||
# Create a new <li> element for the file | ||
li = soup.new_tag("li") | ||
a = soup.new_tag("a") | ||
a.attrs["href"] = str(item.relative_to(root)) | ||
a.attrs["target"] = "_blank" | ||
a.string = item.name | ||
|
||
# Append the <li> element to the current <ul> | ||
li.append(a) | ||
current_ul.append(li) | ||
|
||
return soup.prettify() | ||
|
||
|
||
if __name__ == "__main__": | ||
parser = argparse.ArgumentParser( | ||
description="Generate nested HTML list from directory structure" | ||
) | ||
parser.add_argument("directory", type=Path, help="Path to the directory") | ||
parser.add_argument("output_file", type=Path, help="Path to the output HTML file") | ||
args = parser.parse_args() | ||
|
||
html_list = generate_nested_html_list(args.directory) | ||
args.output_file.write_text(html_list, encoding="utf-8") |