FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
processing-docs/generate/contributions_data.php at macos · processing/processing-docs · GitHub
processing
processing-docs
Repository navigation
Code
Issues
3
(3)
Pull requests
Actions
Projects
Wiki
Security and quality
Insights
Expand file tree
Breadcrumbs
processing-docs
/
generate
/
contributions_data.php
Copy path
More file actions
More file actions
Latest commit
History
History
History
76 lines (53 loc) · 2.12 KB
Breadcrumbs
processing-docs
/
generate
/
contributions_data.php
Copy path
File metadata and controls
76 lines (53 loc) · 2.12 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
<?php
//
// This script pulls in the latest changes from the repo
// and then runs the Python script that regenerates the
// contributions file(s).
//
// Yet Processing 2.0 and Processing 3.0 now reference
// different contributions files:
//
// 2.x contributions.txt
// 3.x contribs.txt
//
// …so this script now takes an optional argument in the
// query string, 'v', which tells it which version of
// the file to generate. For example:
//
// contributions_data.php?v=2
//
// …will generate *only* the "contributions.txt" for 2.x.
//
// If 'v' is missing, then both 2.x/3.x files are generated.
//
require_once
(
'
../config.php
'
);
$
benchmark_start
=
microtime_float
();
$
path
=
BASEDIR
;
//define('BASEDIR', dirname(__FILE__).'/');
// Pull from GitHub
`
cd
$
path
&& /usr/bin/git pull https://github.com/processing/processing-docs/
`;
$
referencepath
=
$
path
.
"
contrib_generate/
"
;
//Check the URL query string to see if a version is specified
$
version
=
$
_GET
[
'
v
'
];
if
(
$
version
==
2
) {
echo
'
<p>Generating "contributions.txt" for Processing 2.x...</p>
'
;
// Generate "contributions.txt" for Processing 2.x
//`cd $referencepath && python build_listing.py sources.conf contributions.txt 216 227`;
`
cd
$
referencepath
&& python build_listing_legacy.py
`;
}
elseif
(
$
version
==
3
) {
echo
'
<p>Generating "contribs.txt" for Processing 3.x...</p>
'
;
// Generate "contribs.txt" for Processing 3.x
`
cd
$
referencepath
&& python build_listing.py
`;
}
else
{
echo
'
<p>No version value specified, so I will generate for both 2.x and 3.x.</p>
'
;
echo
'
<p>Generating "contributions.txt" for Processing 2.x...</p>
'
;
// Generate "contributions.txt" for Processing 2.x
//`cd $referencepath && python build_listing.py sources.conf contributions.txt 216 227`;
`
cd
$
referencepath
&& python build_listing_legacy.py
`;
echo
'
<p>Generating "contribs.txt" for Processing 3.x...</p>
'
;
// Generate "contribs.txt" for Processing 3.x
`
cd
$
referencepath
&& python build_listing.py
`;
}
$
benchmark_end
=
microtime_float
();
$
execution_time
=
round
(
$
benchmark_end
-
$
benchmark_start
,
4
);
?>
<p>Generated files in
<?=
$
execution_time
?>
seconds.</p>
Back
|
FazBrowse Home
|
New Git URL