-
Notifications
You must be signed in to change notification settings - Fork 24
/
Copy pathprapic_to_eps.praat
34 lines (29 loc) · 985 Bytes
/
prapic_to_eps.praat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# This script reads Praat picture files (with the extension ".prapic")
# from a given directory and converts them into EPS files.
#
# This script is distributed under the GNU General Public License.
# Copyright 22.5.2003 Mietta Lennes
form View Praat picture files
comment Give the directory of the files:
text directory /home/lennes/analysis/durations/
sentence File_extension .prapic
endform
Create Strings as file list... files 'directory$'*'file_extension$'
numberOfFiles = Get number of strings
if numberOfFiles > 0
for file to numberOfFiles
select Strings files
file$ = Get string... file
Erase all
Read from praat picture file... 'directory$''file$'
newname$ = left$ (file$, (length (file$) - 7)) + ".eps"
if left$ (file$, 4) = "read"
Viewport... 0 5 4 8
else
Viewport... 0 5 0 4
endif
Write to EPS file... 'directory$''newname$'
endfor
else
exit No 'file_extension$' files in dir 'directory$'!
endif