PageSourceSearch

https://scoap3.org/wp-content/plugins/scoap3-status/s3-coll-status.js

js scoap3.org collected 2026-10-02 03:11:50 UTC 5,497 bytes, 138 lines download raw bytes

1var journals = {
2    "Acta Physica Polonica B": {
3        "full_name":"Acta Physics Polonica B",
4        "publisher":"Jagiellonian University",
5    "count":0
6    },
7    "Advances in High Energy Physics":{
8        "full_name":"Advances in High Energy Physics",
9        "publisher":"Hindawi",
10    "count":0
11    },
12   "Chinese Physics C": {
13        "full_name":"Chinese Physics C",
14        "publisher":"IOP Publishing / Chinese Academy of Sciences",
15    "count":0
16    },
17   "European Physical Journal C": {
18        "full_name":"European Physical Journal C",
19        "publisher":"Springer / Società Italiana di Fisica",
20    "count":0
21    },
22   "Journal of Cosmology and Astroparticle Physics": {
23        "full_name":"Journal of Cosmology and Astroparticle Physics",
24        "publisher":"IOP Publishing / SISSA",
25    "count":0
26    },
27   "Journal of High Energy Physics": {
28        "full_name":"Journal of High Energy Physics",
29        "publisher":"Springer / SISSA",
30    "count":0
31    },
32   "New Journal of Physics": {
33        "full_name":"New Journal of Physics",
34        "publisher":"IOP Publishing / Deutsche Physikalische Gesellschaft",
35    "count":0
36    },
37   "Nuclear Physics B": {
38        "full_name":"Nuclear Physics B",
39        "publisher":"Elsevier",
40    "count":0
41    },
42   "Physical Review C": {
43        "full_name":"Physical Review C",
44        "publisher":"American Physical Society",
45    "count":0
46    },
47   "Physical Review D": {
48        "full_name":"Physical Review D",
49        "publisher":"American Physical Society",
50    "count":0
51    },
52   "Physical Review Letters": {
53        "full_name":"Physical Review Letters",
54        "publisher":"American Physical Society",
55    "count":0
56    },
57   "Physics Letters B": {
58        "full_name":"Physics Letters B",
59        "publisher":"Elsevier",
60    "count":0
61    },
62   "Progress of Theoretical and Experimental Physics": {
63        "full_name":"Progress of Theoretical and Experimental Physics",
64        "publisher":"Oxford University Press / Japanese Physical Society",
65    "count":0
66    }
67};
68
69let repo_url = 'https://repo.scoap3.org';
70
71function evenOdd(i){
72    return (i % 2 == 0) ? 'even' : 'odd';
73};
74
75function formatMoney(n, c, d, t){
76    c = isNaN(c = Math.abs(c)) ? 2 : c,
77    d = d == undefined ? "." : d,
78    t = t == undefined ? "," : t,
79    s = n < 0 ? "-" : "",
80    i = parseInt(n = Math.abs(+n || 0).toFixed(c)) + "",
81    j = (j = i.length) > 3 ? j % 3 : 0;
82   return s + (j ? i.substr(0, j) + t : "") + i.substr(j).replace(/(\d{3})(?=\d)/g, "$1" + t) + (c ? d + Math.abs(n - i).toFixed(c).slice(2) : "");
83 };
84
85function getCollectionsCount(){
86    jQuery.getJSON(repo_url + "/api/article-stats/", function(scoap3_collection_status) {
87        for(var key in scoap3_collection_status['journals']){
88            journals[key]['count'] = scoap3_collection_status['journals'][key];
89        };
90
91        var i = 0;
92        for(var key in journals) {
93            jQuery('#s3-collections-count').append('<tr class="row-2 '+ evenOdd(i) +'"><td class="column-1">'+journals[key]['full_name']+'</td><td class="column-2">'+journals[key]['publisher']+'</td><td class="column-3">'+formatMoney(journals[key]['count'],0,',',' ')+'</td></tr>');
94            i = i + 1;
95        };
96
97        jQuery('#s3-collections-count').append('<tr class="row-2 '+  evenOdd(i) +'"><td class="column-1"><b>Total</b></td><td class="column-2"></td><td class="column-3"><b>'+formatMoney(scoap3_collection_status['other']['all'],0,',',' ')+'</b></td></tr>');
98        jQuery('#s3-count-loader').hide();
99    });
100};
101
102function getDateString(date){
103    var month = date.getMonth()+1;
104    if (month < 10){
105        month = "0"+month;
106    };
107    var day = date.getDate();
108    if (day < 10){
109        day = "0"+day;
110    };
111    return date.getFullYear() + "-" + month + "-" + day;
112};
113
114function getRepoStatus(zero_value_filler){
115    jQuery.getJSON(repo_url + "/api/article-stats/", function(scoap3_collection_status) {
116        let today = new Date();
117
118        let date_yesterday = new Date();
119        date_yesterday.setDate(today.getDate() - 1);
120        let yesterday = getDateString(date_yesterday);
121
122		
123		// https://repo.scoap3.org/search?publication_year__gte=2024-01-01&publication_year__lte=2025-12-31
124        let date_minus_30 = new Date();
125        date_minus_30.setDate(today.getDate() - 30);
126        let minus_30 = getDateString(date_minus_30);
127
128        let yesterday_url = "<a href='" + repo_url + "/search?publication_year__gte="+yesterday+"&publication_year__lte=" + yesterday + "'>" + formatMoney(scoap3_collection_status['other']['yesterday'], 0, ',', ' ') + "</a>";
129        let last_30_days_url = "<a href='" + repo_url + "/search?publication_year__gte=" + minu
129s_30 + "&publication_year__lte="+getDateString(today)+"'>" + formatMoney(scoap3_collection_status['other']['last_30_days'], 0, ',', ' ') + "</a>";
130        let this_year_url = "<a href='" + repo_url + "/search?publication_year__gte=" + today.getFullYear() + "-01-01&publication_year__lte="+getDateString(today)+"'>" + formatMoney(scoap3_collection_status['other']['this_year'], 0, ',', ' ') + "</a>";
131        let all = "<a href='" + repo_url + "/search'>" + formatMoney(scoap3_collection_status['other']['all'], 0, ',', ' ') + "</a>";
132
133        jQuery('#scoap3_repo_status_yesterday').html(yesterday_url);
134        jQuery('#scoap3_repo_status_last_30_days').html(last_30_days_url);
135        jQuery('#scoap3_repo_status_this_year').html(this_year_url);
136        jQuery('#scoap3_repo_status_all').html(all);
137    });
138}

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.