echo "${token}"
}
-# Arg1: line
+# Arg1: label
function get_frame_id()
{
- frame=$(echo "${1}" | grep -e "label:[0-9]\+" | ${SED} "s/.*label:\([0-9]\+\).*,geometry.*/\1/g")
- echo "${frame}"
+ local token
+ token=$(echo "${1}" | grep -e "^[0-9]\+" | ${SED} "s/^\([0-9]\+\).*/\1/g")
+ echo "${token}"
}
# Arg1: line
echo "${token}"
}
-# Arg1: line
+# Arg1: label
function get_group_id()
{
- group=$(echo "${1}" | grep -e "label:groupe.*" | ${SED} "s/.*label:groupe-\(.*\),geometry.*/\1/g")
- echo "${group}"
+ local token
+ token=$(echo "${1}" | grep -e "^groupe" | ${SED} "s/^groupe-\(.*\)/\1/g")
+ echo "${token}"
}
# Arg1: group name
echo "${token}"
}
-# Get duplicate from. Ex: "label:dup1-7 planXYZ,geometry..." will return 1
-# Arg1: line
+# Get duplicate from. Ex: "dup1-7 planXYZ,geometry..." will return 1
+# Arg1: label
function get_dup_from()
{
- dup=$(echo "${1}" | grep -e "label:dup.*" | ${SED} "s/.*label:dup\([0-9]\+\)-.*,geometry.*/\1/g")
- echo "${dup}"
+ local token
+ token=$(echo "${1}" | grep -e "^dup" | ${SED} "s/^dup\([0-9]\+\)-.*/\1/g")
+ echo "${token}"
}
-# Get duplicate to. Ex: "label:dup1-7 planXYZ,geometry..." will return 7
-# Arg1: line
+# Get duplicate to. Ex: "dup1-7 planXYZ,geometry..." will return 7
+# Arg1: label
function get_dup_to()
{
- dup=$(echo "${1}" | grep -e "label:dup.*" | ${SED} "s/.*label:dup[0-9]\+-\([0-9]\+\).*,geometry.*/\1/g")
- echo "${dup}"
+ local token
+ token=$(echo "${1}" | grep -e "^dup" | ${SED} "s/^dup[0-9]\+-\([0-9]\+\).*/\1/g")
+ echo "${token}"
}
function generate_video()
scene=$(get_scene_id "${l}")
label=$(get_label "${l}")
p=$(get_pos "${l}")
- nf=$(get_frame_id "${l}")
- ng=$(get_group_id "${l}")
- dup_from=$(get_dup_from "${l}")
- dup_to=$(get_dup_to "${l}")
+
+ nf=$(get_frame_id "${label}")
+ ng=$(get_group_id "${label}")
+ dup_from=$(get_dup_from "${label}")
+ dup_to=$(get_dup_to "${label}")
# Also indicate a new frame, but to be copied from..to:
if [ x"${dup_from}" != x"" ]; then