(for IPLC Discovery-Day 2024-October)
on this page...
- slides
- notes
- approach (contains code-links)
- presentation text
(for IPLC Discovery-Day 2024-October)
on this page...
| ### convert the two rows of data to a tsv file using the python csv module | |
| import csv | |
| original_two_lines = [ | |
| ['id', 'jacket_id', 'firstname', 'lastname', 'shortID', 'title', 'pub_date', 'image', 'role', 'dept', 'dept2', 'dept3', 'active', 'created_at', 'updated_at'], | |
| ['10', '10', 'First', 'Last', 'flast', 'the long title', '2015', 'flast.jpg', 'author', 'Political Science', 'International and Public Affairs', 'y', '', '', ''] | |
| ] | |
| with open('data.tsv', 'w') as tsvfile: |
| """ | |
| Validates against internal mods xml-schema, indicating whether xmlcatalog is used. | |
| """ | |
| import os, unittest | |
| from lxml import etree | |
| import requests | |
| class StrictCatalogResolver(etree.Resolver): |
| import os | |
| from lxml import etree | |
| def validate_xml_with_schema( xml_filepath: str, xsd_filepath: str ) -> None: | |
| """ | |
| Validates an XML file against an XSD schema, without network access. | |
| Confirms that: | |
| - xmlcatalog is routing the schema location to the local file system | |
| - the C `libxml2` library used by lxml does auto-default to the standard server's `xml/catalog` file. |
| """ | |
| To add to server run_tests to ensure xmlcatalog is properly configured, and properly being called. | |
| A MODS file likely be the best candidate for the `xml_filepath`. | |
| """ | |
| import os | |
| from lxml import etree | |
| def validate_xml_with_schema( xml_filepath: str, xsd_filepath: str ) -> None: |
Timeframe: April-2023 through March-2024.
On this page...
(vacation-day experimentation)
(i posted an abbreviated version of this question to [Nim-Discord])
I've been experimenting with nim and am really enjoying it.
Now I want to get compile a binary to run on a Red Hat 7.9 server, and haven't gotten that to work, and would love a few links to some favorite writeups.
Some info, in case it's useful:
| ## ------------------------------------------------------------------ | |
| ## birkin config | |
| ## ------------------------------------------------------------------ | |
| ## aliases ---------------------------------------------------------- | |
| alias cp="cp -i" | |
| alias ls="ls -ahlF" | |
| alias mv="mv -i" | |
| alias rm="rm -i" |
| <record> | |
| <leader>01226nam a2200313Ia 4500</leader> | |
| <controlfield tag="005">20080522191149.0</controlfield> | |
| <controlfield tag="008">050630s2005 nyu 000 1 eng</controlfield> | |
| <controlfield tag="001">991003874639706966</controlfield> | |
| <datafield tag="010" ind1="" ind2=""> | |
| <subfield code="a">2005018927</subfield> | |
| </datafield> | |
| <datafield tag="020" ind1="" ind2=""> | |
| <subfield code="a">0811215881 (alk. paper)</subfield> |
| <mods:mods xmlns:mods="http://www.loc.gov/mods/v3" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xlink="http://www.w3.org/1999/xlink" xsi:schemaLocation="http://www.loc.gov/mods/v3 http://www.loc.gov/mods/v3/mods-3-7.xsd"> | |
| <mods:titleInfo> | |
| <mods:title>Time Magazine, Inc.</mods:title> | |
| </mods:titleInfo> | |
| <mods:name type="personal" authority="naf" valueURI="http://id.loc.gov/authorities/names/n50048448" authorityURI="http://id.loc.gov/authorities/names.html"> | |
| <mods:namePart>Luce, Henry R.</mods:namePart> | |
| <mods:namePart type="date">1898-1967</mods:namePart> | |
| <mods:role> | |
| <mods:roleTerm type="text" authority="marcrelator">founder</mods:roleTerm> | |
| </mods:role> |