diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..f7275bb
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1 @@
+venv/
diff --git a/.idea/NotePostCLI.iml b/.idea/NotePostCLI.iml
new file mode 100644
index 0000000..85c7612
--- /dev/null
+++ b/.idea/NotePostCLI.iml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/encodings.xml b/.idea/encodings.xml
new file mode 100644
index 0000000..15a15b2
--- /dev/null
+++ b/.idea/encodings.xml
@@ -0,0 +1,4 @@
+
+
+
+
\ No newline at end of file
diff --git a/.idea/misc.xml b/.idea/misc.xml
new file mode 100644
index 0000000..768c227
--- /dev/null
+++ b/.idea/misc.xml
@@ -0,0 +1,4 @@
+
+
+
+
\ No newline at end of file
diff --git a/.idea/modules.xml b/.idea/modules.xml
new file mode 100644
index 0000000..bb389bf
--- /dev/null
+++ b/.idea/modules.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/vcs.xml b/.idea/vcs.xml
new file mode 100644
index 0000000..94a25f7
--- /dev/null
+++ b/.idea/vcs.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/workspace.xml b/.idea/workspace.xml
new file mode 100644
index 0000000..3851d2c
--- /dev/null
+++ b/.idea/workspace.xml
@@ -0,0 +1,155 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 1545952864862
+
+
+ 1545952864862
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/notepost.py b/notepost.py
new file mode 100755
index 0000000..7b86064
--- /dev/null
+++ b/notepost.py
@@ -0,0 +1,55 @@
+#!/usr/bin/env python3
+from os import read
+
+import i18n
+import validators
+import json
+import requests
+from pathlib import Path
+from getpass import getpass
+
+CONFIG_FILE = "~/.config/notepostcli.json"
+
+
+def checkconfig():
+ config_path = Path(CONFIG_FILE)
+ if config_path.is_file():
+ try:
+ # Attempt to read and parse the config file
+ config_file = open(CONFIG_FILE, 'r')
+ json.load(config_file)
+ return True
+ except Exception:
+ return False
+ else:
+ return False
+
+
+def firstsetup():
+ while True:
+ url = input(i18n.t("Server URL: "))
+ if validators.url(url):
+ break
+ else:
+ print(i18n.t("That doesn't look right, try again."))
+ while True:
+ username = input(i18n.t("Username: "))
+ if username != "":
+ break
+ while True:
+ password = getpass(i18n.t("Password: "))
+ if password != "":
+ break
+
+ r = requests.post(url + "/api/ping", data = {"username": username, "password": password})
+ print(r.json())
+
+
+def main():
+ if not checkconfig():
+ print(i18n.t("No valid settings file found, running setup wizard."))
+ firstsetup()
+
+
+if __name__ == "__main__":
+ main()