{# # This file is part of Invenio. # Copyright (C) 2014, 2015, 2016 CERN. # # Invenio is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2 of the # License, or (at your option) any later version. # # Invenio is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with Invenio; if not, write to the Free Software Foundation, Inc., # 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. #} {%- import "invenio_github/settings/helpers.html" as helpers with context %} {%- from "invenio_github/helpers.html" import doi_badge with context %} {%- if not request.is_xhr %} {%- extends config.GITHUB_SETTINGS_TEMPLATE %} {%- block css %} {{ super() }} {% assets "invenio_github_css" %}{% endassets %} {%- endblock css %} {%- block javascript %} {{ super() }} {% assets "invenio_github_js" %}{% endassets %} {%- endblock %} {%- endif %} {%- block settings_content %}
{%- if connected %} {{ helpers.panel_start( _('GitHub Repositories'), with_body=False, icon="fa fa-github", btn='Sync now ...', btn_icon='fa fa-refresh', btn_name='sync-repos', btn_text=_('(updated %(last_sync)s) ', last_sync=last_sync), id="github-view", ) }}

Get started

1 Flip the switch


Select the repository you want to preserve, and toggle the switch below to turn on automatic preservation of your software.

2 Create a release


Go to GitHub and create a release. {{config.THEME_NAME | default('System') }} will automatically download a .zip-ball of all new releases and register a DOIs for them.

3 Get the badge


After your first release, a DOI badge that you can include in GitHub README will appear next to your repository below.


10.5281/zenodo.8475
(example)

More questions? Check out the FAQ.

{% if not repos %} {% endif %} {%- for repo_id, repo in repos %} {% endfor %}
You have no repositories on GitHub.
Go to GitHub and create your first or click Sync-button to synchronize latest changes from GitHub.
{# Set DOI badge for latest release #} {% set doi_url = None %} {% if repo.latest %} {% set pid = repo.latest|release_pid %} {% if pid %} {% set doi_url = url_for('invenio_github_badge.latest_doi', github_id=repo_id, _external=True, _scheme='https')%} {{ doi_badge(pid.pid_value, github_id=repo_id) }} {% endif %} {% endif %} {# Basic repository info #}

{{ repo.full_name }} {% if repo.instance and repo.instance.hook %} {% endif %}

{{ repo.description }} {# Latest release info and links #} {% if doi_url %}

Latest release ({{repo.latest.tag}}): {{ config.SERVER_NAME }}, GitHub

{% endif %}
{% set inaccessible = (repo.instance and repo.instance.user_id and (repo.instance.user_id != current_user.id)) %} {% if inaccessible %} {{_('(This repository is managed by a different user of the organization)')}} {% endif %}
{{ helpers.panel_end(with_body=False) }} {# If the user has not connected his GitHub account... #} {%- else %} {{ helpers.panel_start( _('GitHub'), icon="fa fa-github", ) }}

{{ _('Software preservation made simple!') }}

{{ _('Connect') }}

{{ _('To get started, click "Connect" and we will get a list of your repositories from GitHub.') }}

{{ helpers.panel_end() }} {%- endif %}
{%- endblock %}