Coder Social home page Coder Social logo

zenodo-gsoc's Issues

deposit-ui: mockup button for "extraction" of a metadata from a deposit file

  1. Each uploaded file entry on the top of deposit form should render an "Extract metadata" button, e.g. next to the "Delete" icon.

  2. On click, the button should make an asynchronous POST request to an endpoint (for now it can live here: https://github.com/zenodo/zenodo/blob/master/zenodo/modules/deposit/views.py), and get a JSON response. In the parameters it should pass the file information (UUID).

An example of a deposit form button code, which pre-reserves the DOI of the record: https://github.com/zenodo/zenodo/blob/master/zenodo/modules/deposit/templates/zenodo_deposit/edit.html#L88-L136

  1. For now the returned response can be a dummy JSON such as:
{
   "title": "Foobar title"
   "description": "Some description"
   "file_id": <file object UUID again>
}
  1. After receiving the response, it should pre-filtered the title+description metadata on the form.

  2. Finally, it should not just pre-filter the metadata automatically, but display a bootstrap modal, where user can select which of the metadata fields he wants to overwrite on the form.

Some limitations for now, but good to think about:

  • The view will "extract" the metadata in the application process, so no celery is required for now.
  • On the client side (JS), we can just wait for the response, however, we shouldn't do it if it's a large job (e.g. parsing a large PDF might take a while). In the final implementation we might need to:
    • Start the extraction (on button click).
    • On the client side (JS), ping the endpoint every few seconds to check if the job is finished.

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.