Skip to content

Commit 23cae53

Browse files
Create gnumeric-ssconvert-from-xls-to-usv
1 parent cd9408a commit 23cae53

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

Diff for: gnumeric-ssconvert-from-xls-to-usv

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
#!/bin/sh
2+
set -euf
3+
4+
# Command: gnumeric-ssconvert-from-xls-to-usv
5+
6+
# This script is WIP
7+
8+
# TODO: change from \n to USV RS
9+
10+
from_input_file_path_to_output_file_path() {
11+
printf '%s' "$1" | sed 's/\.xlsx$/.usv/'
12+
}
13+
14+
from_xls_to_usv() {
15+
ssconvert --export-type='Gnumeric_stf:stf_assistant' --export-options='separator=␟ format=raw' "$@"
16+
}
17+
18+
19+
for input_file_path in "$@"; do
20+
output_file_path=$(from_input_file_path_to_output_file_path "$input_file_path")
21+
from_xls_to_usv "$input_file_path" "$output_file_path"
22+
done

0 commit comments

Comments
 (0)