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

https://github.com/mcnuttandrew/no-grammar-supplement
11 November 2025, 14:30:49 UTC
  • Code
  • Branches (2)
  • Releases (0)
  • Visits
    • Branches
    • Releases
    • HEAD
    • refs/heads/fix-build
    • refs/heads/main
    No releases to show
  • c1082ab
  • /
  • src
  • /
  • Browse.svelte
Raw File Download
Take a new snapshot of a software origin

If the archived software origin currently browsed is not synchronized with its upstream version (for instance when new commits have been issued), you can explicitly request Software Heritage to take a new snapshot of it.

Use the form below to proceed. Once a request has been submitted and accepted, it will be processed as soon as possible. You can then check its processing state by visiting this dedicated page.
swh spinner

Processing "take a new snapshot" request ...

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
origin badgecontent badge Iframe embedding
swh:1:cnt:4a256e495c824466e37f60c75f7c4f2438fb11e0
origin badgedirectory badge Iframe embedding
swh:1:dir:61d2e162b28e5008f8c58b72dec725568f302750
origin badgerevision badge
swh:1:rev:57d704e8ca05108db3526b7181d70fa33add3519
origin badgesnapshot badge
swh:1:snp:7b9a9fe3c19f8f6a0863aa3ee9b40c11e1333922

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: 57d704e8ca05108db3526b7181d70fa33add3519 authored by Cameron Yick on 13 December 2023, 03:03:53 UTC
fix(docs): Update typos in public copy (#10)
Tip revision: 57d704e
Browse.svelte
<script lang="ts">
  import {writable} from 'svelte/store';
  import MetaDisplay from './MetaDisplay.svelte';
  import Viewer from './Viewer.svelte';
  import FilterBuilder from './FilterBuilder.svelte';
  import Badge from './Badge.svelte';
  import {
    Directory,
    LangMeta,
    createSort,
    filterFilterForNewBadge,
    filterLanguagesBasedOnBadges,
    getLangCounts,
    last
  } from './utils';
  export let directory: Directory;
  export let langMetaCollection: LangMeta;
  export let language: string;
  export let file: string | null;
  let filter = [];
  $: allowedLangs = filterLanguagesBasedOnBadges(langMetaCollection, filter);

  const langSort = writable(localStorage.getItem('langSort') || 'carrier-language');
  langSort.subscribe((val) => localStorage.setItem('langSort', val));

  $: langCount = getLangCounts(directory);
  $: allowLangMeta = Object.values(langMetaCollection)
    .filter((x) => allowedLangs.has(x.sysKey))
    .filter((x) => directory[x.sysKey]);

  $: sortedLangs = createSort(allowLangMeta, $langSort as any, langCount);
  $: fileType = (file && last(file.split('.'))) || null;
  $: code = (language && file && directory[language] && directory[language][file]) || null;
</script>

<div class="flex pl-8 max-h-full">
  <!-- left column -->
  <div class="flex flex-col my-column-1 border-r border-r-slate-300 pr-8 pt-8 max-h-full">
    <!-- header -->
    <div class="flex flex-col pb-8">
      <h3 class="text-xl">Example Browser</h3>
      <p class="text-xs mb-2">
        This view allows you to explore the curated collection of example programs for each of the languages.
      </p>
      <div class="">
        <label for="lang-sort" class="text-xs font-bold">Sort by</label>
        <select bind:value={$langSort} name="lang-sort">
          {#each ['none', 'alphabetical', 'carrier-language', 'number-of-examples'] as sortType}
            <option>{sortType}</option>
          {/each}
        </select>
      </div>
      <FilterBuilder
        verticalAlignment={true}
        cb={(x) => {
          filter = filterFilterForNewBadge(filter, x).concat(x);
        }}
        langMeta={langMetaCollection}
      />

      <div>
        {#each filter as badge}
          <Badge
            showNegativeBooleans={true}
            badgeType={badge.badgeType}
            badgeValue={badge.badgeValue}
            cancelCallbak={() => {
              filter = filterFilterForNewBadge(filter, badge);
            }}
          />
        {/each}
      </div>
    </div>
    <!-- main content -->
    <div class="flex flex-col max-h-full overflow-y-auto pb-96">
      {#each sortedLangs as { sectionTitle, languages }}
        <div class="flex flex-col mb-2">
          {#if sectionTitle}
            <div class="font-bold underline">{sectionTitle.toUpperCase()}</div>
          {/if}
          {#each languages as { viewName, linkName }}
            <a
              href={`/#/browse/${linkName}`}
              class="flex flex-col mb-3 text-black visited:text-black "
              class:row-item-selected={language === linkName}
            >
              <span class="text-base leading-3">
                {viewName}
              </span>
              <span class="opacity-50 text-sm">
                {langCount[linkName]} example{langCount[linkName] > 1 ? 's' : ''}
              </span>
            </a>
          {/each}
        </div>
      {/each}
    </div>
  </div>
  <!-- center column -->
  <div class="flex flex-col my-column-2  border-r border-r-slate-300  pl-8 pr-8 pt-8 pb-48">
    {#if language && langMetaCollection[language]}
      <div class="flex flex-col">
        <h3>
          {langMetaCollection[language] && langMetaCollection[language].System}
        </h3>
        <MetaDisplay meta={langMetaCollection[language]} />
      </div>
      <div class="flex flex-col overflow-y-auto">
        {#each Object.keys(directory[language]) as fileOption}
          <a
            href={`#/browse/${language}/${fileOption}`}
            class="row-item text-black visited:text-black"
            class:row-item-selected={file === fileOption}
          >
            {fileOption}
          </a>
        {/each}
      </div>
    {/if}
  </div>
  <!-- viewer -->
  {#if language && code}
    <Viewer {fileType} {code} />
  {:else}
    <div class="flex items-center justify-center w-full text-2xl">
      Select a {!language ? 'language' : 'example'}
    </div>
  {/if}
</div>

<style>
  .my-column-1 {
    width: 220px !important;
    min-width: 220px;
  }
  .my-column-2 {
    width: 400px !important;
    min-width: 400px;
  }
</style>

back to top

Software Heritage — Copyright (C) 2015–2025, 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