Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

intro_text: interlink Erläuterungen zu den einzelnen Stellen #552

Open
1 of 3 tasks
Tracked by #505
thvitt opened this issue Dec 6, 2018 · 11 comments
Open
1 of 3 tasks
Tracked by #505

intro_text: interlink Erläuterungen zu den einzelnen Stellen #552

thvitt opened this issue Dec 6, 2018 · 11 comments
Assignees
Milestone

Comments

@thvitt
Copy link
Member

thvitt commented Dec 6, 2018

  • uncomment html and augment the apparatus lines with copies from ../print/app.html.¹ (@thvitt)
  • edit html. Choose either of the lines, and add links for the handful that cannot be mapped automatically. (@gerritbruening)
  • cleanup encoding. generate list and code for backlinks from text/app to intro_text. (@thvitt)

¹ some code snippets to match stuff

from lxml import etree
import re

intro = etree.parse('intro_text.html')
app = etree.parse('../print/app.html')
intro_ems = intro.xpath('//h:p/node()[1]/self::h:em', namespaces=dict(h='http://www.w3.org/1999/xhtml'))
appspans_ = app.xpath('//h:span[@class="ref lineno"]', namespaces=dict(h='http://www.w3.org/1999/xhtml'))
appspans = {s.text: s for s in appspans_}
for em in intro_ems:
     key = em.text.strip()
     key = re.sub(r'\s*[-–—]\s*', '–', key)
     try:
         span = appspans[key]
         em.set('href', span.getparent().get('href'))
         em.tag = 'a'
         em.set('class', 'applink')
     except KeyError as e:
         print(key, ' not found')
@gerritbruening
Copy link
Contributor

part of #505

@gerritbruening
Copy link
Contributor

Do you want me to do something now?

@gerritbruening gerritbruening added this to the 1.1 milestone Dec 6, 2018
@thvitt
Copy link
Member Author

thvitt commented Dec 6, 2018

assign me when I should perform step 1 (ie when you’re ready to perform step 2)

@gerritbruening
Copy link
Contributor

Yes, go ahead. Not sure whether I can perform step 2 tomorrow, though.

@thvitt
Copy link
Member Author

thvitt commented Dec 6, 2018

I thought we planned this for 1.2?

@gerritbruening
Copy link
Contributor

Yes!

@gerritbruening
Copy link
Contributor

Whenever you do this, note that I am making changes to the uncommented part of intro_text. Is that OK?

@thvitt
Copy link
Member Author

thvitt commented Dec 7, 2018

It will parse and rewrite the HTML file, i.e. semantically irrelevant whitespace may change and might require a merge. Shouldn’t be in too many places since it will happen in the same way as with the other editions part, unless you did a format-and-indent yourself.

@thvitt
Copy link
Member Author

thvitt commented Dec 7, 2018

Die folgenden Stellen konnten nicht auf einen Apparateintrag gematcht werden:

2490 /2492 not found
vor 3184 not found
vor 4051 not found
Trüber Tag. Feld, Zeile 16 not found
4858 not found
4973–4976, 4993–4998, 5670–5674 not found
vor 5144 bis 5150 not found
5441–5456, 5484–5493, 5640–5645, 5715–5726, 5748–5756 not found
nach 6358 bis vor 6361 not found
vor 6377, 6447, 10415, 10452 not found
vor 7005, 7006 not found
7722–7759 not found
9491–9499 not found
vor 10531 not found
11936–11937 not found
vor 12057 not found
12069 not found

@thvitt
Copy link
Member Author

thvitt commented Dec 7, 2018

d8a47dd enthält die halbautomatischen änderungen

@gerritbruening
Copy link
Contributor

Vielen Dank. Ich würde sagen, weiter kommen wir erst mit dem nächsten release. Ich kommentiers für den jetzt bevorstehenden aus.

@thvitt thvitt modified the milestones: 1.2, 1.3 Jun 5, 2019
@thvitt thvitt modified the milestones: 1.3, 1.4 Oct 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants