Notifications
Clear all

PHP script to remove usfm tags for formatting

3 Posts
2 Users
0 Likes
256 Views
Chuck
(@chuck)
Eminent Member
Joined: 6 years ago
Posts: 31
Topic starter  

Tim Maggio authored this php script.    It strips out the usfm tags and leaves you a nice text that can be imported into a Word processor.

requirements:

PHP - https://windows.php.net/download/#php-7.2-nts-VC15-x64

select VC15 x64 Non Thread Safe version.

Usage:  php usfm_to_text.php usfm %1 text %2.txt verses yes

 

~Chuck


   
Quote
(@mondele)
Member Admin
Joined: 6 years ago
Posts: 58
 

Trying to use this script, I do php usfm_to_text.php path to file/67-REV.usfm but get an error: PHP Warning: file_get_contents(): Filename cannot be empty in path to script/usfm_to_text.php on line 10

I'm trusting that I'm doing something boneheaded, and that other people are successfully using this script.


   
ReplyQuote
(@mondele)
Member Admin
Joined: 6 years ago
Posts: 58
 

As a matter of fact, I looked more closely at Chuck's post and saw the prescribed usage of the script, with much better results. I think I will try to update it with usage information in the script, and make the error messages a bit more understandable.


   
ReplyQuote
Share: