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

swh:1:snp:02443124ed4ee0d8d724fefd38bf9b271361cc09
  • Code
  • Branches (3)
  • Releases (7)
    • Branches
    • Releases
    • HEAD
    • refs/heads/dev-mike
    • refs/heads/main
    • refs/tags/v2023.1
    • v2023.11
    • v2023.10
    • v2023.9
    • v2023.6
    • v2023.5
    • v2023.4
    • v2023.3
  • 97647e8
  • /
  • scripts
  • /
  • build_documentation.sh
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
  • revision
  • snapshot
content badge
swh:1:cnt:251dd31881fb0fd9d6a526f0ca3f485fd08924ad
directory badge
swh:1:dir:4b12b95c6c9f886d92b89e756a1b4f20b740f75f
revision badge
swh:1:rev:25bfa1d9d55358292cbdf185f96f20c4d9f17893
snapshot badge
swh:1:snp:02443124ed4ee0d8d724fefd38bf9b271361cc09

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
  • revision
  • snapshot
Generate software citation in BibTex format (requires biblatex-software package)
Generating citation ...
Generate software citation in BibTex format (requires biblatex-software package)
Generating citation ...
Generate software citation in BibTex format (requires biblatex-software package)
Generating citation ...
Generate software citation in BibTex format (requires biblatex-software package)
Generating citation ...
Tip revision: 25bfa1d9d55358292cbdf185f96f20c4d9f17893 authored by Jan-Michael Rye on 03 October 2023, 13:20:55 UTC
Add MolPred link to README
Tip revision: 25bfa1d
build_documentation.sh
#!/usr/bin/env bash
set -euo pipefail

SELF=$(readlink -f "${BASH_SOURCE[0]}")
DIR=${SELF%/*/*}
DOC_DIR=$DIR/doc
SRC_DIR=$DIR/src

function show_help()
{
  cat << HELP
USAGE

  ${0##*/} [-i] [<directory>]

OPTIONS

  -i
    Install documentation dependencies with pip.

  <directory>
    An optional output directory for the generated files. If not given, they
    will be generated in a subdirectory named "public" in the current working
    directory.
HELP

  exit "$1"
}

install_deps=false
while getopts 'hi' opt
do
  case "$opt" in
    i) install_deps=true ;;
    h) show_help 0 ;;
    *) show_help 1 ;;
  esac
done
shift $((OPTIND - 1))

output_dir=${1:-public}

if $install_deps
then
  pip install -r "$DOC_DIR/requirements.txt"
fi
"$DIR/scripts/generate_doc_mds.sh" "$DOC_DIR/source/features.md"
sphinx-apidoc -o "$DOC_DIR/source" -f -H 'API Documentation' "$SRC_DIR"
mkdir -p "$output_dir"
sphinx-build -b html "$DOC_DIR/source" "$output_dir"

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