Add Ranges and page numbers to IIIF Manifest from a CSV.

Overview

Add Ranges and page numbers to IIIF Manifest from a CSV.

Specific to a workflow of the Bibliotheca Hertziana.

Usage

python3 addmeta.py [-h] -u URI -i INPUTFILE -c CSVFILE [-o OUTPUTFILE]

INPUTFILE and CSVFILE can be URLs.

CSV structure:

Use level to nest TOC entries.

filename,canvas label,structure,level
p0001,59r,Philosophia magnetica per principia propria proposita et ad prima in suo genere promota,0
p0002,59v,[blank],1
p0003,60r,Lectori,1

Headers may be changed.

You might also like...
Various converters to convert value sets from CSV to JSON, etc.

ValueSet Converters Tools for converting value sets in different formats. Such as converting extensional value sets in CSV format to JSON format able

Generates a clean .txt file of contents of a 3 lined csv file

Generates a clean .txt file of contents of a 3 lined csv file. File contents is the .gml file of some function which stores the contents of the csv as a map.

Test app for importing contact information in CSV files.
Test app for importing contact information in CSV files.

Contact Import TestApp Test app for importing contact information in CSV files. Explore the docs » · Report Bug · Request Feature Table of Contents Ab

Two scripts help you to convert csv file to md file by template

Two scripts help you to convert csv file to md file by template. One help you generate multiple md files with different filenames from the first colume of csv file. Another can generate one md file with several blocks.

csv2ir is a script to convert ir .csv files to .ir files for the flipper.

csv2ir csv2ir is a script to convert ir .csv files to .ir files for the flipper. For a repo of .ir files, please see https://github.com/logickworkshop

MHS2 Save file editing tools. Transfers save files between players, switch and pc version, encrypts and decrypts.

SaveTools MHS2 Save file editing tools. Transfers save files between players, switch and pc version, encrypts and decrypts. Credits Written by Asteris

This python project contains a class FileProcessor which allows one to grab a file and get some meta data and header information from it
This python project contains a class FileProcessor which allows one to grab a file and get some meta data and header information from it

This python project contains a class FileProcessor which allows one to grab a file and get some meta data and header information from it. In the current state, it outputs a PrettyTable to txt file as well as the raw data from that table into a csv.

Search for files under the specified directory. Extract the file name and file path and import them as data.

Search for files under the specified directory. Extract the file name and file path and import them as data. Based on that, search for the file, select it and open it.

Uproot is a library for reading and writing ROOT files in pure Python and NumPy.
Uproot is a library for reading and writing ROOT files in pure Python and NumPy.

Uproot is a library for reading and writing ROOT files in pure Python and NumPy. Unlike the standard C++ ROOT implementation, Uproot is only an I/O li

Comments
  • csv from url

    csv from url

    won't load https://docs.google.com/spreadsheets/d/e/2PACX-1vTfa4Q-66Qa_CdNISFBswzZF4Io3uFOI4nG-05tkac1sru3L69bfUZoJC8Rp3lyfmpdzYIzHWPkFJ2B/pubhtml?gid=811546954&single=true

    C:\Users\Sander\Documents\MEGA\Programme\python\Vigilante_CSV2IIIF>addmeta.py -u https://dlib2.biblhertz.it/iiif/3/gothaa707 -i https://dlib.biblhertz.it/iiif/gothaa707/manifest.json -c https://docs.google.com/spreadsheets/d/e/2PACX-1vTfa4Q-66Qa_CdNISFBswzZF4Io3uFOI4nG-05tkac1sru3L69bfUZoJC8Rp3lyfmpdzYIzHWPkFJ2B/pubhtml?gid=811546954 & single=true Traceback (most recent call last): File "C:\Users\Sander\Documents\MEGA\Programme\python\Vigilante_CSV2IIIF\addmeta.py", line 103, in addmeta() File "C:\Users\Sander\Documents\MEGA\Programme\python\Vigilante_CSV2IIIF\addmeta.py", line 57, in addmeta canvas = metadata[1] IndexError: list index out of range Der Befehl "single" ist entweder falsch geschrieben oder konnte nicht gefunden werden.

    I think cmd cannot handle the link

    opened by ch-sander 2
  • error

    error

    what's going wrong here?

    C:\Users\Sander>python C:\Users\Sander\Documents\GitHub\biblhertz-iiif-metadata\addmeta.py -u https://dlib2.biblhertz.it/iiif/2/buhmmontpellierh169 -i https://raw.githubusercontent.com/ch-sander/raramagnetica/main/iiif/porta.json -c "https://docs.google.com/spreadsheets/d/e/2PACX-1vTfa4Q-66Qa_CdNISFBswzZF4Io3uFOI4nG-05tkac1sru3L69bfUZoJC8Rp3lyfmpdzYIzHWPkFJ2B/pub?gid=864451923&single=true&output=csv" -o C:\Users\Sander\Documents\GitHub\raramagnetica\iiif\porta.json
    Traceback (most recent call last):
      File "C:\Users\Sander\Documents\GitHub\biblhertz-iiif-metadata\addmeta.py", line 104, in <module>
        addmeta()
      File "C:\Users\Sander\Documents\GitHub\biblhertz-iiif-metadata\addmeta.py", line 87, in addmeta
        for item in manifest["items"]:
    KeyError: 'items'
    
    "canvases": [
            {
              "@id": "https://dlib2.biblhertz.it/iiif/2/buhmmontpellierh169@0001-canvas",
              "@type": "sc:Canvas",
              "label": "0001",
              "width": 1754,
              "height": 2480,
              "images": [
                {
                  "@type": "oa:Annotation",
                  "motivation": "sc:painting",
                  "@id": "https://dlib2.biblhertz.it/iiif/2/buhmmontpellierh169@0001-ocr",
                  "resource": {
                    "@id": "https://dlib2.biblhertz.it/iiif/2/[email protected]/full/full/0/default.jpg",
                    "@type": "dctypes:Image",
                    "format": "image/jpg",
                    "width": 1754,
                    "height": 2480,
                    "service": {
                      "@context": "http://iiif.io/api/image/2/context.json",
                      "@id": "https://dlib2.biblhertz.it/iiif/2/[email protected]",
                      "profile": "http://iiif.io/api/image/2/level2.json"
                    }
                  },
                  "on": "https://dlib2.biblhertz.it/iiif/2/buhmmontpellierh169@0001-canvas"
                }
              ]
            },
    
    opened by ch-sander 1
  • out of range

    out of range

    I get this

    C:\Users\Sander\Documents\MEGA\Programme\python\Vigilante_CSV2IIIF>addmeta.py -u https://dlib2.biblhertz.it/iiif/3/gothaa707 -i https://dlib.biblhertz.it/iiif/gothaa707/manifest.json -c metadata.csv Traceback (most recent call last): File "C:\Users\Sander\Documents\MEGA\Programme\python\Vigilante_CSV2IIIF\addmeta.py", line 103, in addmeta() File "C:\Users\Sander\Documents\MEGA\Programme\python\Vigilante_CSV2IIIF\addmeta.py", line 83, in addmeta items.append(storeAtLevel(int(level), accumulator)) File "C:\Users\Sander\Documents\MEGA\Programme\python\Vigilante_CSV2IIIF\addmeta.py", line 82, in storeAtLevel return storeAtLevel(lv-1, obj[-1]["items"]) IndexError: list index out of range

    opened by ch-sander 1
Owner
Raffaele Viglianti
Digital Humanities Research 🟢 Front-end Development 🟢 Miscellaneous Tinkering
Raffaele Viglianti
Nmap XML output to CSV and HTTP/HTTPS URLS.

xml-to-csv-url Convert NMAP's XML output to CSV file and print URL addresses for HTTP/HTTPS ports. NOTE: OS Version Parsing is not working properly ye

null 1 Dec 21, 2021
Automatically generates a TypeQL script for doing entity and relationship insertions from a .csv file, so you don't have to mess with writing TypeQL.

Automatically generates a TypeQL script for doing entity and relationship insertions from a .csv file, so you don't have to mess with writing TypeQL.

null 3 Feb 9, 2022
Remove [x]_ from StudIP zip Archives and archive_filelist.csv completely

This tool removes the "[x]_" at the beginning of StudIP zip Archives. It also deletes the "archive_filelist.csv" file

Kelke vl 1 Jan 19, 2022
A simple Python code that takes input from a csv file and makes it into a vcf file.

Contacts-Maker A simple Python code that takes input from a csv file and makes it into a vcf file. Imagine a college or a large community where each y

null 1 Feb 13, 2022
LightCSV - This CSV reader is implemented in just pure Python.

LightCSV Simple light CSV reader This CSV reader is implemented in just pure Python. It allows to specify a separator, a quote char and column titles

Jose Rodriguez 6 Mar 5, 2022
Transforme rapidamente seu arquivo CSV (de qualquer tamanho) para SQL de forma rápida.

Transformador de CSV para SQL Transforme rapidamente seu arquivo CSV (de qualquer tamanho) para SQL de forma rápida, e com isso insira seus dados usan

William Rodrigues 4 Oct 17, 2022
Sheet Data Image/PDF-to-CSV Converter

Sheet Data Image/PDF-to-CSV Converter

Quy Truong 5 Nov 22, 2021
CSV To VCF (Multiples en un archivo)

CSV To VCF Convierte archivo CSV a Tarjeta VCF (varias en una) How to use En main.py debes reemplazar CONTACTOS.csv por tu archivo csv, y debes respet

Jorge Ivaldi 2 Jan 12, 2022
CSV-Handler written in Python3

CSVHandler This code allows you to work intelligently with CSV files. A file in CSV syntax is converted into several lists, which are combined in a to

Max Tischberger 1 Jan 13, 2022
CleverCSV is a Python package for handling messy CSV files.

CleverCSV is a Python package for handling messy CSV files. It provides a drop-in replacement for the builtin CSV module with improved dialect detection, and comes with a handy command line application for working with CSV files.

The Alan Turing Institute 1k Dec 19, 2022