#!notify/bin/python3

import os
import sys
from pushbullet import Pushbullet


def create_note(title, content):
    api_key = os.environ["PB_API_KEY"]
    pb = Pushbullet(api_key)
    pb.push_note(title, content)


if len(sys.argv) >= 3:
    title = sys.argv[1]
    body = sys.argv[2]
    create_note(title, body)
else:
    print("Error: Missing arguments")

@@ -26,18 +26,19 @@
 ort 
-os
+hug
 %0Aimport 
 sys%0A
@@ -33,18 +33,17 @@
 %0Aimport 
-sy
+o
 s%0Afrom p
@@ -72,16 +72,27 @@
 ullet%0A%0A%0A
+@hug.cli()%0A
 def crea
@@ -104,24 +104,56 @@
 te(title
-, conten
+: hug.types.text, content: hug.types.tex
 t):%0A    
@@ -258,144 +258,60 @@
 %0Aif 
-len(sys.argv) %3E= 3:%0A    title = sys.argv%5B1%5D%0A    body = sys.argv%5B2%5D%0A    create_note(title, body)%0Aelse:%0A    print(%22Error: Missing arguments%22
+__name__ == '__main__':%0A    create_note.interface.cli(
 )%0A

Migrate command line interface to hug