Closed sjib closed 1 year ago
Precision: it's not "not possible to read". But the button "show logs" has not an adress that works in the virtual environment (we have no access to c: )
@urskaufmann So even a tool tip with the file path would not help to access it manually, right?
The path of the log-files is C:\Users\KAU\AppData\Local\Temp\qgepqwat2ili AppData is hidden and not shown even if I check Ausgeblendete Elemente in the file explorer. I have to use a detour to have access to this place.
Windows + E and copy paste the URL
What I got is :
Is there a possibility to create an URL directly to the destination file in the success message ?
file://C:\mypath\my_interlis_generated_file.xtf
A second button could be added in the success bar: https://github.com/QGEP/qgepqwat2ili/blob/49b419f39237cbb9a8be1d05b4c039e253b2d6ef/qgepqwat2ili/gui/__init__.py#L33
button2 = QPushButton(widget)
button2.setText("Show export file")
button.pressed.connect(lambda p=file_name: webbrowser.open(p))
widget.layout().addWidget(button)
Documentation can be found here https://docs.qgis.org/3.22/en/docs/pyqgis_developer_cookbook/communicating.html
Or even easier if it is possible to make {file_name} a hyperlink: https://github.com/QGEP/qgepqwat2ili/blob/49b419f39237cbb9a8be1d05b4c039e253b2d6ef/qgepqwat2ili/gui/__init__.py#L248
The log_path can be (easily?) adjusted in adding the file name directory path (export directory) as next_to_path
in the function make_log_path
https://github.com/QGEP/qgepqwat2ili/blob/49b419f39237cbb9a8be1d05b4c039e253b2d6ef/qgepqwat2ili/utils/various.py#L215
https://github.com/QGEP/qgepqwat2ili/blob/49b419f39237cbb9a8be1d05b4c039e253b2d6ef/qgepqwat2ili/utils/various.py#L216
All calls of make_log_path would have to be adjusted from eg.
filename = make_log_path(None, "qgepqwat2ili")
to
filename = make_log_path("next_to_path", "qgepqwat2ili")
@olivierdalang propose a way to :
WIP Pull request by OD: add ability to save logs next to input/output file in the GUI
Suggested implementation of the checkbox:
Currently the logs are stored in the temp folder, as it usually has access rights for writing
In virtual environments reading the files is not possible as @urskaufmann mentioned.
Suggestion: Change folder to xtf folder and name the logs as xtfname.*.log
Question: What happens if I export the xtf a second time with the same name? Overwrite old logs?