Skip to content

Commit

Permalink
updated to allow supression of some vars
Browse files Browse the repository at this point in the history
  • Loading branch information
muonzoo committed Feb 5, 2012
1 parent 78eb4ad commit 24fd5aa
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 6 deletions.
15 changes: 14 additions & 1 deletion README.rst
Expand Up @@ -19,13 +19,18 @@ script or understand Python_ to make this work for you.
Here is the macro text I use in the fldigi_ macro.: Here is the macro text I use in the fldigi_ macro.:




<EXEC>$HOME/.fldigi/scripts/fldigi-aether-logger.py & </EXEC> <EXEC>$HOME/.fldigi/scripts/fldigi-aether-logger.py & </EXEC>


The above macro can be directly copied into your Log QSO Macro definition window in fldigi_. The above macro can be directly copied into your Log QSO Macro definition window in fldigi_.


Release History Release History
--------------- ---------------


v0.5:
* Updated to support a '--no-xxxx' argument which will skip logging
any FLDIGI environment variables that match the xxxx part of the arg
(case insensitive)

v0.4 : v0.4 :
* Updated to correct error rounding frequencies. * Updated to correct error rounding frequencies.


Expand All @@ -49,6 +54,14 @@ Arguments
Print out key information of script execution on stdout, will appear Print out key information of script execution on stdout, will appear
in fldigi window. in fldigi window.


--no-xxxxx:
Skip logging any environment variable that matches xxxxx. (Case
insensitive). Can be used (for example) to skip recording the
frequency by using:

fldigi-aether-logger.py --no-freq




This presumes that this script is called fldigi-aether-logger.py AND This presumes that this script is called fldigi-aether-logger.py AND
That this script is in $HOME/.fldigi/scripts with the execute bit set. That this script is in $HOME/.fldigi/scripts with the execute bit set.
Expand Down
21 changes: 16 additions & 5 deletions fldigi-aether-logger.py
Expand Up @@ -50,6 +50,7 @@


debug=False debug=False
mandatory=False mandatory=False
skip = []


fl_env_prefix='FLDIGI_' fl_env_prefix='FLDIGI_'
def callsign_fmt(s): return s.strip() def callsign_fmt(s): return s.strip()
Expand Down Expand Up @@ -168,11 +169,18 @@ def inform_aether(env,debug=False,launch=True):
for k in d: for k in d:
trace() trace()
if k in env: if k in env:
trace("processing %s"%(k,)) skipping = False
e2a=d[k] for s in skip:
trace(str(e2a[2])) if s.lower() in k.lower():
script = e2a[1](code=script, trace('skipping '+k)
value = e2a[0](env[k]),**e2a[2]) skipping = True
continue
if not skipping:
trace("processing %s"%(k,))
e2a=d[k]
trace(str(e2a[2]))
script = e2a[1](code=script,
value = e2a[0](env[k]),**e2a[2])


trace() trace()
script = osa_postamble(script) script = osa_postamble(script)
Expand Down Expand Up @@ -219,6 +227,9 @@ def test_dict() :
elif argv[1] == '--no-launch': elif argv[1] == '--no-launch':
trace('will not launch aether') trace('will not launch aether')
launch_arg = False launch_arg = False
elif argv[1][:5] == '--no-':
skip.append(argv[1][5:])
trace('skipping any var matching: ' + skip[-1] )
argv = argv[1:] argv = argv[1:]
trace('finished arg processing') trace('finished arg processing')
inform_aether( d, launch=launch_arg,debug=debug) inform_aether( d, launch=launch_arg,debug=debug)
Expand Down

0 comments on commit 24fd5aa

Please sign in to comment.