implemented app.ed.edbuf and app.blog.bloged

This commit is contained in:
Luxferre
2025-12-26 08:44:37 +02:00
parent e2ff2aaa47
commit 4718bd1844
4 changed files with 15 additions and 4 deletions
+4
View File
@@ -36,3 +36,7 @@ def blogpost(content=None):
content = input_multi('> ')
print('Sending the post...')
return blogpost_str(content)
def bloged():
from app.ed import edbuf
return blogpost(edbuf())
+5
View File
@@ -201,6 +201,11 @@ def edit(fname):
editor = Ed(fname)
editor.run()
def edbuf():
editor = Ed()
editor.run()
return '\n'.join(editor.buffer)
def view(fname, lno=False):
try:
with open(fname, 'r') as f: