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/SuziKim/DCCW
22 April 2026, 19:09:54 UTC
  • Code
  • Branches (2)
  • Releases (0)
  • Visits
    • Branches
    • Releases
    • HEAD
    • refs/heads/deploy
    • refs/heads/main
    No releases to show
  • 72972bf
  • /
  • helper
  • /
  • palette_to_image.py
Raw File Download Save again
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
swh:1:cnt:bf950fa8ef4e6f955b5174b3e80cf63a52def9d7
origin badgedirectory badge
swh:1:dir:7e038846ba5669f0317c06aa5c3516b81b2233fb
origin badgerevision badge
swh:1:rev:64aa7da56640747dd1317eb6319068361e8015c9
origin badgesnapshot badge
swh:1:snp:f3e011e3352a9f31a38ef03baf2d4e8b8085c8eb

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
(requires biblatex-software package)
Generating citation ...
(requires biblatex-software package)
Generating citation ...
(requires biblatex-software package)
Generating citation ...
(requires biblatex-software package)
Generating citation ...
Tip revision: 64aa7da56640747dd1317eb6319068361e8015c9 authored by suzikim on 18 August 2021, 18:05:41 UTC
change the initial palette for replicability stamp
Tip revision: 64aa7da
palette_to_image.py
import argparse
import os
import PIL.Image as Image  

import sys
sys.path.append(".")
sys.path.append("..")

from dccw.color_palette import *

def save(hex_list, file_name):
	image_dir = 'palette_images'
	os.makedirs(image_dir, exist_ok=True)

	color_palette = ColorPalette(auto_fetched=False, colors=hex_list)
	color_block_width = 100

	bulked_up = color_palette.bulk_up(color_block_width)
	image_name = '%s.png' % (file_name)
	path = os.path.join(image_dir, image_name) 
	Image.fromarray(bulked_up).save(path)

if __name__ == '__main__':
	parser = argparse.ArgumentParser()
	parser.add_argument('--hexes', nargs="+", required=True)
	parser.add_argument('--filename', required=False, default="palette")

	args = parser.parse_args()
	# hexes: "aa3820 e7a557 d9d6ac 0c8fa7 255a58 373a3c 5b6057 6e9d95 e5d7af ebbb6d"
	hex_list = ["#%s" % hex for hex in args.hexes]

	save(hex_list, args.filename)

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