[revised] How to insert a semicolon before every 1st <br>eakline in every <p>aragraphs?, Thank thank everyone |
[revised] How to insert a semicolon before every 1st <br>eakline in every <p>aragraphs?, Thank thank everyone |
S.mutans |
Sep 30 2016, 11:01 PM
Post
#1
|
Group: Members Posts: 7 Joined: 27-September 16 Member No.: 24,862 |
How to insert a semicolon before every 1st breakline in every paragraphs? Thank thank everyone This is a dictionary text file. Every paragraphs are enclosed by <p class="calibre_11">paragraph1</p>. I want to add a semicolon before every 1st breakline in every paragraphs? I want to ask about 1. the necessary tools and 2. the method to make this change: Find and replace all CODE <p class="calibre_11"> <span class="bold"> entry1 </span> different contents <br class="calibre1"/> // want to insert a semicolon before the 1st breakline meaning1 <br class="calibre1"/> // other breaklines remain unchanged meaning2 <br class="calibre1"/> // other breaklines remain unchanged meaning3 </p> to CODE <p class="calibre_11"> <span class="bold"> entry1 </span> different contents ;<br class="calibre1"/> // inserted a semicolon before the 1st breakline meaning1 <br class="calibre1"/> // other breaklines remain unchanged meaning2 <br class="calibre1"/> // other breaklines remain unchanged meaning3 </p> |
S.mutans |
Oct 5 2016, 10:18 AM
Post
#2
|
Group: Members Posts: 7 Joined: 27-September 16 Member No.: 24,862 |
Sorry, I was nearly unaware of your file.
Were it not for your help, I had to visit psychiatrist. Thank you Thank you Thank thank you. This post has been edited by S.mutans: Oct 5 2016, 10:48 AM |
pandy |
Oct 5 2016, 03:45 PM
Post
#3
|
🌟Computer says no🌟 Group: WDG Moderators Posts: 20,730 Joined: 9-August 06 Member No.: 6 |
I take it I got it right then.
|
S.mutans |
Oct 5 2016, 10:21 PM
Post
#4
|
Group: Members Posts: 7 Joined: 27-September 16 Member No.: 24,862 |
Somebody gave me this java script:
CODE [].forEach.call(document.querySelectorAll('.calibre_11 br:first-of-type'), function (e) { e.insertAdjacentText('beforebegin', ';') }) I want to change the dictionary.ePub into AnkiDecks .apkg file. Anki only accept importing .txt file in UTF-8. Your file not in in UTF-8 doesn’t get right. It is nothing bad for you to own "Collins Concise German-English Dictionary.apkg". I can send you a copy after it is done. This is an example of a valid file: CODE entry1; meanings; optional; optional; ... entry2; meanings; optional; optional; ... entry3; meanings; optional; optional; ... This post has been edited by S.mutans: Oct 5 2016, 10:50 PM |
Christian J |
Oct 6 2016, 02:21 PM
Post
#5
|
. Group: WDG Moderators Posts: 9,656 Joined: 10-August 06 Member No.: 7 |
Somebody gave me this java script: CODE [].forEach.call(document.querySelectorAll('.calibre_11 br:first-of-type'), function (e) { e.insertAdjacentText('beforebegin', ';') }) Note that any changes made by javascript are just temporary. Also insertAdjacentText is a new feature, with limited browser support. QUOTE I want to change the dictionary.ePub into AnkiDecks .apkg file. Seems https://en.wikipedia.org/wiki/Anki_(software) does use HTML, but I don't know if it supports javascript too? |
Lo-Fi Version | Time is now: 25th April 2024 - 12:13 AM |