znote 1.2.7__tar.gz → 1.2.8__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {znote-1.2.7/znote.egg-info → znote-1.2.8}/PKG-INFO +1 -1
- {znote-1.2.7 → znote-1.2.8}/znote/client.py +17 -4
- {znote-1.2.7 → znote-1.2.8/znote.egg-info}/PKG-INFO +1 -1
- {znote-1.2.7 → znote-1.2.8}/LICENSE +0 -0
- {znote-1.2.7 → znote-1.2.8}/README.md +0 -0
- {znote-1.2.7 → znote-1.2.8}/setup.cfg +0 -0
- {znote-1.2.7 → znote-1.2.8}/znote/__init__.py +0 -0
- {znote-1.2.7 → znote-1.2.8}/znote/app/display.p +0 -0
- {znote-1.2.7 → znote-1.2.8}/znote/app/display.py +0 -0
- {znote-1.2.7 → znote-1.2.8}/znote/app/input.py +0 -0
- {znote-1.2.7 → znote-1.2.8}/znote/core/auth.py +0 -0
- {znote-1.2.7 → znote-1.2.8}/znote/core/client/connect.py +0 -0
- {znote-1.2.7 → znote-1.2.8}/znote/core/client/fetch.py +0 -0
- {znote-1.2.7 → znote-1.2.8}/znote/core/client/metafile.py +0 -0
- {znote-1.2.7 → znote-1.2.8}/znote/core/client/settings.py +0 -0
- {znote-1.2.7 → znote-1.2.8}/znote/core/client/token.py +0 -0
- {znote-1.2.7 → znote-1.2.8}/znote/core/config.py +0 -0
- {znote-1.2.7 → znote-1.2.8}/znote/core/editor.py +0 -0
- {znote-1.2.7 → znote-1.2.8}/znote/core/gen.py +0 -0
- {znote-1.2.7 → znote-1.2.8}/znote/core/pack.py +0 -0
- {znote-1.2.7 → znote-1.2.8}/znote/core/server/note.py +0 -0
- {znote-1.2.7 → znote-1.2.8}/znote/core/server/settings.py +0 -0
- {znote-1.2.7 → znote-1.2.8}/znote/core/workspace.py +0 -0
- {znote-1.2.7 → znote-1.2.8}/znote/main.py +0 -0
- {znote-1.2.7 → znote-1.2.8}/znote/model/models.py +0 -0
- {znote-1.2.7 → znote-1.2.8}/znote/server.py +0 -0
- {znote-1.2.7 → znote-1.2.8}/znote.egg-info/SOURCES.txt +0 -0
- {znote-1.2.7 → znote-1.2.8}/znote.egg-info/dependency_links.txt +0 -0
- {znote-1.2.7 → znote-1.2.8}/znote.egg-info/entry_points.txt +0 -0
- {znote-1.2.7 → znote-1.2.8}/znote.egg-info/requires.txt +0 -0
- {znote-1.2.7 → znote-1.2.8}/znote.egg-info/top_level.txt +0 -0
|
@@ -187,7 +187,12 @@ class Client():
|
|
|
187
187
|
{'module': 'app.display', 'submodule': ['logs', 'notify']},
|
|
188
188
|
)
|
|
189
189
|
def publish_file(self, file, expanded_path, channel_name):
|
|
190
|
-
|
|
190
|
+
if expanded_path:
|
|
191
|
+
filename = os.path.relpath(file, expanded_path)
|
|
192
|
+
else:
|
|
193
|
+
filename = os.path.basename(file)
|
|
194
|
+
|
|
195
|
+
logs(f"Envoi de {filename}")
|
|
191
196
|
with open(file, 'rb') as f:
|
|
192
197
|
content = f.read()
|
|
193
198
|
content_hash = hashlib.sha256(content).hexdigest()
|
|
@@ -196,7 +201,7 @@ class Client():
|
|
|
196
201
|
'method': 'channel',
|
|
197
202
|
'action': 'publish',
|
|
198
203
|
'channel_name': channel_name,
|
|
199
|
-
'name':
|
|
204
|
+
'name': filename,
|
|
200
205
|
'content': content,
|
|
201
206
|
'hash': content_hash,
|
|
202
207
|
'token': __main__.settings.token
|
|
@@ -481,8 +486,16 @@ class Client():
|
|
|
481
486
|
|
|
482
487
|
expanded_path = os.path.expanduser(path)
|
|
483
488
|
|
|
484
|
-
|
|
485
|
-
|
|
489
|
+
if not os.path.exists(expanded_path):
|
|
490
|
+
logs("La source n'existe pas", "error")
|
|
491
|
+
|
|
492
|
+
if os.path.isdir(expanded_path):
|
|
493
|
+
files = glob(f"{expanded_path}/**/*", recursive=True)
|
|
494
|
+
#files = [os.path.relpath(p, expanded_path) for p in results]
|
|
495
|
+
else:
|
|
496
|
+
files = [expanded_path]
|
|
497
|
+
expanded_path = None
|
|
498
|
+
|
|
486
499
|
push_file = []
|
|
487
500
|
|
|
488
501
|
for file in files:
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|