This repository has been archived by the owner on Jan 8, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathbfgen.py
executable file
·61 lines (48 loc) · 2.03 KB
/
bfgen.py
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
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import sys
import datetime
import fileinput
from utils import RSYNC_PATH, get_version, get_tag_url
from doc_generator import find_pkg, repl_all
def usage():
print "bfgen.py version"
sys.exit(1)
try:
version = sys.argv[1]
except:
usage()
repl = {"@VERSION@": version,
"@MONTHYEAR@": datetime.datetime.now().strftime("%b %Y"),
"@YEAR@": datetime.datetime.now().strftime("%Y")}
# Read major and minor version from input version
major_version, minor_version = get_version(version)
repl["@TAG_URL@"] = get_tag_url("bioformats", version)
repl["@DOC_URL@"] = (
"http://www.openmicroscopy.org/site/support/bio-formats%s.%s"
% (major_version, minor_version))
PREFIX = os.environ.get('PREFIX', 'bio-formats')
BF_RSYNC_PATH = '%s/%s/%s/' % (RSYNC_PATH, PREFIX, version)
for x, y in (
("COMMAND_LINE_TOOLS", "artifacts/bftools.zip"),
("MATLAB_TOOLS", "artifacts/bfmatlab.zip"),
("OCTAVE_PACKAGE", "artifacts/bioformats-octave-@[email protected]"),
("DOC", "artifacts/bio-formats-doc-@[email protected]"),
("JAVADOCS", "artifacts/bio-formats-javadocs-@[email protected]"),
("SOURCE_CODE_ZIP", "artifacts/bioformats-@[email protected]"),
("SOURCE_CODE_TXZ", "artifacts/bioformats-@[email protected]"),
("bioformats_package.jar", "artifacts/bioformats_package.jar"),
("bio-formats_plugins.jar", "artifacts/bio-formats_plugins.jar"),
("bio-formats-testing-framework.jar",
"artifacts/bio-formats-testing-framework.jar"),
("formats-api.jar", "artifacts/formats-api.jar"),
("formats-bsd.jar", "artifacts/formats-bsd.jar"),
("formats-gpl.jar", "artifacts/formats-gpl.jar"),
("jai_imageio.jar", "artifacts/jai_imageio.jar"),
("loci_tools.jar", "artifacts/loci_tools.jar"),
("turbojpeg.jar", "artifacts/turbojpeg.jar"),
):
find_pkg(repl, BF_RSYNC_PATH, x, y)
for line in fileinput.input(["bf_downloads.html"]):
print repl_all(repl, line, check_http=True),