Code Monkey home page Code Monkey logo

metsflask's Introduction

METSFlask

A web application for human-friendly exploration of Archivematica METS files.

Live site (try it out!):

http://bitarchivist.pythonanywhere.com/

All files uploaded to METSFlask are deleted after being read into the database. Database entries are deletable by all users at any time. That is to say - feel free to upload and view your own files! You can delete them from the web app as soon as you're done.

Screenshots

Home page:

index

AIP METS file view:

aip

aip_1

File detail view:

detail

Install locally (dev):

Requires Python 3.4+ or higher.

  • Clone files and cd to directory:
    git clone https://github.com/tw4l/METSFlask && cd METSFlask
  • Set up virtualenv:
    virtualenv venv
  • Activate virtualenv:
    source venv/bin/activate  
  • Install requirements:
    pip install -r requirements.txt
  • Create database:
    chmod a+x db_create.py
    ./db_create.py
  • Run (on localhost, port 5000):
    ./run.py  
  • Go to localhost:5000 in browser.

Creators

  • Canadian Centre for Architecture
  • Tessa Walsh

This project was initially developed in 2016-2017 for the Canadian Centre for Architecture by Tessa Walsh, Digital Archivist, as part of the development of the Archaeology of the Digital project.

metsflask's People

Contributors

ablwr avatar gehurley avatar hamidzr avatar tw4l avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

metsflask's Issues

Add user-friendly error reporting for failed uploads

Currently, METSFlask returns a 500 Internal Server Error if a user (1) tries to upload a file that is not a valid Archivematica METS file, or (2) the application runs into some other error during upload.

Add a user-friendly page at minimum for case 1, so that users know the issue is with the file they are uploading.

Add more detailed tool-based info

  • Which formats to start with?
  • Define values to be extracted for each tool
  • Possibility: rather than hard-coding values, loop through each found value and save both key and value to file_data (in list?)

Add PREMIS Event info to object detail page

Sample PREMIS output:

<mets:digiprovMD ID="digiprovMD_85">
      <mets:mdWrap MDTYPE="PREMIS:EVENT">
        <mets:xmlData>
          <premis:event xmlns:premis="info:lc/xmlns/premis-v2" xsi:schemaLocation="info:lc/xmlns/premis-v2 http://www.loc.gov/standards/premis/v2/premis-v2-2.xsd" version="2.2">
            <premis:eventIdentifier>
              <premis:eventIdentifierType>UUID</premis:eventIdentifierType>
              <premis:eventIdentifierValue>4f6c2b6d-4d25-4552-b42c-b44c3e2e3714</premis:eventIdentifierValue>
            </premis:eventIdentifier>
            <premis:eventType>ingestion</premis:eventType>
            <premis:eventDateTime>2017-01-13T04:00:41+00:00</premis:eventDateTime>
            <premis:eventDetail></premis:eventDetail>
            <premis:eventOutcomeInformation>
              <premis:eventOutcome></premis:eventOutcome>
              <premis:eventOutcomeDetail>
                <premis:eventOutcomeDetailNote></premis:eventOutcomeDetailNote>
              </premis:eventOutcomeDetail>
            </premis:eventOutcomeInformation>
            <premis:linkingAgentIdentifier>
              <premis:linkingAgentIdentifierType>Archivematica user pk</premis:linkingAgentIdentifierType>
              <premis:linkingAgentIdentifierValue>6</premis:linkingAgentIdentifierValue>
            </premis:linkingAgentIdentifier>
            <premis:linkingAgentIdentifier>
              <premis:linkingAgentIdentifierType>preservation system</premis:linkingAgentIdentifierType>
              <premis:linkingAgentIdentifierValue>Archivematica-1.5</premis:linkingAgentIdentifierValue>
            </premis:linkingAgentIdentifier>
            <premis:linkingAgentIdentifier>
              <premis:linkingAgentIdentifierType>repository code</premis:linkingAgentIdentifierType>
              <premis:linkingAgentIdentifierValue>canadian-centre-architecture</premis:linkingAgentIdentifierValue>
            </premis:linkingAgentIdentifier>
          </premis:event>
        </mets:xmlData>
      </mets:mdWrap>
    </mets:digiprovMD>

sqlalchemy error on launch

After launch I am getting:
OperationalError

sqlalchemy.exc.OperationalError no such table METS.

I think I have followed the Readme carefully, is there something I have missed?

Python 3.10 issues?

Hi Tessa,

Getting a lot of importing errors when trying to create db or run.py - possibly due to Python 3.10 dist-packages being different than 3.6? Or at mine are in a different location since I upgraded from 3.6. I tried moving some of the flask and migrate packages over to the new location (/usr/local/lib/python3.10/dist-packages), but seem to still be having issues so I'm not certain.

Running BitCurator 4.4

Thanks!
Jarad

Refactor models

Move from one single model containing pickled metslist to multi-table schema with appropriate foreign key contstraints (likely models: METSFile, DCMetadata, FSEntry, PREMISEvent).

Moving to a better-designed and normalized multi-table structure will enable exposing a useful REST API and, ultimately, better possibilities for visualization and reporting.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.