mirror of
https://github.com/gnustep/libs-steptalk.git
synced 2025-02-23 11:31:01 +00:00
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/steptalk/trunk@13642 72102866-910b-0410-8b05-ffd578937521
29 lines
532 B
Smalltalk
29 lines
532 B
Smalltalk
"
|
|
rtf2text.st
|
|
|
|
Convert RTF document to plain text.
|
|
|
|
ussage: stexec rtf2text infile outfile
|
|
|
|
"
|
|
|
|
| infile outfile rtfString |
|
|
|
|
Environment loadModule:'AppKit'.
|
|
|
|
((Args count) < 2)
|
|
ifTrue:
|
|
[
|
|
Transcript showLine:'rtf2text: Please specify input and output filename'.
|
|
]
|
|
ifFalse:
|
|
[
|
|
infile := Args @ 0.
|
|
outfile := Args @ 1.
|
|
|
|
rtfString := (NSAttributedString alloc)
|
|
initWithPath:infile documentAttributes:nil.
|
|
|
|
(rtfString string) writeToFile:outfile atomically:YES.
|
|
|
|
]
|