ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Thanks for all the help I have been given over the years by people from Linux Questions.
I am working on developing a bash script to schedule events based on the Jewish Holidays. One of those things is to "paly (hebrew) or espeak (english)" the scripture relevent to the holiday (eventually both). Using espeak or some other text-to-speach engine would be much easier if the text can be accessed out of an html file. Otherwise I have to take a text file containing the whole JPS Tanach and generate 500 odd individual text files with the relevent text in each one and such a proccess would be very time consuming.
That said there is a variable ($YOMTOVE) that will contain data like
Code:
Rosh Hashana I,1,Genesis 21:1 - 21:4
I assume that it is possible to take that data and pull the relevent data out of the html flie and hand it to espeak for processing. I just have no idea how to write the code and I don't have any examples to use as a starting place. Can anybody help by pointing me to some sample bash code that does something like this. The simpler it is the more likely that I will understand what it is doing and that is a plus
Thanks
The html sample file
Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML>
<HEAD>
<TITLE>Genesis 21 / Hebrew Bible in English / Mechon-Mamre</TITLE>
<SCRIPT TYPE="text/javascript" SRC="em.js"></SCRIPT>
</HEAD>
<BODY BGCOLOR="#FFFFFF">
<DIV ALIGN="JUSTIFY">
<CENTER>
<TABLE CELLPADDING="10" CELLSPACING="10" WIDTH="100%">
<TR ALIGN="CENTER">
<TD VALIGN=TOP BGCOLOR="#FFFFCC"><P ALIGN=CENTER>
<FONT SIZE="-1">
<A HREF="et0.htm">Bible</A> -
Genesis - <A HREF="et01.htm">All</A><BR>Chapter
<A HREF="et0101.htm">1</A>
<A HREF="et0102.htm">2</A>
<A HREF="et0103.htm">3</A>
<A HREF="et0104.htm">4</A>
<A HREF="et0105.htm">5</A>
<A HREF="et0106.htm">6</A>
<A HREF="et0107.htm">7</A>
<A HREF="et0108.htm">8</A>
<A HREF="et0109.htm">9</A>
<A HREF="et0110.htm">10</A>
<A HREF="et0111.htm">11</A>
<A HREF="et0112.htm">12</A>
<A HREF="et0113.htm">13</A>
<A HREF="et0114.htm">14</A>
<A HREF="et0115.htm">15</A>
<A HREF="et0116.htm">16</A>
<A HREF="et0117.htm">17</A>
<A HREF="et0118.htm">18</A>
<A HREF="et0119.htm">19</A>
<A HREF="et0120.htm">20</A>
21
<A HREF="et0122.htm">22</A>
<A HREF="et0123.htm">23</A>
<A HREF="et0124.htm">24</A>
<A HREF="et0125.htm">25</A>
<A HREF="et0126.htm">26</A>
<A HREF="et0127.htm">27</A>
<A HREF="et0128.htm">28</A>
<A HREF="et0129.htm">29</A>
<A HREF="et0130.htm">30</A>
<A HREF="et0131.htm">31</A>
<A HREF="et0132.htm">32</A>
<A HREF="et0133.htm">33</A>
<A HREF="et0134.htm">34</A>
<A HREF="et0135.htm">35</A>
<A HREF="et0136.htm">36</A>
<A HREF="et0137.htm">37</A>
<A HREF="et0138.htm">38</A>
<A HREF="et0139.htm">39</A>
<A HREF="et0140.htm">40</A>
<A HREF="et0141.htm">41</A>
<A HREF="et0142.htm">42</A>
<A HREF="et0143.htm">43</A>
<A HREF="et0144.htm">44</A>
<A HREF="et0145.htm">45</A>
<A HREF="et0146.htm">46</A>
<A HREF="et0147.htm">47</A>
<A HREF="et0148.htm">48</A>
<A HREF="et0149.htm">49</A>
<A HREF="et0150.htm">50</A>
</FONT></P>
</TD></TR>
</TABLE>
</CENTER>
<H1 ALIGN="CENTER">Genesis Chapter 21</H1>
<A NAME="1"> </A>
<P><B>1</B> And the LORD remembered Sarah as He had said, and the LORD did unto Sarah as He had spoken.
<A NAME="2"> </A>
<B>2</B> And Sarah conceived, and bore Abraham a son in his old age, at the set time of which God had spoken to him.
<A NAME="3"> </A>
<B>3</B> And Abraham called the name of his son that was born unto him, whom Sarah bore to him, Isaac.
<A NAME="4"> </A>
<B>4</B> And Abraham circumcised his son Isaac when he was eight days old, as God had commanded him.
<A NAME="5"> </A>
<B>5</B> And Abraham was a hundred years old, when his son Isaac was born unto him.
<A NAME="6"> </A>
<B>6</B> And Sarah said: 'God hath made laughter for me; every one that heareth will laugh on account of me.'
<A NAME="7"> </A>
<B>7</B> And she said: 'Who would have said unto Abraham, that Sarah should give children suck? for I have borne him a son in his old age.'
<A NAME="8"> </A>
<B>8</B> And the child grew, and was weaned. And Abraham made a great feast on the day that Isaac was weaned.
<A NAME="9"> </A>
<B>9</B> And Sarah saw the son of Hagar the Egyptian, whom she had borne unto Abraham, making sport.
<A NAME="10"> </A>
<B>10</B> Wherefore she said unto Abraham: 'Cast out this bondwoman and her son; for the son of this bondwoman shall not be heir with my son, even with Isaac.'
<A NAME="11"> </A>
<B>11</B> And the thing was very grievous in Abraham's sight on account of his son.
<A NAME="12"> </A>
<B>12</B> And God said unto Abraham: 'Let it not be grievous in thy sight because of the lad, and because of thy bondwoman; in all that Sarah saith unto thee, hearken unto her voice; for in Isaac shall seed be called to thee.
<A NAME="13"> </A>
<B>13</B> And also of the son of the bondwoman will I make a nation, because he is thy seed.'
<A NAME="14"> </A>
<B>14</B> And Abraham arose up early in the morning, and took bread and a bottle of water, and gave it unto Hagar, putting it on her shoulder, and the child, and sent her away; and she departed, and strayed in the wilderness of Beer-sheba.
<A NAME="15"> </A>
<B>15</B> And the water in the bottle was spent, and she cast the child under one of the shrubs.
<A NAME="16"> </A>
<B>16</B> And she went, and sat her down over against him a good way off, as it were a bow-shot; for she said: 'Let me not look upon the death of the child.' And she sat over against him, and lifted up her voice, and wept.
<A NAME="17"> </A>
<B>17</B> And God heard the voice of the lad; and the angel of God called to Hagar out of heaven, and said unto her: 'What aileth thee, Hagar? fear not; for God hath heard the voice of the lad where he is.
<A NAME="18"> </A>
<B>18</B> Arise, lift up the lad, and hold him fast by thy hand; for I will make him a great nation.'
<A NAME="19"> </A>
<B>19</B> And God opened her eyes, and she saw a well of water; and she went, and filled the bottle with water, and gave the lad drink.
<A NAME="20"> </A>
<B>20</B> And God was with the lad, and he grew; and he dwelt in the wilderness, and became an archer.
<A NAME="21"> </A>
<B>21</B> And he dwelt in the wilderness of Paran; and his mother took him a wife out of the land of Egypt. <B>{P}</B></P>
<A NAME="22"> </A>
<P><B>22</B> And it came to pass at that time, that Abimelech and Phicol the captain of his host spoke unto Abraham, saying: 'God is with thee in all that thou doest.
<A NAME="23"> </A>
<B>23</B> Now therefore swear unto me here by God that thou wilt not deal falsely with me, nor with my son, nor with my son's son; but according to the kindness that I have done unto thee, thou shalt do unto me, and to the land wherein thou hast sojourned.'
<A NAME="24"> </A>
<B>24</B> And Abraham said: 'I will swear.'
<A NAME="25"> </A>
<B>25</B> And Abraham reproved Abimelech because of the well of water, which Abimelech's servants had violently taken away.
<A NAME="26"> </A>
<B>26</B> And Abimelech said: 'I know not who hath done this thing; neither didst thou tell me, neither yet heard I of it, but to-day.'
<A NAME="27"> </A>
<B>27</B> And Abraham took sheep and oxen, and gave them unto Abimelech; and they two made a covenant.
<A NAME="28"> </A>
<B>28</B> And Abraham set seven ewe-lambs of the flock by themselves.
<A NAME="29"> </A>
<B>29</B> And Abimelech said unto Abraham: 'What mean these seven ewe-lambs which thou hast set by themselves?'
<A NAME="30"> </A>
<B>30</B> And he said: 'Verily, these seven ewe-lambs shalt thou take of my hand, that it may be a witness unto me, that I have digged this well.'
<A NAME="31"> </A>
<B>31</B> Wherefore that place was called Beer-sheba; because there they swore both of them.
<A NAME="32"> </A>
<B>32</B> So they made a covenant at Beer-sheba; and Abimelech rose up, and Phicol the captain of his host, and they returned into the land of the Philistines.
<A NAME="33"> </A>
<B>33</B> And Abraham planted a tamarisk-tree in Beer-sheba, and called there on the name of the LORD, the Everlasting God.
<A NAME="34"> </A>
<B>34</B> And Abraham sojourned in the land of the Philistines many days. <B>{P}</B></P>
<A NAME="35"> </A>
<CENTER>
<TABLE CELLPADDING="10" CELLSPACING="10" WIDTH="100%">
<TR ALIGN="CENTER">
<TD VALIGN=TOP BGCOLOR="#FFFFCC"><P ALIGN=CENTER>
<FONT SIZE="-1">
<A HREF="et0.htm">Bible</A> -
Genesis - <A HREF="et01.htm">All</A><BR>Chapter
<A HREF="et0101.htm">1</A>
<A HREF="et0102.htm">2</A>
<A HREF="et0103.htm">3</A>
<A HREF="et0104.htm">4</A>
<A HREF="et0105.htm">5</A>
<A HREF="et0106.htm">6</A>
<A HREF="et0107.htm">7</A>
<A HREF="et0108.htm">8</A>
<A HREF="et0109.htm">9</A>
<A HREF="et0110.htm">10</A>
<A HREF="et0111.htm">11</A>
<A HREF="et0112.htm">12</A>
<A HREF="et0113.htm">13</A>
<A HREF="et0114.htm">14</A>
<A HREF="et0115.htm">15</A>
<A HREF="et0116.htm">16</A>
<A HREF="et0117.htm">17</A>
<A HREF="et0118.htm">18</A>
<A HREF="et0119.htm">19</A>
<A HREF="et0120.htm">20</A>
21
<A HREF="et0122.htm">22</A>
<A HREF="et0123.htm">23</A>
<A HREF="et0124.htm">24</A>
<A HREF="et0125.htm">25</A>
<A HREF="et0126.htm">26</A>
<A HREF="et0127.htm">27</A>
<A HREF="et0128.htm">28</A>
<A HREF="et0129.htm">29</A>
<A HREF="et0130.htm">30</A>
<A HREF="et0131.htm">31</A>
<A HREF="et0132.htm">32</A>
<A HREF="et0133.htm">33</A>
<A HREF="et0134.htm">34</A>
<A HREF="et0135.htm">35</A>
<A HREF="et0136.htm">36</A>
<A HREF="et0137.htm">37</A>
<A HREF="et0138.htm">38</A>
<A HREF="et0139.htm">39</A>
<A HREF="et0140.htm">40</A>
<A HREF="et0141.htm">41</A>
<A HREF="et0142.htm">42</A>
<A HREF="et0143.htm">43</A>
<A HREF="et0144.htm">44</A>
<A HREF="et0145.htm">45</A>
<A HREF="et0146.htm">46</A>
<A HREF="et0147.htm">47</A>
<A HREF="et0148.htm">48</A>
<A HREF="et0149.htm">49</A>
<A HREF="et0150.htm">50</A>
</FONT></P>
</TD></TR>
</TABLE>
<P>
<B><A NAME="Mail">Got a question or comment?</A> <SCRIPT TYPE="text/javascript">email('et0121')</SCRIPT></B></P>
</CENTER>
</DIV></BODY></HTML>
On the plus side libxml2-utils is install which supplies xmllint. On the other hand most of those examples are way beyond what I am able to even start to figure out So it looks like I will be spending some time building the files by hand.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.