Project

General

Profile

Task #591

Feature #552: Provide English translations of Greek works

Task #559: Make translation reference for relating different versions of the same document

Reimport Josephus' Works in English

Added by Luke Murphey about 11 years ago. Updated about 11 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Target version:
Start date:
04/03/2013
Due date:
% Done:

100%


Description

  • Against Apion
  • The Life of Flavius Josephus
  • The Wars of the Jews
  • Antiquities of the Jews

Associated revisions

Revision 458 (diff)
Added by Luke Murphey about 11 years ago

Fixed importation of Josephus' English works. Closes #591.

Revision 458 (diff)
Added by Luke Murphey about 11 years ago

Fixed importation of Josephus' English works. Closes #591.

Revision 447 (diff)
Added by Luke Murphey about 11 years ago

Fixed importation of Josephus' English works. Closes #591.

History

#1 Updated by Luke Murphey about 11 years ago

You can delete existing works with this:

from reader.models import Work
Work.objects.filter(language="English", authors__name="Flavius Josephus").delete()

#2 Updated by Luke Murphey about 11 years ago

I created the connections between the works of Josephus in Greek and English with the following code:

from reader.models import Work, RelatedWork
ap_eng = Work.objects.get(title_slug="against-apion")
ap_grk = Work.objects.get(title_slug="contra-apionem")
if RelatedWork.are_divisions_identical(ap_eng, ap_grk):
    RelatedWork.make_related_work(ap_eng, ap_grk)

an_grk = Work.objects.get(title_slug="antiquitates-judaicae")
an_eng = Work.objects.get(title_slug="antiquities-of-the-jews")
if RelatedWork.are_divisions_identical(an_grk, an_eng):
    RelatedWork.make_related_work(an_grk, an_eng)

jv_grk = Work.objects.get(title_slug="the-life-of-flavius-josephus")
jv_eng = Work.objects.get(title_slug="josephi-vita")
if RelatedWork.are_divisions_identical(jv_grk, jv_eng):
    RelatedWork.make_related_work(jv_grk, jv_eng)

wars_grk = Work.objects.get(title_slug="de-bello-judaico-libri-vii")
wars_eng = Work.objects.get(title_slug="the-wars-of-the-jews")
if RelatedWork.are_divisions_identical(wars_grk, wars_eng):
    RelatedWork.make_related_work(wars_grk, wars_eng)

#3 Updated by Luke Murphey about 11 years ago

  • Status changed from New to Closed
  • % Done changed from 0 to 100

Applied in changeset r458.

#4 Updated by Luke Murphey about 11 years ago

  • Status changed from Closed to In Progress
  • % Done changed from 100 to 50

#5 Updated by Luke Murphey about 11 years ago

Existing indexes were deleted with the following:

from reader.contentsearch import WorkIndexer
from whoosh.qparser import QueryParser

inx = WorkIndexer.get_index()
parser = QueryParser("content", inx.schema)
inx.delete_by_query(parser.parse(u'work:antiquities-of-the-jews OR work:against-apion OR work:the-life-of-flavius-josephus OR work:the-wars-of-the-jews'))
writer = inx.writer()
writer.commit(optimize=True)

#6 Updated by Luke Murphey about 11 years ago

Indexes were rebuilt using:

from reader.models import Work
from reader.contentsearch import WorkIndexer

works = Work.objects.filter(language="English", authors__name="Flavius Josephus")
for work in works:
    WorkIndexer.index_work(work)

#7 Updated by Luke Murphey about 11 years ago

  • Status changed from In Progress to Closed
  • % Done changed from 50 to 100

Also available in: Atom PDF