Skip to main content
  • Home
  • Development
  • Documentation
  • Donate
  • Operational login
  • Browse the archive

swh logo
SoftwareHeritage
Software
Heritage
Archive
Features
  • Search

  • Downloads

  • Save code now

  • Add forge now

  • Help

  • 35eec47
  • /
  • admin
  • /
  • export-options.html.twig
Raw File Download

To reference or cite the objects present in the Software Heritage archive, permalinks based on SoftWare Hash IDentifiers (SWHIDs) must be used.
Select below a type of object currently browsed in order to display its associated SWHID and permalink.

  • content
  • directory
content badge
swh:1:cnt:f0e33421cc8f9c36215a78838defc6a9ebe6180d
directory badge
swh:1:dir:9ae4cc58a762b0bf044433d15fda09b3baec5d85

This interface enables to generate software citations, provided that the root directory of browsed objects contains a citation.cff or codemeta.json file.
Select below a type of object currently browsed in order to generate citations for them.

  • content
  • directory
(requires biblatex-software package)
Generating citation ...
(requires biblatex-software package)
Generating citation ...
export-options.html.twig
{% extends 'base.html.twig' %}

{% block title %}
  {{ parent() }}
  Options d'export
{% endblock %}
{% block body %}

<h1 class="text-center pt-4 pb-2">
  <button type="button" class="btn btn-lg btn-block btn-light p-4">
    Options d'export
  </button>
</h1>
<div class="card">
  <div class="card-body">
  {# {{form(form)}} #}
    {{ form_start(form) }}
        {{form_widget(form._token)}}

          {{ form_row(form.output_format) }}



          {{ form_row(form.entries) }}

          <div class="form-group" id="form_entries_examples" style="display:none; padding-left:50px;">
          {{ form_label(form.entries_examples) }}
          {{ form_widget(form.entries_examples) }}
          </div>

          {{ form_row(form.classes) }}

          {{ form_row(form.collocations) }}

          <div class="form-group" id="form_collocations_examples" style="display:none; padding-left:50px;">
          {{ form_label(form.collocations_examples) }}
          {{ form_widget(form.collocations_examples) }}
          </div>

          {{ form_row(form.translations) }}
        
          <div class="form-group" id="form_translations_languages" style="display:none; padding-left:50px;">
          {{ form_label(form.translations_languages) }}
          {{ form_widget(form.translations_languages) }}
          </div>

          {{ form_row(form.fonctions) }}

          {{ form_row(form.routines) }}

          <div class="form-group" id="form_routines_examples" style="display:none; padding-left:50px;">
          {{ form_label(form.routines_examples) }}
          {{ form_widget(form.routines_examples) }}
          </div>
          <div class="form-group" id="form_examples_sources" style="display:none; border: 
                                                                    1px solid lightgrey;  
                                                                    border-radius: 5px; 
                                                                    width: 40%;
                                                                    padding: 5px;
                                                                    margin-left: -5px;"> 
          {{ form_label(form.examples_sources) }}
          {{ form_widget(form.examples_sources) }}
          </div>

          {{ form_row(form.export_documentation) }}

          <button type="button" class="btn btn-warning" onClick="toggle(this)" style="margin-bottom:20px;">Tout sélectionner</button>

     {{ form_end(form) }}
  </div>
</div>

<script>
let formArray = {
  "export_entries" : "form_entries_examples",
  "export_collocations" : "form_collocations_examples",
  "export_routines" : "form_routines_examples",
  "export_translations" : "form_translations_languages",

  "export_entries_examples" : "form_examples_sources",
  "export_collocations_examples" : "form_examples_sources",
  "export_routines_examples" : "form_examples_sources",
};

function test(){
  for (var key in formArray) {
    (function(key) {
        document.getElementById(key).addEventListener("change", function() {
           console.log("you clicked region number " + formArray[key]);
           if (this.checked) {
            //  console.log("key " + key + " has value " + formArray[key]);
            document.getElementById(formArray[key]).style.display = "block";

          } else {
            if (formArray[key] != "form_examples_sources"){ // don't want to hide it when another checkbox would require it to stay displayed. So let' never close it :D 
                 document.getElementById(formArray[key]).style.display = "none";
            }
            // console.log("Checkbox is not checked..");
          }

         })
    })(key)
  }
}
window.addEventListener("load", test, false);

const ids = [  "#export_entries",  "#export_collocations",  "#export_routines",  "#export_translations", "#export_entries_examples",  "#export_collocations_examples", "#export_routines_examples", "export_export_documentation"];
function toggle(source) {
  checkboxes = document.querySelectorAll(`[type="checkbox"]`
  );
  // console.log(checkboxes);
    var index = 0, length = checkboxes.length;
    for ( ; index < length; index++) {
        // checkboxes[index].style.transition = "opacity 0.5s linear 0s";
        checkboxes[index].closest('.form-group').style.display = "block";
        checkboxes[index].checked = true ;
    }
}

</script>
{% endblock %}

back to top

Software Heritage — Copyright (C) 2015–2026, The Software Heritage developers. License: GNU AGPLv3+.
The source code of Software Heritage itself is available on our development forge.
The source code files archived by Software Heritage are available under their own copyright and licenses.
Terms of use: Archive access, API— Content policy— Contact— JavaScript license information— Web API