AutoYADM commit: 2025-03-25 13:45:07
This commit is contained in:
parent
fa9177b417
commit
fadf9c9d31
3 changed files with 24 additions and 7 deletions
4
.config/mail/1742924137042008814_13717.py
Executable file
4
.config/mail/1742924137042008814_13717.py
Executable file
|
@ -0,0 +1,4 @@
|
|||
#!/bin/env python
|
||||
|
||||
print("test")
|
||||
|
|
@ -24,7 +24,11 @@ import sys
|
|||
|
||||
skipping = False
|
||||
in_par = False
|
||||
for line in sys.stdin:
|
||||
running = True
|
||||
while running:
|
||||
line = sys.stdin.readline()
|
||||
if line == '':
|
||||
running = False
|
||||
if line.startswith(">"):
|
||||
# ignore quoted line
|
||||
print(line, end = "")
|
||||
|
@ -39,27 +43,31 @@ for line in sys.stdin:
|
|||
# Empty line
|
||||
in_par = not in_par
|
||||
print()
|
||||
print("printing empty line")
|
||||
# print(line, end="")
|
||||
else:
|
||||
if not skipping and in_par:
|
||||
par = []
|
||||
for next_line in sys.stdin:
|
||||
while True:
|
||||
next_line = sys.stdin.readline()
|
||||
# if not line.startswith((">", "```", "--")):
|
||||
stripped = next_line.rstrip()
|
||||
print("runs")
|
||||
# print(next_line)
|
||||
# print("runs")
|
||||
if stripped:
|
||||
print("runs")
|
||||
# print("runs strip")
|
||||
par.append(stripped)
|
||||
else:
|
||||
in_par = False
|
||||
par.append("\n")
|
||||
print("breaking par")
|
||||
# par.append("\n")
|
||||
break
|
||||
line = " ".join(par)
|
||||
print(par)
|
||||
# print(par)
|
||||
# empty line, treat next section as paragraph
|
||||
# TODO: fix signature being mangled and newlines erased
|
||||
if not skipping:
|
||||
wrapped = textwrap.wrap(line, width=74, break_long_words=False, replace_whitespace=True)
|
||||
print("\n".join(wrapped))
|
||||
print("\n".join(wrapped), end="")
|
||||
else:
|
||||
print(line, end = "")
|
||||
|
|
5
.config/mail/test2.txt
Normal file
5
.config/mail/test2.txt
Normal file
|
@ -0,0 +1,5 @@
|
|||
test one
|
||||
|
||||
test two
|
||||
|
||||
test three
|
Loading…
Add table
Add a link
Reference in a new issue