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