Browse Source

Trying to make it build to a deb without failing

tags/v0.1
Skylar Ittner 7 months ago
parent
commit
0b6e59e575
10 changed files with 84 additions and 64 deletions
  1. 9
    0
      .gitignore
  2. 24
    51
      .idea/workspace.xml
  3. 1
    1
      README.md
  4. 0
    0
      notepostcli/__init__.py
  5. 4
    0
      notepostcli/api.py
  6. 4
    0
      notepostcli/config.py
  7. 9
    2
      notepostcli/notepost.py
  8. 5
    0
      notepostcli/termcolors.py
  9. 0
    10
      requirements.txt
  10. 28
    0
      setup.py

+ 9
- 0
.gitignore View File

@@ -1,2 +1,11 @@
1 1
 venv/
2 2
 __pycache__/
3
+.idea/
4
+bin/
5
+deb_dist/
6
+dist/
7
+include/
8
+lib/
9
+NotePostCLI-*.tar.gz
10
+share/
11
+NotePostCLI.egg-info/

+ 24
- 51
.idea/workspace.xml View File

@@ -1,7 +1,14 @@
1 1
 <?xml version="1.0" encoding="UTF-8"?>
2 2
 <project version="4">
3 3
   <component name="ChangeListManager">
4
-    <list default="true" id="7e2ff7f2-75de-431f-9457-e0d648b65015" name="Default Changelist" comment="" />
4
+    <list default="true" id="7e2ff7f2-75de-431f-9457-e0d648b65015" name="Default Changelist" comment="">
5
+      <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
6
+      <change beforePath="$PROJECT_DIR$/README.md" beforeDir="false" afterPath="$PROJECT_DIR$/README.md" afterDir="false" />
7
+      <change beforePath="$PROJECT_DIR$/api.py" beforeDir="false" />
8
+      <change beforePath="$PROJECT_DIR$/config.py" beforeDir="false" />
9
+      <change beforePath="$PROJECT_DIR$/notepost.py" beforeDir="false" />
10
+      <change beforePath="$PROJECT_DIR$/termcolors.py" beforeDir="false" />
11
+    </list>
5 12
     <option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
6 13
     <option name="SHOW_DIALOG" value="false" />
7 14
     <option name="HIGHLIGHT_CONFLICTS" value="true" />
@@ -11,43 +18,10 @@
11 18
   <component name="FileEditorManager">
12 19
     <leaf SIDE_TABS_SIZE_LIMIT_KEY="300">
13 20
       <file pinned="false" current-in-tab="true">
14
-        <entry file="file://$PROJECT_DIR$/notepost.py">
21
+        <entry file="file://$PROJECT_DIR$/setup.py">
15 22
           <provider selected="true" editor-type-id="text-editor">
16
-            <state relative-caret-position="689">
17
-              <caret line="183" column="18" lean-forward="true" selection-start-line="183" selection-start-column="18" selection-end-line="183" selection-end-column="18" />
18
-              <folding>
19
-                <element signature="e#24#39#0" expanded="true" />
20
-              </folding>
21
-            </state>
22
-          </provider>
23
-        </entry>
24
-      </file>
25
-      <file pinned="false" current-in-tab="false">
26
-        <entry file="file://$PROJECT_DIR$/termcolors.py">
27
-          <provider selected="true" editor-type-id="text-editor">
28
-            <state relative-caret-position="285">
29
-              <caret line="19" column="22" selection-start-line="19" selection-start-column="22" selection-end-line="19" selection-end-column="22" />
30
-            </state>
31
-          </provider>
32
-        </entry>
33
-      </file>
34
-      <file pinned="false" current-in-tab="false">
35
-        <entry file="file://$PROJECT_DIR$/api.py">
36
-          <provider selected="true" editor-type-id="text-editor">
37
-            <state relative-caret-position="165">
38
-              <caret line="11" column="56" selection-start-line="11" selection-start-column="56" selection-end-line="11" selection-end-column="56" />
39
-              <folding>
40
-                <element signature="e#24#35#0" expanded="true" />
41
-              </folding>
42
-            </state>
43
-          </provider>
44
-        </entry>
45
-      </file>
46
-      <file pinned="false" current-in-tab="false">
47
-        <entry file="file://$PROJECT_DIR$/config.py">
48
-          <provider selected="true" editor-type-id="text-editor">
49
-            <state relative-caret-position="60">
50
-              <caret line="4" column="9" selection-start-line="4" selection-start-column="9" selection-end-line="4" selection-end-column="9" />
23
+            <state relative-caret-position="375">
24
+              <caret line="26" selection-start-line="26" selection-end-line="26" />
51 25
             </state>
52 26
           </provider>
53 27
         </entry>
@@ -163,7 +137,6 @@
163 137
   </component>
164 138
   <component name="ToolWindowManager">
165 139
     <frame x="4" y="0" width="1912" height="1038" extended-state="0" />
166
-    <editor active="true" />
167 140
     <layout>
168 141
       <window_info active="true" content_ui="combo" id="Project" order="0" visible="true" weight="0.18075491" />
169 142
       <window_info id="Structure" order="1" side_tool="true" weight="0.25" />
@@ -194,23 +167,26 @@
194 167
       </provider>
195 168
     </entry>
196 169
     <entry file="file://$PROJECT_DIR$/note.class.py" />
197
-    <entry file="file://$PROJECT_DIR$/termcolors.py">
170
+    <entry file="file://$PROJECT_DIR$/notepost.py">
198 171
       <provider selected="true" editor-type-id="text-editor">
199
-        <state relative-caret-position="285">
200
-          <caret line="19" column="22" selection-start-line="19" selection-start-column="22" selection-end-line="19" selection-end-column="22" />
172
+        <state relative-caret-position="2640">
173
+          <caret line="183" column="18" lean-forward="true" selection-start-line="183" selection-start-column="18" selection-end-line="183" selection-end-column="18" />
174
+          <folding>
175
+            <element signature="e#24#39#0" expanded="true" />
176
+          </folding>
201 177
         </state>
202 178
       </provider>
203 179
     </entry>
204
-    <entry file="file://$PROJECT_DIR$/setup.py">
180
+    <entry file="file://$PROJECT_DIR$/termcolors.py">
205 181
       <provider selected="true" editor-type-id="text-editor">
206
-        <state relative-caret-position="585">
207
-          <caret line="39" column="75" selection-start-line="39" selection-start-column="75" selection-end-line="39" selection-end-column="75" />
182
+        <state relative-caret-position="285">
183
+          <caret line="19" column="22" selection-start-line="19" selection-start-column="22" selection-end-line="19" selection-end-column="22" />
208 184
         </state>
209 185
       </provider>
210 186
     </entry>
211 187
     <entry file="file://$PROJECT_DIR$/api.py">
212 188
       <provider selected="true" editor-type-id="text-editor">
213
-        <state relative-caret-position="165">
189
+        <state relative-caret-position="120">
214 190
           <caret line="11" column="56" selection-start-line="11" selection-start-column="56" selection-end-line="11" selection-end-column="56" />
215 191
           <folding>
216 192
             <element signature="e#24#35#0" expanded="true" />
@@ -225,13 +201,10 @@
225 201
         </state>
226 202
       </provider>
227 203
     </entry>
228
-    <entry file="file://$PROJECT_DIR$/notepost.py">
204
+    <entry file="file://$PROJECT_DIR$/setup.py">
229 205
       <provider selected="true" editor-type-id="text-editor">
230
-        <state relative-caret-position="689">
231
-          <caret line="183" column="18" lean-forward="true" selection-start-line="183" selection-start-column="18" selection-end-line="183" selection-end-column="18" />
232
-          <folding>
233
-            <element signature="e#24#39#0" expanded="true" />
234
-          </folding>
206
+        <state relative-caret-position="375">
207
+          <caret line="26" selection-start-line="26" selection-end-line="26" />
235 208
         </state>
236 209
       </provider>
237 210
     </entry>

+ 1
- 1
README.md View File

@@ -1,4 +1,4 @@
1 1
 NotePostCLI
2 2
 ===========
3 3
 
4
-A simple Python-based terminal app for using NotePost.
4
+A simple Python terminal app for using NotePost.

+ 0
- 0
notepostcli/__init__.py View File


api.py → notepostcli/api.py View File

@@ -1,5 +1,9 @@
1 1
 #!/usr/bin/env python3
2 2
 
3
+# This Source Code Form is subject to the terms of the Mozilla Public
4
+# License, v. 2.0. If a copy of the MPL was not distributed with this
5
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
6
+
3 7
 import i18n
4 8
 import requests
5 9
 

config.py → notepostcli/config.py View File

@@ -1,5 +1,9 @@
1 1
 #!/usr/bin/env python3
2 2
 
3
+# This Source Code Form is subject to the terms of the Mozilla Public
4
+# License, v. 2.0. If a copy of the MPL was not distributed with this
5
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
6
+
3 7
 import json
4 8
 import appdirs
5 9
 import os

notepost.py → notepostcli/notepost.py View File

@@ -1,5 +1,9 @@
1 1
 #!/usr/bin/env python3
2 2
 
3
+# This Source Code Form is subject to the terms of the Mozilla Public
4
+# License, v. 2.0. If a copy of the MPL was not distributed with this
5
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
6
+
3 7
 import tempfile
4 8
 import i18n
5 9
 import validators
@@ -128,7 +132,10 @@ def editmenu():
128 132
     if noteid.upper() == "M":
129 133
         clearscreen()
130 134
         return
131
-    editnote(notelist[noteid])
135
+    try:
136
+        editnote(notelist[noteid])
137
+    except KeyError:
138
+        print(i18n.t("Invalid selection."))
132 139
 
133 140
 
134 141
 def newnote():
@@ -174,7 +181,7 @@ def mainmenu():
174 181
 
175 182
 
176 183
 def main():
177
-    print("NotePostCLI v1.0")
184
+    print("NotePostCLI v0.1")
178 185
     if not checkconfig():
179 186
         print(i18n.t("No valid settings file found, running setup wizard."))
180 187
         firstsetup()

termcolors.py → notepostcli/termcolors.py View File

@@ -1,4 +1,9 @@
1 1
 #!/usr/bin/env python3
2
+
3
+# This Source Code Form is subject to the terms of the Mozilla Public
4
+# License, v. 2.0. If a copy of the MPL was not distributed with this
5
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
6
+
2 7
 from math import sqrt
3 8
 
4 9
 

+ 0
- 10
requirements.txt View File

@@ -1,10 +0,0 @@
1
-appdirs==1.4.3
2
-certifi==2018.11.29
3
-chardet==3.0.4
4
-decorator==4.3.0
5
-idna==2.8
6
-python-i18n==0.3.5
7
-requests==2.21.0
8
-six==1.12.0
9
-urllib3==1.24.1
10
-validators==0.12.3

+ 28
- 0
setup.py View File

@@ -0,0 +1,28 @@
1
+#!/usr/bin/env python3
2
+
3
+
4
+from setuptools import setup, find_packages
5
+setup(
6
+    name="NotePostCLI",
7
+    version="0.1",
8
+    packages=find_packages(),
9
+    install_requires=[
10
+        "appdirs==1.4.3",
11
+        "certifi==2018.11.29",
12
+        "chardet==3.0.4",
13
+        "decorator==4.3.0",
14
+        "idna==2.8",
15
+        "python-i18n==0.3.5",
16
+        "requests==2.21.0",
17
+        "six>=1.11.0",
18
+        "urllib3==1.24.1",
19
+        "validators==0.12.3"
20
+    ],
21
+    entry_points = {
22
+        'console_scripts' : ['notepost = notepostcli.notepost:main']
23
+    },
24
+    author="Netsyms Technologies",
25
+    author_email="opensource@netsyms.com",
26
+    license="MPL-2.0",
27
+    url="https://source.netsyms.com/Apps/NotePostCLI"
28
+)

Loading…
Cancel
Save