Hello All,

Attached is an example showing the Data ( or config file path ) and Logbook Database paths, along with os.getcwd() the ( application install directory ). Appdirs determined the AppData local paths. In this case, for Windows-10. I did not add the .Wave file location as of yet. If we were to bump the version number to say 10.1, the data directory would become:

^\AppData\Local\WSJT\10.1

The Logbook Database location would remain in:

^\AppData\Local\WSJT

We could, if desired, add the svn r number, say for example:

^\AppData\Local\WSJT\10.0\rxxxx
^\AppData\Local\WSJT\10.1\rxxxx

etc, etc

but that is not consistent with how WSJT-X is currently running. However, the rxxxx is being displayed in the WSJT main UI title bar and the system console window if it's needed.


73's
Greg, KI7MT


On 11/2/2015 11:48, Greg Beam wrote:
Hello All,

While working on a the SQL3 database tests for WSJT, I ran across a
rather painless solution for storing user_{config,data,log}_dirs rather
than sticking everything in the appdir = (~\install\directory\root).
Using the appropriate FSH (File System Hierarchy) approach has numerous
advantages, not least of which, can be version specific and answers the
request from several folks to provide a means in which to separate data
files from application files allowing easier upgrade transitions.

Currently, there are a number of files created when WSJT fires up:

WSJT.INI, decoded.ave, decoded.txt, ALL.TXT, FFT_plans, prefixes.txt,
etc. Some of these files are version specific, WSJT.INI for example.

This proposal would bring WSJT and eventually WSPR, inline with what is
now being employed in WSJT-X:

- Windows/{XP/Vists/7/8/10)/%LOCALAPPDATA%\WSJT-X\WSJT-X.in etc
- Linux/( ~/.local/share/<AppName> or $XDG_DATA_HOME )
- Mac/(~/Library/Application Support/<AppName>)


PROPOSED SOLUTION:

ActiveState Python brought out a single-file Python module ( back in
2010 ) called appdirs. It is a small Python class that sorts all this
out for us with minimal effort. All we need to do is add the module to
WsjtMod, import it, set the appropriate paths ( only two are needed ) at
the top of WSJT.py / WSPR.py, then update the directory calls ( just a
few ).

Things like WSJT.INI would be version specific (^/wsjt/10.0, ^/WSJT/10.1
etc) while others, common files like CALL3.TXT, QSO Log Files and
Databases, could reside in the common user_data_dir.

A full explication of what appdirs.py provides can be found here:

Link: https://pypi.python.org/pypi/appdirs

If there are no objections, and this is certainly open for further
discussion, I'd like to implement this while working on the SQLite3
Logfile integration?


73's
Greg, KI7MT














------------------------------------------------------------------------------
_______________________________________________
wsjt-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wsjt-devel

Reply via email to