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
  • b2dfb87
  • /
  • 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
  • release
content badge
swh:1:cnt:251dd31881fb0fd9d6a526f0ca3f485fd08924ad
directory badge
swh:1:dir:4b12b95c6c9f886d92b89e756a1b4f20b740f75f
revision badge
swh:1:rev:2f39f190cbe8fc85d0141288ae6ff107bfe475ec
snapshot badge
swh:1:snp:02443124ed4ee0d8d724fefd38bf9b271361cc09
release badge
swh:1:rel:74b590b879f451c8ab8b57d0cb2747b04ba20ef7

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
  • release
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 ...
Generate software citation in BibTex format (requires biblatex-software package)
Generating citation ...
Tip revision: 2f39f190cbe8fc85d0141288ae6ff107bfe475ec authored by Jan-Michael Rye on 02 October 2023, 09:43:41 UTC
Add options to `chemfeat configure`
Tip revision: 2f39f19
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