wire-py-reformat-14-08-2024 #10
@ -4,9 +4,8 @@
|
|||||||
<option name="autoReloadType" value="SELECTIVE" />
|
<option name="autoReloadType" value="SELECTIVE" />
|
||||||
</component>
|
</component>
|
||||||
<component name="ChangeListManager">
|
<component name="ChangeListManager">
|
||||||
<list default="true" id="940e1630-c825-4d4c-be80-bc11f543c122" name="Changes" comment="fix when Filname > 17 first copy file after rename">
|
<list default="true" id="940e1630-c825-4d4c-be80-bc11f543c122" name="Changes" comment="add export Tunnel as zip">
|
||||||
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
|
||||||
<change beforePath="$PROJECT_DIR$/main.py" beforeDir="false" afterPath="$PROJECT_DIR$/main.py" afterDir="false" />
|
|
||||||
<change beforePath="$PROJECT_DIR$/wg_func.py" beforeDir="false" afterPath="$PROJECT_DIR$/wg_func.py" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/wg_func.py" beforeDir="false" afterPath="$PROJECT_DIR$/wg_func.py" afterDir="false" />
|
||||||
</list>
|
</list>
|
||||||
<option name="SHOW_DIALOG" value="false" />
|
<option name="SHOW_DIALOG" value="false" />
|
||||||
@ -41,16 +40,16 @@
|
|||||||
<option name="hideEmptyMiddlePackages" value="true" />
|
<option name="hideEmptyMiddlePackages" value="true" />
|
||||||
<option name="showLibraryContents" value="true" />
|
<option name="showLibraryContents" value="true" />
|
||||||
</component>
|
</component>
|
||||||
<component name="PropertiesComponent">{
|
<component name="PropertiesComponent"><![CDATA[{
|
||||||
"keyToString": {
|
"keyToString": {
|
||||||
"ASKED_ADD_EXTERNAL_FILES": "true",
|
"ASKED_ADD_EXTERNAL_FILES": "true",
|
||||||
"Python.main.executor": "Run",
|
"Python.main.executor": "Run",
|
||||||
"RunOnceActivity.ShowReadmeOnStart": "true",
|
"RunOnceActivity.ShowReadmeOnStart": "true",
|
||||||
"git-widget-placeholder": "main",
|
"git-widget-placeholder": "main",
|
||||||
"last_opened_file_path": "/home/punix/Pyapps/wire-py",
|
"last_opened_file_path": "/home/punix/Pyapps/wire-py",
|
||||||
"settings.editor.selected.configurable": "preferences.lookFeel"
|
"settings.editor.selected.configurable": "preferences.lookFeel"
|
||||||
}
|
}
|
||||||
}</component>
|
}]]></component>
|
||||||
<component name="RunManager">
|
<component name="RunManager">
|
||||||
<configuration name="main" type="PythonConfigurationType" factoryName="Python" nameIsGenerated="true">
|
<configuration name="main" type="PythonConfigurationType" factoryName="Python" nameIsGenerated="true">
|
||||||
<module name="wire-py" />
|
<module name="wire-py" />
|
||||||
@ -235,7 +234,15 @@
|
|||||||
<option name="project" value="LOCAL" />
|
<option name="project" value="LOCAL" />
|
||||||
<updated>1724593165879</updated>
|
<updated>1724593165879</updated>
|
||||||
</task>
|
</task>
|
||||||
<option name="localTasksCounter" value="19" />
|
<task id="LOCAL-00019" summary="add export Tunnel as zip">
|
||||||
|
<option name="closed" value="true" />
|
||||||
|
<created>1724610514657</created>
|
||||||
|
<option name="number" value="00019" />
|
||||||
|
<option name="presentableId" value="LOCAL-00019" />
|
||||||
|
<option name="project" value="LOCAL" />
|
||||||
|
<updated>1724610514658</updated>
|
||||||
|
</task>
|
||||||
|
<option name="localTasksCounter" value="20" />
|
||||||
<servers />
|
<servers />
|
||||||
</component>
|
</component>
|
||||||
<component name="Vcs.Log.Tabs.Properties">
|
<component name="Vcs.Log.Tabs.Properties">
|
||||||
@ -280,6 +287,7 @@
|
|||||||
<MESSAGE value="fix label when laat Tunnel delete and fix Tuple error in delete and Start/Stop when listbox empty" />
|
<MESSAGE value="fix label when laat Tunnel delete and fix Tuple error in delete and Start/Stop when listbox empty" />
|
||||||
<MESSAGE value="remove a ',' in DNS Name" />
|
<MESSAGE value="remove a ',' in DNS Name" />
|
||||||
<MESSAGE value="fix when Filname > 17 first copy file after rename" />
|
<MESSAGE value="fix when Filname > 17 first copy file after rename" />
|
||||||
<option name="LAST_COMMIT_MESSAGE" value="fix when Filname > 17 first copy file after rename" />
|
<MESSAGE value="add export Tunnel as zip" />
|
||||||
|
<option name="LAST_COMMIT_MESSAGE" value="add export Tunnel as zip" />
|
||||||
</component>
|
</component>
|
||||||
</project>
|
</project>
|
18
wg_func.py
18
wg_func.py
@ -1,7 +1,7 @@
|
|||||||
# Wireguard functions for Wire-Py
|
# Wireguard functions for Wire-Py
|
||||||
import os
|
import os
|
||||||
import shutil
|
import shutil
|
||||||
import tarfile
|
from datetime import datetime
|
||||||
from tkinter import filedialog
|
from tkinter import filedialog
|
||||||
import tkinter as tk
|
import tkinter as tk
|
||||||
|
|
||||||
@ -225,9 +225,19 @@ class ImportTunnel:
|
|||||||
class ExportTunnels:
|
class ExportTunnels:
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def wg_export():
|
def wg_export():
|
||||||
|
now_time = datetime.now()
|
||||||
|
now_datetime = now_time.strftime('/wg-exp-' + "%m-%d-%Y" + '-' + "%H:%M")
|
||||||
|
tl = ListTunnels.tl_list()
|
||||||
try:
|
try:
|
||||||
wg_tar = os.environ['HOME'] + '/datetime'
|
if len(tl) != 0:
|
||||||
p_to_conf = os.environ['HOME'] + '/tester'
|
wg_tar = os.environ['HOME'] + now_datetime
|
||||||
shutil.make_archive(wg_tar, 'zip', p_to_conf)
|
p_to_conf = os.environ['HOME'] + '/tester'
|
||||||
|
shutil.make_archive(wg_tar, 'zip', p_to_conf)
|
||||||
|
#if zip_full != 0:
|
||||||
|
#print('Export erfolgraeich')
|
||||||
|
#else:
|
||||||
|
#print('ups etwwas ging schief bitte Export wiederholen')
|
||||||
|
else:
|
||||||
|
print('No Tunnel for Export')
|
||||||
except TypeError:
|
except TypeError:
|
||||||
pass
|
pass
|
||||||
|
Loading…
Reference in New Issue
Block a user