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://gitlab.com/hatiers/lstclean.git
02 March 2023, 09:39:01 UTC
  • Code
  • Branches (5)
  • Releases (0)
  • Visits
    • Branches
    • Releases
    • HEAD
    • refs/heads/fonctions
    • refs/heads/master
    • refs/heads/varnish
    • refs/merge-requests/1/head
    • refs/merge-requests/1/merge
    • a74862fb741564a88fa4ad4651965c0362c50e30
    No releases to show
  • c941a61
  • /
  • xml-perl-transform
  • /
  • xml-annote-ids.pl
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:333c14c72510072a90480e4c526870461958036b
origin badgedirectory badge
swh:1:dir:9054336d0f8baed04600bae3395aeb28b75e3ae9
origin badgerevision badge
swh:1:rev:a74862fb741564a88fa4ad4651965c0362c50e30
origin badgesnapshot badge
swh:1:snp:bf8e310d00b315fbed5c372ec61a9abd70644e96

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: a74862fb741564a88fa4ad4651965c0362c50e30 authored by arnaudbey on 01 March 2023, 15:58:44 UTC
WIP
Tip revision: a74862f
xml-annote-ids.pl
use Encode;
use IO::Handle;
STDOUT->autoflush();
use strict;
use utf8;
use Data::Dumper;
use Text::Levenshtein qw(distance);
use Data::Dumper;
use experimental 'smartmatch';
use locale;

######################################### Parameters #########################################

my $repIn          = "in";
my $repOut          = "out";##################################
my $source;
opendir(DIRIN,$repIn);
while ($source = readdir(DIRIN)) {
  if($source=~/\.xml$/){

    open( SOURCE, "<:encoding(utf8)", $repIn."/".$source );
    open( CIBLE, ">:encoding(utf8)", $repOut."/".$source );
    my $line;
    my $lemma;
    my $cat;
    my $acceptionUniq;
    my $allXML=join("",<SOURCE>);
    # while ($line = <SOURCE>){
    #
    #
    # }
    # if($allXML=~/<LST (CAT="([^"]+)"[^<>]+LEMMA="([^"]+)"[^<>]*>)/sg){
    my $cpt=0;
    my $cptSub=0;
      while($allXML=~/(<LST(\s+CAT="([^"]+)"[^<>]+?LEMMA="([^"]+?)"[^<>]*?>))/sg){
        my $empan = $1;
        my $inOpenTag=$2;
        my $lemma=$4;
        my $cat=$3;
        # print "TOKEN $5 \n";
        my $acceptionUniq="";
        if($lemma =~/^(.+?)([_A-Z\d]+)$/){
          $acceptionUniq = $1."_".$cat.$2;
          # print "LemmaComp $acceptionUniq\n";
        }
        else{
          $acceptionUniq = $lemma."_".$cat;
          # print "LemmaSimple $acceptionUniq\n";
        }
        # print "Passage $inOpenTag\n";
        if($allXML=~/\Q$empan/s){
          print "EMPAN $empan\n";
          print "SUB $inOpenTag\n";
          $cptSub++;
          $allXML=~s/\Q$empan/<LST acceptionUniq="$acceptionUniq" $inOpenTag/s;

        }
        $cpt++;
    }
    print "Lemma LST : $cpt \n";
    print "SUB LST : $cptSub \n";
    print CIBLE $allXML;


    close(SOURCE);
    close(CIBLE);
}

}

closedir(DIRIN);

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