Skip to content

Exploring the use of digital badges for crediting contributors to scholarly papers for their work

License

Notifications You must be signed in to change notification settings

janhohner/PaperBadger

 
 

Repository files navigation

PaperBadger Build Status

Join the chat at https://gitter.im/mozillascience/PaperBadger

Exploring the use of digital badges for crediting contributors to scholarly papers for their work

As the research environment becomes more digital, we want to test how we can use this medium to help bring transparency and credit for individuals in the publication process.

Using Paper Badger

You can display contributorship badges for science on your own site! Researchers earn badges for their specific contributions to an academic paper. A researcher who worked on investigation earns a prestigious investigation badge for that paper.

The PaperBadger widget enables anyone, from publishers to individual researchers, to easily display badges on a website by including just a few lines of script with the relevant doi (digital object identifier) and a designated <div> in your view file. Authors can add the script to their own sites to display badges earned, while publishers can use the script to display all badges associated with a paper:

Badge Preview

  1. To use the widget on your own site, include a <div> with your custom class in your view file, for example: <div class="my-container"></div>

  2. Above the closing <body> tag, add

    <script type="text/javascript">
       var script = document.createElement("script");
       script.type = "text/javascript";
       script.src = "https://badges.mozillascience.org/widgets/paper-badger-widget.js";
       document.write(decodeURIComponent("%3Cscript src='https://badges.mozillascience.org/widgets/paper-badger-widget.js' type='text/javascript'%3E%3C/script%3E"));
    </script>
  1. In your scripts, include your custom values:
  • the class name where your widget will appear for the container-class key and
  • the doi for the paper you are interested in as the article-doi key
    <!DOCTYPE html>

    <html>
    <head>
    <title>Paper view snippet example | Paper Badger</title>
    </head>
    <body>

    <div class="my-container"></div>

    <script type="text/javascript">
       var script = document.createElement("script");
       script.type = "text/javascript";
       script.src = "https://badges.mozillascience.org/widgets/paper-badger-widget.js";
       document.write(decodeURIComponent("%3Cscript src='https://badges.mozillascience.org/widgets/paper-badger-widget.js' type='text/javascript'%3E%3C/script%3E"));
    </script>
    <script>
        var conf={"article-doi": "10.1186/2047-217X-3-18", "container-class": "my-container"};
        showBadges(conf);
    </script>
    </body>
    </html>

Contributing

Project Roadmap: #17

Want to help? We love new contributors! Please review our contributing guidelines and take a look at some good first bugs.

Getting Started

Are you ready to contribute to Paper Badger? This section will help you set up your own development version of the Contributorship Badges prototype.

Clone PaperBadger and enter the directory: git clone https://github.com/mozillascience/PaperBadger && cd PaperBadger

Run using Docker

You can use Docker to bring up a quick instance of the app to develop against. This way you dont need to have node or mongo installed on your host.

  • Make sure you have Docker and docker-compose installed.
  • Setup your environment variables, or copy over the test file
sed 's/export //' env.test > env.docker
  • build images and bring up the service
docker-compose build
docker-compose up
  • visit the running service
    • If on Linux host: http://localhost:5000
    • If not Linux: http://(docker host ip):5000 (You can find your docker IP with docker-machine ip default)

Run locally

  • Install PaperBadger's Node dependencies: npm install
  • If you would like to override the default, create .env file in your favourite text editor.

PORT, SESSION_SECRET, BADGES_ENDPOINT, BADGES_KEY, BADGES_SECRET, BADGES_SYSTEM, ORCID_AUTH_CLIENT_ID, ORCID_AUTH_CLIENT_SECRET, ORCID_AUTH_SITE, ORCID_AUTH_TOKEN_PATH and ORCID_REDIRECT_URI environment variables are set to the correct values. PORT can be any available port. If you would like to develop against the hosted custom badgekit-api we have running specificaly for PaperBadger testing, your environment values should look this:

    # default port is 5000
    export PORT=5000
    export SESSION_SECRET=USE_SOMETHING_GOOD_LIKE_puUJjfE6QtUnYryb

    # Badges
    export BADGES_ENDPOINT=http://badgekit-api-sciencelab.herokuapp.com/
    export BADGES_KEY=master
    export BADGES_SECRET=#############
    export BADGES_SYSTEM=badgekit

    # ORCID Auth
    export ORCID_AUTH_CLIENT_ID=#############
    export ORCID_AUTH_CLIENT_SECRET=#############
    export ORCID_AUTH_SITE=#############
    export ORCID_AUTH_TOKEN_PATH=#############
    export ORCID_REDIRECT_URI=#############

Ask @acabunoc for ones marked ###########. Our custom BadgeKit API code can be found here.

  • Run npm start, and open up http://localhost:5000/ in your favourite web browser!

API Endpoints


This work is a collaboration with publishers BioMed Central (BMC), Ubiquity Press (UP) and the Public Library of Science (PLoS); the biomedical research foundation, The Wellcome Trust; the software and technology firm Digital Science; the registry of unique researcher identifiers, ORCID; and the Mozilla Science Lab.

About

Exploring the use of digital badges for crediting contributors to scholarly papers for their work

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 89.2%
  • CSS 8.5%
  • HTML 2.3%