CC-2016: Rearrange python scripts for reusability
-moved files
This commit is contained in:
parent
f9c8a7cc11
commit
5c8719d90c
70 changed files with 0 additions and 0 deletions
36
python_apps/pypo/scripts/old_files/ls_cue.liq
Normal file
36
python_apps/pypo/scripts/old_files/ls_cue.liq
Normal file
|
@ -0,0 +1,36 @@
|
|||
|
||||
# Register the cut protocol
|
||||
def cue_protocol(arg,delay)
|
||||
# The extraction program
|
||||
# cut_file = "#{configure.libdir}/cut-file.py"
|
||||
cue_script = "./cue_file.py"
|
||||
# Parse args
|
||||
ret = string.extract(pattern="cue_in=(\d+)",arg)
|
||||
start =
|
||||
if list.length(ret) == 0 then
|
||||
"0"
|
||||
else
|
||||
ret["1"]
|
||||
end
|
||||
ret = string.extract(pattern="cue_out=(\d+)",arg)
|
||||
stop =
|
||||
if list.length(ret) == 0 then
|
||||
"0"
|
||||
else
|
||||
ret["1"]
|
||||
end
|
||||
ret = string.extract(pattern=":(.*)$",arg)
|
||||
uri =
|
||||
if list.length(ret) == 0 then
|
||||
""
|
||||
else
|
||||
ret["1"]
|
||||
end
|
||||
x = get_process_lines("#{cue_script} #{quote(uri)} #{start} #{stop}")
|
||||
if list.hd(x) != "" then
|
||||
([list.hd(x)],[])
|
||||
else
|
||||
([uri],[])
|
||||
end
|
||||
end
|
||||
add_post_processor("cue_file", temporary=true, cue_protocol)
|
Loading…
Add table
Add a link
Reference in a new issue