python tool: add default tags
This commit is contained in:
parent
77fa0992a8
commit
230582920e
|
@ -4,6 +4,7 @@ import subprocess
|
||||||
import urllib.parse
|
import urllib.parse
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
|
import time
|
||||||
|
|
||||||
abspath = os.path.abspath(__file__)
|
abspath = os.path.abspath(__file__)
|
||||||
dname = os.path.dirname(abspath)
|
dname = os.path.dirname(abspath)
|
||||||
|
@ -90,7 +91,7 @@ while not (command == "quit" or command == "exit" or command == "q"):
|
||||||
if answer == "y" or answer == "yes":
|
if answer == "y" or answer == "yes":
|
||||||
note = {
|
note = {
|
||||||
"title": command,
|
"title": command,
|
||||||
"content": "---\ntitle: " + command + "\n---\n\n"
|
"content": "---\ntitle: " + command + "\ndate: " + time.strftime("%Y-%m-%d") + "\ntags: \n---\n\n"
|
||||||
}
|
}
|
||||||
data.insert(0, note)
|
data.insert(0, note)
|
||||||
editnote(note)
|
editnote(note)
|
||||||
|
|
Loading…
Reference in New Issue