|
|
|
@ -46,6 +46,8 @@ class Command:
|
|
|
|
|
await self._react()
|
|
|
|
|
elif self.command.startswith("help"):
|
|
|
|
|
await self._show_help()
|
|
|
|
|
elif self.command.startswith("scribe"):
|
|
|
|
|
await self._new_org_todo()
|
|
|
|
|
else:
|
|
|
|
|
await self._unknown_command()
|
|
|
|
|
|
|
|
|
@ -87,6 +89,16 @@ class Command:
|
|
|
|
|
text = "Unknown help topic!"
|
|
|
|
|
await send_text_to_room(self.client, self.room.room_id, text)
|
|
|
|
|
|
|
|
|
|
async def _new_org_todo(self):
|
|
|
|
|
"""Given a plaintext string, return org-formatted todo line."""
|
|
|
|
|
formatted_string = " ".join(self.args)
|
|
|
|
|
new_string = f"* {formatted_string} \n"
|
|
|
|
|
await send_text_to_room(self.client, self.room.room_id, f"creating new todo with {new_string}")
|
|
|
|
|
print(dir(self.config))
|
|
|
|
|
with open(self.config.orgmode_refile_path, "a") as orgfile:
|
|
|
|
|
orgfile.write(new_string)
|
|
|
|
|
# return new_string
|
|
|
|
|
|
|
|
|
|
async def _unknown_command(self):
|
|
|
|
|
await send_text_to_room(
|
|
|
|
|
self.client,
|
|
|
|
|