Comments (4)
qgz support would be a really great feature.
I guess it may be difficult to implement?
A less ideal but useful alternative could be for the autosaver to automatically name the backup xxxx.qgs.bak instead of xxx.qgz.bak I think this would actually be 99% as good, especially if the qgd file is also renamed appropriately.
Then restoring would just be a matter of removing the .bak from the filenames regardless of whether your original file was qgz or qgs
from autosaver.
That would be fine for me, although I hope the api allows for saving as qgz, in which case it should be a piece of cake.
from autosaver.
Yeah, could be very simple if so. Code appears to use QgsProject.instance().write() to save the backup, and I can't see any documentation of how to change that to qgz. May need to use the zip utilities to zip it?
I think the only modification to save as qgs would be to line 395 of autosave.py
currently it is
bakFileName = origFileName + ".bak"
I think changing it to
bakFileName = origFileName[:-1] + "s.bak"
Will remove the last letter of the filename and replace with s.bak so .qgs files will become .qgs.bak and qgz will become .qgs.bak also.
I have not tested this, but it looks like an easy fix to me, though I have not investigated understand how the .qgd file is being generated currently. Looks like it might be working by accident as one seems to be generated outside the .qgz when autosaver is running.
from autosaver.
fixed. b52535e
thanks for suggestions
from autosaver.
Related Issues (15)
- autoSaver throws an error on startup HOT 1
- error on projects with unicode chars HOT 1
- Couldn't load plugin autoSaver due to an error when calling its initGui() method HOT 1
- autosave the individual layers into a seperate folder
- UI label truncated
- Rilevato errore HOT 1
- Problem autosaver after update plugin
- crash during backup HOT 2
- Restoring backups HOT 1
- Enhancement Request: Hide backup files
- AutoSaver wipes attribute forms
- autoSaver 2.5 failure to run on QGIS 3.16.14 HOT 3
- Error on execution with v2.7 HOT 1
- [QGIS 3.34] AttributeError: type object 'QgsMessageBar' has no attribute 'SUCCESS' HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from autosaver.