Skip to content

Commit b74ddfb

Browse files
committed
better prompt
1 parent 84e7d59 commit b74ddfb

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

packages/srtcpy.sh

+10-4
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,15 @@ if [ ! -f "$filename" ]; then
1818
exit 1
1919
fi
2020

21-
# Process the file
22-
echo "summarize this --- $(tr -d '\r' < "$filename" | \
23-
sed -e '/^[[:space:]]*$/d' -e '/^[0-9]/d' | \
24-
uniq)"
21+
instructions="Instructions: Summarize the following article."
22+
start_tag="[START ARTICLE]"
23+
end_tag="[END ARTICLE]"
24+
25+
26+
output=$(tr -d '\r' < "$filename" | \
27+
sed -e '/^[[:space:]]*$/d' -e '/^[0-9]/d' | \
28+
uniq)
29+
30+
printf "%s\n\n%s\n%s\n\n%s\n" "${instructions}" "${start_tag}" "${output}" "${end_tag}"
2531

2632
exit 0

0 commit comments

Comments
 (0)