mirror of
https://github.com/rwinkhart/sshyp.git
synced 2026-09-04 08:07:15 -04:00
Compare commits
5
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b08456e873 | ||
|
|
ef828b88a0 | ||
|
|
bde243c644 | ||
|
|
894f406fd2 | ||
|
|
00b935f1bb |
@@ -160,7 +160,7 @@ def print_info(): # prints help text based on argument
|
|||||||
print('/ /')
|
print('/ /')
|
||||||
print('/ sshyp Copyright (C) 2021-2022 Randall Winkhart /')
|
print('/ sshyp Copyright (C) 2021-2022 Randall Winkhart /')
|
||||||
print('/ /')
|
print('/ /')
|
||||||
print('/ Version 2022.02.16.fr4.6 /')
|
print('/ Version 2022.02.16.fr4.7 /')
|
||||||
print('/ The High-Tech Shears Update /')
|
print('/ The High-Tech Shears Update /')
|
||||||
print('/ /')
|
print('/ /')
|
||||||
print('////////////////////////////////////////////////////////\n')
|
print('////////////////////////////////////////////////////////\n')
|
||||||
@@ -225,11 +225,13 @@ def sync(): # calls sshync to sync changes to the user's server
|
|||||||
for _file in _deletion_database:
|
for _file in _deletion_database:
|
||||||
if _file[:-1].endswith('/'):
|
if _file[:-1].endswith('/'):
|
||||||
try:
|
try:
|
||||||
|
print(f"Removing folder {path.expanduser('~/.password-pasture/')}{_file[:-1]}...\n")
|
||||||
rmtree(f"{path.expanduser('~/.password-pasture/')}{_file[:-1]}")
|
rmtree(f"{path.expanduser('~/.password-pasture/')}{_file[:-1]}")
|
||||||
except FileNotFoundError:
|
except FileNotFoundError:
|
||||||
print('Folder does not exist locally.\n')
|
print('Folder does not exist locally.\n')
|
||||||
else:
|
else:
|
||||||
try:
|
try:
|
||||||
|
print(f"Removing entry {path.expanduser('~/.password-pasture/')}{_file[:-1]}...\n")
|
||||||
remove(f"{path.expanduser('~/.password-pasture/')}{_file[:-1]}.gpg")
|
remove(f"{path.expanduser('~/.password-pasture/')}{_file[:-1]}.gpg")
|
||||||
except (FileNotFoundError, IsADirectoryError):
|
except (FileNotFoundError, IsADirectoryError):
|
||||||
print('File does not exist locally.\n')
|
print('File does not exist locally.\n')
|
||||||
@@ -245,10 +247,11 @@ def sync(): # calls sshync to sync changes to the user's server
|
|||||||
_folder_database = None
|
_folder_database = None
|
||||||
s_exit()
|
s_exit()
|
||||||
for _folder in _folder_database:
|
for _folder in _folder_database:
|
||||||
if Path(f"{path.expanduser('~/.password-pasture/')}{_folder[:-1]}").is_dir():
|
if Path(f"{path.expanduser('~')}{_folder[:-1]}").is_dir():
|
||||||
pass
|
pass
|
||||||
else:
|
else:
|
||||||
Path(f"{path.expanduser('~/.password-pasture/')}{_folder[:-1]}").mkdir(0o700, parents=True, exist_ok=True)
|
print(f"Adding folder {path.expanduser('~')}{_folder[:-1]}...\n")
|
||||||
|
Path(f"{path.expanduser('~')}{_folder[:-1]}").mkdir(0o700, parents=True, exist_ok=True)
|
||||||
# set permissions before uploading
|
# set permissions before uploading
|
||||||
system('find ' + directory + ' -type d -exec chmod -R 700 {} +')
|
system('find ' + directory + ' -type d -exec chmod -R 700 {} +')
|
||||||
system('find ' + directory + ' -type f -exec chmod -R 600 {} +')
|
system('find ' + directory + ' -type f -exec chmod -R 600 {} +')
|
||||||
|
|||||||
+6
-5
@@ -2,8 +2,8 @@
|
|||||||
|
|
||||||
# external modules
|
# external modules
|
||||||
|
|
||||||
from os import remove, listdir
|
from os import listdir, remove, walk
|
||||||
from os.path import expanduser, isdir, join
|
from os.path import expanduser
|
||||||
from shutil import rmtree
|
from shutil import rmtree
|
||||||
|
|
||||||
|
|
||||||
@@ -39,6 +39,7 @@ def deletion_check(_client_device_name):
|
|||||||
|
|
||||||
def folder_check():
|
def folder_check():
|
||||||
open(expanduser('~/.config/sshyp/folder_database'), 'w').write('')
|
open(expanduser('~/.config/sshyp/folder_database'), 'w').write('')
|
||||||
for _file in listdir(expanduser('~/.password-pasture')):
|
for _root, _directories, _files in walk(expanduser('~/.password-pasture')):
|
||||||
if isdir(join('~/.config/sshyp/folder_database/', _file)):
|
for _dir in _directories:
|
||||||
open(expanduser('~/.config/sshyp/folder_database'), 'a').write(_file + '\n')
|
open(expanduser('~/.config/sshyp/folder_database'), 'a')\
|
||||||
|
.write(f"{_root.replace(expanduser('~'), '')}/{_dir}\n")
|
||||||
|
|||||||
@@ -1,3 +1,47 @@
|
|||||||
|
sshyp 2022.02.16.fr4.7
|
||||||
|
|
||||||
|
The High-Tech Shears Update - Patch 7
|
||||||
|
|
||||||
|
This release enables recursive folder syncing.
|
||||||
|
|
||||||
|
Note: Upgrading from releases older than fr4.7 requires the configuration ("sshyp tweak") to be re-done, as the configuration process has changed.
|
||||||
|
|
||||||
|
Changes:
|
||||||
|
|
||||||
|
- re-wrote folder checking function to fetch subdirectories recursively
|
||||||
|
- added in user-facing messages for when folders are being synced or entries are being removed
|
||||||
|
- fixed a typo preventing folder syncing from working (actually tested this time)
|
||||||
|
|
||||||
|
&&
|
||||||
|
|
||||||
|
Planned for next major update (fr5, The sshyp Doing a Split Update):
|
||||||
|
|
||||||
|
sshyp:
|
||||||
|
** sshyp has recieved a major visual overhaul
|
||||||
|
^ this includes the new file list and thematic text art
|
||||||
|
|
||||||
|
sshync:
|
||||||
|
** sshync has been split into a separate package and now has standalone functionality as a backup/syncing utility
|
||||||
|
^ more details will be available in the sshync repo, once it is created
|
||||||
|
|
||||||
|
&&
|
||||||
|
|
||||||
|
Planned for next, next major update (fr6, The Farmer Shearing the sshyp Update):
|
||||||
|
|
||||||
|
** imporove password generator to guarantee more secure results
|
||||||
|
** enforce permissions on the server-side
|
||||||
|
** allow for copying entire notes (not just first line)
|
||||||
|
** ability to pass entries as arguments for more functions
|
||||||
|
|
||||||
|
&&
|
||||||
|
|
||||||
|
Backlog:
|
||||||
|
|
||||||
|
** create separate gui frontend targetting mobile and desktop Linux
|
||||||
|
** auto-completion on tab (currently unsure of best way to make this work)
|
||||||
|
|
||||||
|
<><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>
|
||||||
|
|
||||||
sshyp 2022.02.16.fr4.6
|
sshyp 2022.02.16.fr4.6
|
||||||
|
|
||||||
The High-Tech Shears Update - Patch 6
|
The High-Tech Shears Update - Patch 6
|
||||||
|
|||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
.TH sshyp 1 "16 February 2022" "2022.02.16.fr4.5" "sshyp man page"
|
.TH sshyp 1 "16 February 2022" "2022.02.16.fr4.7" "sshyp man page"
|
||||||
.SH NAME
|
.SH NAME
|
||||||
sshyp \- A very simple self-hosted, synchronized password manager. Alternative to GNU pass.
|
sshyp \- A very simple self-hosted, synchronized password manager. Alternative to GNU pass.
|
||||||
.SH SYNOPSIS
|
.SH SYNOPSIS
|
||||||
|
|||||||
@@ -1,14 +1,16 @@
|
|||||||
sshyp 2022.02.16.fr4.6
|
sshyp 2022.02.16.fr4.7
|
||||||
|
|
||||||
The High-Tech Shears Update - Patch 6
|
The High-Tech Shears Update - Patch 7
|
||||||
|
|
||||||
This release addresses a critical typo.
|
This release enables recursive folder syncing.
|
||||||
|
|
||||||
Note: Upgrading from releases older than fr4.6 requires the configuration ("sshyp tweak") to be re-done, as the configuration process has changed.
|
Note: Upgrading from releases older than fr4.7 requires the configuration ("sshyp tweak") to be re-done, as the configuration process has changed.
|
||||||
|
|
||||||
Changes:
|
Changes:
|
||||||
|
|
||||||
- corrected a typo error causing folder syncing issues
|
- re-wrote folder checking function to fetch subdirectories recursively
|
||||||
|
- added in user-facing messages for when folders are being synced or entries are being removed
|
||||||
|
- fixed a typo preventing folder syncing from working (actually tested this time)
|
||||||
|
|
||||||
&&
|
&&
|
||||||
|
|
||||||
@@ -26,7 +28,6 @@ sshync:
|
|||||||
|
|
||||||
Planned for next, next major update (fr6, The Farmer Shearing the sshyp Update):
|
Planned for next, next major update (fr6, The Farmer Shearing the sshyp Update):
|
||||||
|
|
||||||
** when syncing, a check is made to see if any folders are not on all devices - if the check comes back true, it is corrected (in sshyp)
|
|
||||||
** imporove password generator to guarantee more secure results
|
** imporove password generator to guarantee more secure results
|
||||||
** enforce permissions on the server-side
|
** enforce permissions on the server-side
|
||||||
** allow for copying entire notes (not just first line)
|
** allow for copying entire notes (not just first line)
|
||||||
|
|||||||
Reference in New Issue
Block a user