mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-29 16:54:59 +00:00
wip
This commit is contained in:
parent
6e03d2f214
commit
c8e8967d45
2 changed files with 13 additions and 7 deletions
|
@ -1,33 +1,34 @@
|
|||
import argparse
|
||||
import json
|
||||
|
||||
import markdown
|
||||
|
||||
import tiktoken
|
||||
from prompt_toolkit.completion import Completion
|
||||
|
||||
from aider import prompts
|
||||
from aider import models, prompts
|
||||
from aider.dump import dump # noqa: F401
|
||||
from aider.sendchat import simple_send_with_retries
|
||||
|
||||
from .dump import dump # noqa: F401
|
||||
|
||||
def main():
|
||||
parser = argparse.ArgumentParser()
|
||||
parser.add_argument("filename", help="Markdown file to parse")
|
||||
args = parser.parse_args()
|
||||
|
||||
with open(args.filename, 'r') as f:
|
||||
with open(args.filename, "r") as f:
|
||||
text = f.read()
|
||||
|
||||
md = markdown.Markdown()
|
||||
tree = md.parse(text)
|
||||
|
||||
for element in tree.getiterator():
|
||||
if element.tag in ['h1', 'h4'] and element.text is not None:
|
||||
if element.tag in ["h1", "h4"] and element.text is not None:
|
||||
print(element.text)
|
||||
elif element.tag == 'blockquote':
|
||||
elif element.tag == "blockquote":
|
||||
continue
|
||||
else:
|
||||
print(element.text)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
|
||||
|
|
|
@ -24,3 +24,8 @@ And got this output:
|
|||
|
||||
{output}
|
||||
"""
|
||||
|
||||
# CHAT HISTORY
|
||||
summarize = """
|
||||
Summarize the conversation.
|
||||
"""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue