Jump to content

Import User Tool HTML


Robb B
 Share

Recommended Posts

I am trying to import an html file as a user tool. It doesn't give me any errors when I import the file, but when I view the tool, about 14 paragraphs or so into it the content disappears and all I get is repeated =L> the rest of the document. The html works fine in safari and Firefox and I can't find any errors in my code. This happened in 6.9.2 as well as when I tried in 7.0. Any ideas?

Link to comment
Share on other sites

  • 3 weeks later...

Robb, Same problem here, no matter how I format the source html file (different text encoding, line breaks, etc.) after exactly seven lines I get the same gibberish. Here's a sample of my html content:

 

<p># 1
--- All People That on Earth Do Dwell
--- Kethe, William
--- Old Hundredth
--- Genevan Psalter
--- Ps. 100
</p>
<p># 2
--- O Worship the King
--- Grant, Robert
--- Lyons
--- Haydn, Johan Michael
--- Ps. 104
</p>
<p># 3
--- Give to Our God Immortal Praise
--- Watts, Isaac
--- Warrington
--- Harrison, Ralph
--- Ps. 136
</p>

<p># 4
--- All Praise to God, Who Reigns Above
--- Schutz, Johann J.
--- Mit Freuden Zart
--- Gasangbuch
--- Ps. 107:15
</p>
<p># 5
--- God, My King, Thy Might Confessing
--- Mant, Richard
--- Stuttgart
--- Psalmodia Sacra
--- Ps. 145
</p>
<p># 6
--- O Come, My Soul, Bless Thou the Lord
--- The Psalter
--- Tidings
--- Walch, James
--- Ps. 103
</p>
<p># 7
--- From All That Dwell below the Skies
--- Watts, Isaac
--- Duke Street
--- Halton, John
--- Ps. 117
</p>

 

After exactly 7 lines where a line is defined by

<p>...</p>

I get repeated =L>. I have a lengthy file that I'm making a very slow progress pasting seven lines at a time. Have you found any answers? Thanks.

 

Ken

Link to comment
Share on other sites

Ken,

 

Here is a portion of an email I got from Accordance support on how they resolved the issue for me:

 

"I noticed that if your html file is read into TextEdit and re-saved as a new html file then I was able to import the entire file into Accordance. ( I attached my version of the re-saved html file ...)."

 

I don't fully understand what Mike did to fix this, but I do know that after I imported the file he sent me, my user tool worked great and now it is set up exactly like I want it. I'll update you if I learn more.

 

I also listened to some of your preaching and enjoyed it. Keep up the good work for the glory of Christ.

Link to comment
Share on other sites

Thanks for your help Robb.

 

I opened and resaved it with TextEdit, and it worked! Who knew that humble TextEdit can solve a problem that mighty TextWrangler couldn't! I appreciate your help very much.

 

Regards,

 

Ken

Link to comment
Share on other sites

I opened and resaved it with TextEdit, and it worked! Who knew that humble TextEdit can solve a problem that mighty TextWrangler couldn't! .......

 

Not all text is text ;) ..... I believe that both TextEdit and TextWrangler are programs capable to edit files which Accordance can use. Review the SAVE AS options available in each program. Check their online help to explain the options.

If you still had the file in un-importable and importable form, you could compare to ascertain the exact issue. Or create a couple of small test import files while documenting the options.

Link to comment
Share on other sites

I opened and resaved it with TextEdit, and it worked! Who knew that humble TextEdit can solve a problem that mighty TextWrangler couldn't! I appreciate your help very much.

TextWrangler (or BBEdit) files should work if you make sure that the line breaks are Macintosh (not Unix or DOS) and Encoding is Western (Mac OS Roman) (both accessible from the File Options dropdown [which has a tiny document icon] in the editor window's toolbar).

 

Also, as you may have discovered, if you want line breaks to appear, you will need to insert <br> tags at the ends of those lines (see below how to do this easily with TextWrangler), e.g., to use Ken's example:

 

<p># 1<br>
--- All People That on Earth Do Dwell<br>
--- Kethe, William<br>
--- Old Hundredth<br>
--- Genevan Psalter<br>
--- Ps. 100<br>
</p>
<p># 2<br>
--- O Worship the King<br>
--- Grant, Robert<br>
--- Lyons<br>
--- Haydn, Johan Michael<br>
--- Ps. 104<br>
</p>

Note that </p> by itself inserts a blank line, while </p><br> appears to insert nothing.

 

* if you want a taste of how useful a text editor is that allows searching and replacing using regular expressions, try the following:

 

1. Select the range of lines in TextWrangler to which you want to add the <br> tag

2. Open the Find & Replace box (cmd-F or Search > Find...)

3. Make sure "Start at Top" is unchecked and that "Seach Selection Only" is checked (otherwise, every single line in the file will be affected).

4. Then in the "Search For:" box, type:

 

\r

 

5. In the "Replace With:" box, type:

 

<br>\r

 

6. Click the Replace All button on the right.

 

If you made the correct selection and entered the search and replace strings correctly, you should have saved yourself a lot of work! If something went wrong, simply choose Edit > Undo... and retrace your steps.

 

Basically, you're replacing every occurrence of a line break (\r) in the selection with <br> followed by a line break. And that is just the tip of the iceberg of what a regular expression-capable editor can do!

Edited by jpkang
Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share

×
×
  • Create New...