Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/sritterbusch/ospac
Browse files Browse the repository at this point in the history
  • Loading branch information
sritterbusch committed Jul 13, 2016
2 parents d08f6bf + fabc884 commit b0555cd
Show file tree
Hide file tree
Showing 4 changed files with 95 additions and 88 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Expand Up @@ -5,4 +5,4 @@ GUI-Release
.project
.settings
*~
documentation
documentation
88 changes: 44 additions & 44 deletions bash_completion.sh
Expand Up @@ -5,62 +5,62 @@
_ospac(){
local opts
opts=(
--image
--artist
--category
--episode
--mix
--raw
--voice
--overlap
--fade
--parallel
--year
--album
--comment
--image
--album
--title
--mix
--voice
--raw
--verbosity
--episode
--category
--artist
--skip-order
--skip-target
--skip-level
--no-skip
--soft
--noise
--trim
--help
--xgate
--no-xfilter
--no-xgate
--xfilter
--mono
--spatial
--set-stereo-spatial
--stereo
--multi
--set-stereo-level
--output
--ogg
--plot
--quality
--mp3
--low-pass
--verbosity
--normalize
--no-eqvoice
--eqvoice
--level-mode
--factor
--no-leveler
--leveler
--no-factor
--analyze
--no-eqvoice
--target
--highpass
--leveler
--normalize
--low-pass
--band-pass
--eqvoice
--no-leveler
--highpass
--no-normalize
--factor
--target
--set-stereo-level
--spatial
--stereo
--multi
--mono
--set-stereo-spatial
--xfilter
--no-xfilter
--xgate
--no-xgate
--ascii
--left
--to-mono
--right
--ascii
--overlap
--fade
--parallel
--skip-target
--skip-level
--no-skip
--noise
--soft
--trim
--skip-order
--output
--mp3
--quality
--plot
--ogg
)
local cur=${COMP_WORDS[COMP_CWORD]}
COMPREPLY=( $(compgen -W "${opts[*]}" -- $cur) )
Expand Down
11 changes: 9 additions & 2 deletions create_tab_completion.py
Expand Up @@ -3,6 +3,7 @@
# By Johannes Bechberger, under MIT License

import sys
import os

description = "description" # hacks that allow better editing in IDEs
zsh = "zsh"
Expand Down Expand Up @@ -103,7 +104,8 @@
},
"--image": {
description: "Set the image tag if this exists in the output",
flag: False
flag: False,
zsh: "_files"
}
},
"New segment selection": {
Expand Down Expand Up @@ -257,6 +259,11 @@ def process_item(section: str, name: str, item: dict) -> str:
if item[zsh]:
if isinstance(item[zsh], list):
ret += "(" + " ".join(repr(x) for x in item[zsh]) + ")"
elif isinstance(item[zsh], str):
ret += item[zsh]
else:
print("Error on zsh completion in " + repr(item), file=sys.stderr)
os.error(1)
return repr(ret)
return """
Expand Down Expand Up @@ -318,4 +325,4 @@ def process_item(section: str, name: str, item: dict) -> str:
elif sys.argv[1] == "bash":
compl = bash_completion()
with open(sys.argv[2], "w") as f:
f.write(compl)
f.write(compl)
82 changes: 41 additions & 41 deletions zsh_completion.sh
Expand Up @@ -6,62 +6,62 @@ _ospac(){
local -a opts
opts=(
"*: :_files"
'*--mix[Start pre-mixed channel segment]'
'*--raw[Start of raw channel segment]'
'*--voice[Start of voice channel segment (default)]'
'*--set-stereo-spatial[Set maximum interaural delay distance (0.03)]: :'
'*--stereo[Create intensity stereo (default)]'
'*--spatial[Create 3d stereo with interaural delays]'
'*--mono[Create mono output]'
'*--multi[Create multi channel output]'
'*--set-stereo-level[Set maximum channel volume factor (0.9)]: :'
'*--output[Write final output to the file in netbpm format]: :'
'*--mp3[Write final output to the file using external lame]: :'
'*--quality[Quality from 0-low, 1-standard, 2-high, 3-insane]: :(0 1 2 3)'
'*--ogg[Write final output to the file using external oggenc]: :'
'*--plot[Write final output to the file in wave format]: :'
'*--ascii[<s> <file> Load ascii wave file with sample rate s]: :'
'*--right[Load right channel of wave file (if stereo)]: :'
'*--to-mono[Load mono-mixdown of wave file (if stereo)]: :'
'*--left[Load left channel of wave file (if stereo)]: :'
"*--level-mode[Shall channels be joined for leveling]: :('single' 'stereo' 'multi')"
'*--target[Set average target L2 energy for leveler (3000)]: :'
'*--normalize[Normalize final mix]'
'*--eqvoice[Attenuate voice frequency bands]'
'*--factor[Multiply channels by the given factor with sigmoid limiter (1.25)]: :'
'*--no-normalize[Disable final normalization]'
'*--no-eqvoice[Do not attenuate frequency bands]'
'*--quality[Quality from 0-low, 1-standard, 2-high, 3-insane]: :(0 1 2 3)'
'*--mp3[Write final output to the file using external lame]: :_files'
'*--output[Write final output to the file in netbpm format]: :_files'
'*--plot[Write final output to the file in wave format]: :_files'
'*--ogg[Write final output to the file using external oggenc]: :_files'
'*--highpass[<f> <t> Highpass above f Hertz, sharpness t Hertz]: :'
'*--leveler[Enable selective leveler]'
'*--no-factor[Disable channel multiplier]'
'*--no-normalize[Disable final normalization]'
'*--eqvoice[Attenuate voice frequency bands]'
'*--band-pass[<l> <h> <t> Bandpass from l to h Hertz, sharpness t Hertz]: :'
'*--target[Set average target L2 energy for leveler (3000)]: :'
"*--level-mode[Shall channels be joined for leveling]: :('single' 'stereo' 'multi')"
'*--normalize[Normalize final mix]'
'*--no-leveler[Disable selective leveler]'
'*--no-factor[Disable channel multiplier]'
'*--analyze[Analyze frequency band components]'
'*--low-pass[<f> <t> Lowpass below f Hertz, sharpness t Hertz]: :'
'*--analyze[Analyze frequency band components]'
'*--factor[Multiply channels by the given factor with sigmoid limiter (1.25)]: :'
'*--no-eqvoice[Do not attenuate frequency bands]'
'*--verbosity[Set the verbosity level]: :(0 1 2 3 4 5 6)'
'*--help[Display the help text]'
'*--no-xfilter[Disable crosstalk filter]'
'*--no-xgate[Disable crosstalk gate]'
'*--xfilter[Enable experimental crosstalk filter]'
'*--no-xfilter[Disable crosstalk filter]'
'*--xgate[Enable robust crosstalk gate]'
'*--verbosity[Set the verbosity level]: :(0 1 2 3 4 5 6)'
'*--help[Display the help text]'
'*--image[Set the image tag if this exists in the output]: :'
'*--episode[Set the episode tag if this exists in the output]: :'
'*--artist[Set the artist tag if this exists in the output]: :'
'*--comment[Set the comment tag if this exists in the output]: :'
'*--parallel[Render previous and next segment in parallel]'
'*--fade[Fading transition over the given number of seconds]: :'
'*--overlap[Overlapping transition over the given number of seconds]: :'
'*--right[Load right channel of wave file (if stereo)]: :_files'
'*--ascii[<s> <file> Load ascii wave file with sample rate s]: :'
'*--left[Load left channel of wave file (if stereo)]: :_files'
'*--to-mono[Load mono-mixdown of wave file (if stereo)]: :_files'
'*--album[Set the album tag if this exists in the output]: :'
'*--category[Set the category tag if this exists in the output]: :'
'*--title[Set the title tag if this exists in the output]: :'
'*--comment[Set the comment tag if this exists in the output]: :'
'*--artist[Set the artist tag if this exists in the output]: :'
'*--year[Set the year tag if this exists in the output]: :'
'*--parallel[Render previous and next segment in parallel]'
'*--fade[Fading transition over the given number of seconds]: :'
'*--overlap[Overlapping transition over the given number of seconds]: :'
'*--skip-target[Target length fraction for iteration]: :'
'*--soft[Soft skip silent passages over 0.5s length]'
'*--skip-order[Order of reduction (0-1, default: 0.75)]: :'
'*--skip-level[Fraction of maximum level considered silence (0.01)]: :'
'*--episode[Set the episode tag if this exists in the output]: :'
'*--image[Set the image tag if this exists in the output]: :_files'
'*--trim[Trim audio from start and end]'
'*--skip-level[Fraction of maximum level considered silence (0.01)]: :'
'*--no-skip[Do not skip any content]'
'*--soft[Soft skip silent passages over 0.5s length]'
'*--noise[Skip all but silence]'
'*--skip-target[Target length fraction for iteration]: :'
'*--skip-order[Order of reduction (0-1, default: 0.75)]: :'
'*--mix[Start pre-mixed channel segment]'
'*--voice[Start of voice channel segment (default)]'
'*--raw[Start of raw channel segment]'
'*--set-stereo-level[Set maximum channel volume factor (0.9)]: :'
'*--spatial[Create 3d stereo with interaural delays]'
'*--mono[Create mono output]'
'*--multi[Create multi channel output]'
'*--set-stereo-spatial[Set maximum interaural delay distance (0.03)]: :'
'*--stereo[Create intensity stereo (default)]'
)
_arguments $opts
}
Expand Down

0 comments on commit b0555cd

Please sign in to comment.