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

Revision 1cf967a9aaafaadfcb812c034a4052feb86333d3 authored by EPiQC on 06 August 2017, 15:42:42 UTC, committed by EPiQC on 06 August 2017, 15:42:42 UTC
ScaffCC v3.0a
1 parent a19f289
  • Files
  • Changes
  • 7646bc9
  • /
  • rkqc
  • /
  • make.py
Raw File Download
Permalinks

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.

  • revision
  • directory
  • content
revision badge
swh:1:rev:1cf967a9aaafaadfcb812c034a4052feb86333d3
directory badge Iframe embedding
swh:1:dir:a83c71a8d007b7503b4664b053e7f2223c113f93
content badge Iframe embedding
swh:1:cnt:1fe501053d026bc29ba8408a143ed219ce53514e
Citations

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.

  • revision
  • directory
  • content
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 ...
make.py
#!/usr/bin/env python

import subprocess, sys

tee="tee -a" #append

ROOT_DIR=sys.path[0]

script_args = sys.argv 
script_name = script_args[0]

def failure():
    print ("couldn't parse arguments. Try "+ script_name +" -h")
    sys.exit(1);

if len(sys.argv) == 1:
	failure()

script_args.pop(0)
script = script_args.pop(0); 


validScripts = ["bootstrap", "build", "clean"]
validScriptsDesc =[
	"initializes the revkit directory and libraries",
	"builds the algorithms",
	"cleans the revkit directory"]

if script in ("-h", "--help"):      
    print ("valid scripts are: " + ', '.join(validScripts))
    for x in range (0, len(validScripts)):
    	print ("- " + validScripts[x] + ": " + validScriptsDesc[x])
    print ("Take a look at doc/README for further information.")
    sys.exit(2)                  
elif script in (validScripts):
    SCRIPTS_DIR = ROOT_DIR+"/scripts/"
    LOG_DIR=ROOT_DIR + "/log"
    LOGFILE_SUFFIX=".log"
    LOGFILE=LOG_DIR + "/" + script + LOGFILE_SUFFIX
    ERRFILE=LOG_DIR + "/" + script + "_error" + LOGFILE_SUFFIX
    
    init = subprocess.Popen([SCRIPTS_DIR + "init" + " " + LOGFILE + " " + ERRFILE], shell=True )
    if init.wait() != 0:
        print ("init error")
        sys.exit(1);

            
    proc = subprocess.Popen([SCRIPTS_DIR + script + " " +( ' '.join(script_args))], 
  	stdout=subprocess.PIPE,
        stderr=subprocess.PIPE,
        shell=True
        )
    
    out = subprocess.Popen([tee + " " + LOGFILE],
                           stdin=proc.stdout,
                           shell=True
                           )
    
    err = subprocess.Popen([tee + " " + ERRFILE],
                           stdin=proc.stderr,
                           shell=True
                           )
    
    exit(proc.wait()) #exit with the return code of the script
    
else:
	failure()

	
The diff you're trying to view is too large. Only the first 1000 changed files have been loaded.
Showing with 0 additions and 0 deletions (0 / 0 diffs computed)
swh spinner

Computing file changes ...

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— Contact— JavaScript license information— Web API