Hi to all,
Dear mofi
I have directory with name Text. It has many files like
The file index.xhtml contains:
The numbers 44, 15, 21, 23, 36, 81, ... are page numbers. The page tag is like <a id="page_44"></a>.
Those page tags are placed in either 02_Kapitel01.xhtml, 03_Kapitel02.xhtml, 03_Kapitel02.xhtml or 05_Kapitel04.xhtml.
The script should do:
I hope you understand my problem.
I wait for your reply.
Dear mofi
I have directory with name Text. It has many files like
Code: Select all
01_Inhalt.xhtml
02_Kapitel01.xhtml
03_Kapitel02.xhtml
04_Kapitel03.xhtml
05_Kapitel04.xhtml
index.xhtml
Code: Select all
1. <p class="bib"><b>A</b>igen <a href="../Text/@@@.xhtml#index_1">44</a></p>
2. <p class="bib">Alter Markt <a href="../Text/@@@.xhtml#index_2">15</a> f., <a href="../Text/@@@.xhtml#index_4">21</a></p>
3. <p class="bib">Andräkirche <a href="../Text/@@@.xhtml#index_5">23</a>, <a href="../Text/@@@.xhtml#index_6">36</a></p>
4. <p class="bib"><i>Anreise <a href="../Text/@@@.xhtml#index_7">81</a> f.</i></p>
5. <p class="bib">Antretterhaus <a href="../Text/@@@.xhtml#index_8">16</a></p>
6. <p class="bib">AugustinerBräu <a href="../Text/@@@.xhtml#index_9">7</a>, <a href="../Text/@@@.xhtml#index_10">56</a></p>
7. <p class="bib"><i>Auskunft <a href="../Text/@@@.xhtml#index_11">82</a> f.</i></p>
Those page tags are placed in either 02_Kapitel01.xhtml, 03_Kapitel02.xhtml, 03_Kapitel02.xhtml or 05_Kapitel04.xhtml.
The script should do:
- First open the file which contains the page tag like <a id="page_44"></a>.
After that find the word Aigen.
If this word is found then, put the link tag like <a id="index_1"></a> in front of the word Aigen like <a id="index_1"></a>Aigen
But if this word is not found then, put the link tag like <a id="index_1"></a> after page tag like <a id="page_44"></a><a id="index_1"></a>.
- For the 2nd line:
First open files containing the page tags <a id="page_15"></a> and <a id="page_21"></a>.
After that find the phrase Alter Markt.
If this string is found then put the link tag like <a id="index_2"></a> in front of the string Alter Markt like <a id="index_2"></a>Alter Markt.
If the string is not found then put the link tag like <a id="index_2"></a> after page tag like <a id="page_15"></a><a id="index_2"></a>.
I hope you understand my problem.
I wait for your reply.