Skip to content

Commit

Permalink
Add Achemenet to Resources (#402)
Browse files Browse the repository at this point in the history
  • Loading branch information
ejimsan authored Nov 3, 2023
1 parent 7ca2c56 commit be6d34e
Show file tree
Hide file tree
Showing 10 changed files with 78 additions and 34 deletions.
1 change: 1 addition & 0 deletions src/fragmentarium/domain/Fragment.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ const config: Parameters<typeof Fragment['create']>[0] = {
urOnlineNumber: '123',
hilprechtJenaNumber: '123',
hilprechtHeidelbergNumber: '123',
achemenetNumber: '123',
},
projects: [],
}
Expand Down
1 change: 1 addition & 0 deletions src/fragmentarium/domain/FragmentDtos.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ export const ExternalNumberTypes = [
'urOnlineNumber',
'hilprechtJenaNumber',
'hilprechtHeidelbergNumber',
'achemenetNumber',
'metropolitanNumber',
'yalePeabodyNumber',
] as const
Expand Down
3 changes: 3 additions & 0 deletions src/fragmentarium/domain/fragment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,9 @@ export class Fragment {
get hilprechtHeidelbergNumber(): string {
return this.getExternalNumber('hilprechtHeidelbergNumber')
}
get achemenetNumber(): string {
return this.getExternalNumber('achemenetNumber')
}
get metropolitanNumber(): string {
return this.getExternalNumber('metropolitanNumber')
}
Expand Down
11 changes: 11 additions & 0 deletions src/fragmentarium/ui/info/ExternalNumberLink.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,17 @@ export function YalePeabodyLink({ number }: { number: string }): JSX.Element {
/>
)
}
export function AchemenetLink({ number }: { number: string }): JSX.Element {
return (
<ExternalNumberLink
number={number}
baseUrl={
'http://www.achemenet.com/en/item/?/textual-sources/texts-by-languages-and-scripts/babylonian/'
}
label={'Achemenet'}
/>
)
}

function OraccLink({
project,
Expand Down
8 changes: 8 additions & 0 deletions src/fragmentarium/ui/info/ExternalResources.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ const archibabNumber = 'A38'
const urOnlineNumber = 'U5'
const hilprechtJenaNumber = 'H42'
const hilprechtHeidelbergNumber = 'H007'
const achemenetNumber = 'H007'
const yalePeabodyNumber = 'y123'
let fragment: Fragment
let container: HTMLElement
Expand All @@ -33,6 +34,7 @@ describe('external resources', () => {
urOnlineNumber,
hilprechtJenaNumber,
hilprechtHeidelbergNumber,
achemenetNumber,
yalePeabodyNumber,
}),
},
Expand Down Expand Up @@ -61,6 +63,11 @@ describe('external resources', () => {
'https://doi.org/10.11588/heidicon/',
hilprechtHeidelbergNumber,
],
[
'Achemenet',
'http://www.achemenet.com/en/item/?/textual-sources/texts-by-languages-and-scripts/babylonian/',
achemenetNumber,
],
[
'Yale Babylonian Collection',
'https://collections.peabody.yale.edu/search/Record/YPM-',
Expand Down Expand Up @@ -96,6 +103,7 @@ describe('missing external resources', () => {
'Ur Online',
'Hilprecht Collection',
'Hilprecht Collection – HeiCuBeDa',
'Achemenet',
'Yale Babylonian Collection',
])('Mising %s number is not shown', async (label) => {
expect(screen.queryByText(label)).not.toBeInTheDocument()
Expand Down
2 changes: 2 additions & 0 deletions src/fragmentarium/ui/info/ExternalResources.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import {
UrOnlineLink,
HilprechtJenaLink,
HilprechtHeidelbergLink,
AchemenetLink,
BmIdLink,
YalePeabodyLink,
OraccLinks,
Expand All @@ -29,6 +30,7 @@ export default function ExternalResources({
[fragment.urOnlineNumber, UrOnlineLink],
[fragment.hilprechtJenaNumber, HilprechtJenaLink],
[fragment.hilprechtHeidelbergNumber, HilprechtHeidelbergLink],
[fragment.achemenetNumber, AchemenetLink],
[fragment.yalePeabodyNumber, YalePeabodyLink],
]
return (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,18 @@ exports[`external resources Snapshot 1`] = `
</a>
)
</li>
<li>
Achemenet (
<a
aria-label="Achemenet text H007"
href="http://www.achemenet.com/en/item/?/textual-sources/texts-by-languages-and-scripts/babylonian/H007"
rel="noopener noreferrer"
target="_blank"
>
H007
</a>
)
</li>
<li>
Yale Babylonian Collection (
<a
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -694,11 +694,11 @@ exports[`Searching fragments by transliteration Displays corpus results when cli
>
<h4>
<a
href="/fragmentarium/egiimsuh.9"
href="/fragmentarium/uc.9"
>
egiimsuh.9
uc.9
</a>
(NA)
(Sarg)
</h4>
</div>
<div
Expand Down Expand Up @@ -746,29 +746,33 @@ exports[`Searching fragments by transliteration Displays corpus results when cli
<span
class="reference-popover__citation"
>
Duran & Morgan, 2047: 2475096543330304-6774523607121920
Giles & Alvarez, 2086: 5582194326110208-1406653725409280
[
l. 4'.2., 1.
l. 1., 3'.
]
<span
class="type-abbreviation"
>
(T)
(C)
</span>
</span>
</li>
</ol>
<ol
class="ReferenceList__list"
>
<li>
<span
class="reference-popover__citation"
>
Woods & Huff, 2105: 176413170728960-4588441272582144
Shaw & Robert, 2045: 6150545542742016-5917511180615680
[
l. 1., 2.
l. 2., 1.
]
<span
class="type-abbreviation"
>
(T)
(P)
</span>
</span>
</li>
Expand Down Expand Up @@ -6459,11 +6463,11 @@ exports[`Searching fragments by transliteration Displays corpus results when cli
>
<h4>
<a
href="/fragmentarium/gumozo.10"
href="/fragmentarium/lupge.10"
>
gumozo.10
lupge.10
</a>
(Hel)
(JN)
</h4>
</div>
<div
Expand Down Expand Up @@ -6511,9 +6515,9 @@ exports[`Searching fragments by transliteration Displays corpus results when cli
<span
class="reference-popover__citation"
>
Baronti & Estrada, 2037: 2783108709482496-6526373642371072
Cozzi & Banks, 2084: 7085058131230720-4756679868547072
[
l. 1., 2.
l. 3'., 2.
]
<span
class="type-abbreviation"
Expand All @@ -6530,9 +6534,9 @@ exports[`Searching fragments by transliteration Displays corpus results when cli
<span
class="reference-popover__citation"
>
Cognome & Driessen, 2106: 5414113119305728-4198870045163520
Brandt & Tamura, 2069: 8869310172758016-5886361810763776
[
l. 1., 4'.2.
l. 2., 3'.
]
<span
class="type-abbreviation"
Expand Down Expand Up @@ -12299,10 +12303,10 @@ exports[`Searching fragments by transliteration Displays corpus results when cli
</span>
 &gt; 
<span>
Dunupsa it githeku pesrab veh ef witijonu simaup rahoc ikecep uwrugan nobeto uzhaszo.
Zavisu jub acjunal tacnezud cutzidhug degat nibhuuzi hooretul devdif jafodor zamhokbi fufpeper bo gece utjazo patulif.
</span>
&gt;
Neo-Elamite Cucapi laan giligo vaguswin zulasbu kica hemfojpo ub deboc ak eji pivojbi aweik rud vilvij lajokriw goc cidbire.
Uruk IV Ziz casa wo ma pa bodgudles upopi hasaf dizi gebuwe konrat fufedul maggili vafovej.
</small>
</div>
</div>
Expand All @@ -12321,7 +12325,7 @@ exports[`Searching fragments by transliteration Displays corpus results when cli
(
<span>
<span>
Ses gorudzel jecwejfa befziz casa wo ma pa bodgudles upopi hasaf dizi gebuwe konrat fufedul maggili.
Do im up amu in wag cizef ed pefja pismen uddikri his on koh vappa ovwowo eh.
</span>
</span>
)
Expand All @@ -12345,7 +12349,7 @@ exports[`Searching fragments by transliteration Displays corpus results when cli
class="chapter-display__line-number"
>
<a
href="https://www.ebl.lmu.de/corpus/L/475/6062635445387264/NElam/Cucapi%20laan%20giligo%20vaguswin%20zulasbu%20kica%20hemfojpo%20ub%20deboc%20ak%20eji%20pivojbi%20aweik%20rud%20vilvij%20lajokriw%20goc%20cidbire.#10"
href="https://www.ebl.lmu.de/corpus/L/2448/6183340883312640/Uruk4/Ziz%20casa%20wo%20ma%20pa%20bodgudles%20upopi%20hasaf%20dizi%20gebuwe%20konrat%20fufedul%20maggili%20vafovej.#10"
rel="noopener noreferrer"
target="_blank"
>
Expand Down Expand Up @@ -12412,7 +12416,7 @@ exports[`Searching fragments by transliteration Displays corpus results when cli
>
<div>
<span>
Zudukpo roopokij pivopi ug sacadwep vabita budzewgav ito go liwuvacu vav imituzih paiviig bicela tawfohpi teludo gifrom.
Udso sigmi jaogi hus luj piza vecke huk na hidu itikumam pez ukha pamfoje.
</span>
</div>
</td>
Expand All @@ -12439,7 +12443,7 @@ exports[`Searching fragments by transliteration Displays corpus results when cli
(
<span>
<span>
Mugukha pamfoje tadgib vejapuc geof wetvortaj het rot ni pabvewme hugic salkekvep golew.
Tul sulew erodotoc gimfa diklaek ripe haknor jasuj pufoti pirri jakajris zuhik pelu nebu pehero miunni.
</span>
</span>
)
Expand All @@ -12463,7 +12467,7 @@ exports[`Searching fragments by transliteration Displays corpus results when cli
class="chapter-display__line-number"
>
<a
href="https://www.ebl.lmu.de/corpus/L/475/6062635445387264/NElam/Cucapi%20laan%20giligo%20vaguswin%20zulasbu%20kica%20hemfojpo%20ub%20deboc%20ak%20eji%20pivojbi%20aweik%20rud%20vilvij%20lajokriw%20goc%20cidbire.#11"
href="https://www.ebl.lmu.de/corpus/L/2448/6183340883312640/Uruk4/Ziz%20casa%20wo%20ma%20pa%20bodgudles%20upopi%20hasaf%20dizi%20gebuwe%20konrat%20fufedul%20maggili%20vafovej.#11"
rel="noopener noreferrer"
target="_blank"
>
Expand Down Expand Up @@ -12530,7 +12534,7 @@ exports[`Searching fragments by transliteration Displays corpus results when cli
>
<div>
<span>
Regsindas kokihe oso ofcev raav lucmoeli nancuke ba doji perape ipidu hur kesfi daj.
Si ru kenhito udjo mut nugut dubter bovlub zeugihiz kibop irusalle pov nuvwormek li ew leh.
</span>
</div>
</td>
Expand Down Expand Up @@ -12565,10 +12569,10 @@ exports[`Searching fragments by transliteration Displays corpus results when cli
</span>
 &gt; 
<span>
Ezowik ce jitcoj vu wovcabtad ki gevbial gelewozo le bejab felufad fum eti cuki luno mavip no sishi.
Ce zun gevredsu heutadi pueh rib zu jetbu noppa miraw za olked zic vo jacog.
</span>
&gt;
Middle Elamite Had vuhfofluk koosgo oppatdan nepa romlialo telpah wihse nor udjo mut nugut dubter bovlub zeugihiz kibop irusalle pov.
Neo-Assyrian Wufpurme gec nohahuh mofona sapsis vi kiz me gemtigpa gufra pa amu kum nuzizij.
</small>
</div>
</div>
Expand All @@ -12587,14 +12591,14 @@ exports[`Searching fragments by transliteration Displays corpus results when cli
(
<span>
<span>
Nibfup gitro fidjaben momefuer ke jabip geuh mofona sapsis vi kiz me gemtigpa gufra pa.
Peg ted pug bifwefab gatco zezzave tiz ubfini duroriw ci couf ija furhoef didefi za bujaro.
</span>
</span>
)
</td>
</tr>
<tr
class="chapter-display__line chapter-display__line--is-beginning-of-section"
class="chapter-display__line chapter-display__line--is-second-line-of-parallelism"
>
<td
class="chapter-display__toggle"
Expand All @@ -12611,7 +12615,7 @@ exports[`Searching fragments by transliteration Displays corpus results when cli
class="chapter-display__line-number"
>
<a
href="https://www.ebl.lmu.de/corpus/L/3909/3560610589573120/MElam/Had%20vuhfofluk%20koosgo%20oppatdan%20nepa%20romlialo%20telpah%20wihse%20nor%20udjo%20mut%20nugut%20dubter%20bovlub%20zeugihiz%20kibop%20irusalle%20pov.#12"
href="https://www.ebl.lmu.de/corpus/L/2428/6304463195209728/NA/Wufpurme%20gec%20nohahuh%20mofona%20sapsis%20vi%20kiz%20me%20gemtigpa%20gufra%20pa%20amu%20kum%20nuzizij.#12"
rel="noopener noreferrer"
target="_blank"
>
Expand Down Expand Up @@ -12678,7 +12682,7 @@ exports[`Searching fragments by transliteration Displays corpus results when cli
>
<div>
<span>
Bu pehero miunni jurzo ot kagac ebozafod gul lothoce bav morussa si jareime tagasmog je.
Tozopmun cotuzov rik obozaoza uzlejoru wezvo bagaci rej ceb efaidauje gam zafev.
</span>
</div>
</td>
Expand All @@ -12705,14 +12709,14 @@ exports[`Searching fragments by transliteration Displays corpus results when cli
(
<span>
<span>
Te lat fev jugulo ot gebfawdu mikicepi elludot mer gopus wuokaeni palig ne comjualu.
Cev gazbu olimuvmo me rajuno ref tu jowa sijri obo nalmodco izaluew gawto od holoro arajiploh po zat.
</span>
</span>
)
</td>
</tr>
<tr
class="chapter-display__line chapter-display__line--is-beginning-of-section"
class="chapter-display__line"
>
<td
class="chapter-display__toggle"
Expand All @@ -12729,7 +12733,7 @@ exports[`Searching fragments by transliteration Displays corpus results when cli
class="chapter-display__line-number"
>
<a
href="https://www.ebl.lmu.de/corpus/L/3909/3560610589573120/MElam/Had%20vuhfofluk%20koosgo%20oppatdan%20nepa%20romlialo%20telpah%20wihse%20nor%20udjo%20mut%20nugut%20dubter%20bovlub%20zeugihiz%20kibop%20irusalle%20pov.#13"
href="https://www.ebl.lmu.de/corpus/L/2428/6304463195209728/NA/Wufpurme%20gec%20nohahuh%20mofona%20sapsis%20vi%20kiz%20me%20gemtigpa%20gufra%20pa%20amu%20kum%20nuzizij.#13"
rel="noopener noreferrer"
target="_blank"
>
Expand Down Expand Up @@ -12796,7 +12800,7 @@ exports[`Searching fragments by transliteration Displays corpus results when cli
>
<div>
<span>
Kedus katij sa kuhuw kepew mufedo agiacla fuhsevid ve huzop dep goaz iwumu gi riw tor loamab bi.
Heulu vuzfassez zug abeol obnutada tojase fagmu durito soiji iku vel jak did ri odu ke.
</span>
</div>
</td>
Expand Down
1 change: 1 addition & 0 deletions src/test-support/fragment-fixtures.ts
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,7 @@ export const externalNumbersFactory = Factory.define<ExternalNumbers>(
hilprechtHeidelbergNumber:
associations.hilprechtHeidelbergNumber ?? chance.string(),
metropolitanNumber: associations.metropolitanNumber ?? chance.string(),
achemenetNumber: associations.achemenetNumber ?? chance.string(),
yalePeabodyNumber: associations.yalePeabodyNumber ?? chance.string(),
}
}
Expand Down
1 change: 1 addition & 0 deletions src/test-support/test-fragment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ const externalNumbers = {
urOnlineNumber: '123',
hilprechtJenaNumber: '123',
hilprechtHeidelbergNumber: '123',
achemenetNumber: '123',
}

export const lines: readonly TextLineDto[] = [
Expand Down

0 comments on commit be6d34e

Please sign in to comment.