Skip to content

Commit

Permalink
email exatly one attachment; add markdown output
Browse files Browse the repository at this point in the history
  • Loading branch information
astaff committed Sep 4, 2024
1 parent 3bd0e91 commit e86b78c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
1 change: 1 addition & 0 deletions examples/audio_to_paper.sh
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ echo "Generating Documents..."
sed -E 's/\[\[([0-9]+)\]\]\([^)]+\)//g' |
sed -E 's/\[([0-9]+)\]//g' |
tee \
>(pandoc -o "$(echo "$TITLE" | sed 's/[^a-zA-Z0-9]/_/g')-no-refs.md" --from markdown --to markdown) \
>(pandoc -o "$(echo "$TITLE" | sed 's/[^a-zA-Z0-9]/_/g')-no-refs.pdf" --from markdown --pdf-engine=xelatex) >/dev/null

# With References
Expand Down
6 changes: 2 additions & 4 deletions web/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -342,14 +342,12 @@ async def convert_and_send(request: ConversionRequest, user_id: str):
abstract = ""
logfire.warning("No abstract found in stdout, using default abstract")

files = [f for f in Path(tmpdir).glob("*") if f.is_file()]
files = [f for f in Path(tmpdir).glob("*no-refs.pdf") if f.is_file()]

subject = f"[Platogram] {title}"
body = f"""Hi there!
Platogram transformed spoken words into documents you can read and enjoy, or attach to ChatGPT/Claude/etc and prompt!
You'll find two PDF documents attached: full version, with original transcript and references, and a simplified version, without the transcript and references. I hope this helps!
Platogram transformed spoken words into document you can read and enjoy, or attach to ChatGPT/Claude/etc and prompt!
{abstract}
Expand Down

0 comments on commit e86b78c

Please sign in to comment.