From cd1b918a46b563e2bbb192531b90710e849ad297 Mon Sep 17 00:00:00 2001 From: Andrei Alexandrescu Date: Sun, 22 Jan 2012 00:08:32 -0600 Subject: [PATCH 1/2] Add bug tracker summaries --- bugstats.php.dd | 37 +++++++++++++++++++++++++++++++++++++ doc.ddoc | 2 +- fetch-issue-cnt.php | 13 +++++++++++++ posix.mak | 9 ++++++--- 4 files changed, 57 insertions(+), 4 deletions(-) create mode 100644 bugstats.php.dd create mode 100644 fetch-issue-cnt.php diff --git a/bugstats.php.dd b/bugstats.php.dd new file mode 100644 index 0000000000..413eb5961b --- /dev/null +++ b/bugstats.php.dd @@ -0,0 +1,37 @@ +Ddoc + +$(D_S Bug tracker, + +$(PHP + +function getIssueCount($url) +{ + $data = file_get_contents($url); + $regex = '/(\d+) issues found./'; + preg_match($regex,$data,$match); + #var_dump($match); + return "$match[1]"; +} + +) + +$(BOOKTABLE $(SECTION3 Current bugs $(LINK2 http://d.puremagic.com/issues/enter_bug.cgi?product=D,[new])), +$(DISPLAY Regression, query_format=advanced&bug_severity=regression&bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&product=D, #ff0000) +$(DISPLAY Blocker, query_format=advanced&bug_severity=blocker&bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&product=D) +$(DISPLAY Critical, query_format=advanced&bug_severity=critical&bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&product=D) +$(DISPLAY Major, query_format=advanced&bug_severity=major&bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&product=D) +$(DISPLAY Normal$(COMMA) minor$(COMMA) or trivial, query_format=advanced&bug_severity=normal&bug_severity=minor&bug_severity=trivial&bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED) +$(DISPLAY Enhancement, query_format=advanced&bug_severity=enhancement&bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED) +$(DISPLAY All open, query_format=advanced&bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED) +$(DISPLAY All closed, query_format=advanced&bug_status=RESOLVED&bug_status=VERIFIED&bug_status=CLOSED) +) + +$(P
$(LINK2 http://d.puremagic.com/issues/reports.cgi?product=D&datasets=NEW%3A&datasets=ASSIGNED%3A&datasets=REOPENED%3A&datasets=RESOLVED%3A, )
) + +) + +Macros: + TITLE=Bug tracker for the dmd compiler + PHP= + BOOKTABLE =
$2
$1
+ DISPLAY=$(TR $(TD $(LINK2 http://d.puremagic.com/issues/buglist.cgi?$2, $1)) $(TD )) diff --git a/doc.ddoc b/doc.ddoc index 9d69acc629..6fca7c0cd0 100644 --- a/doc.ddoc +++ b/doc.ddoc @@ -188,7 +188,7 @@ $(NAVBLOCK_HEADER $(TOCHEADERL index.html, D Programming Language, D Home), $(TOCENTRYTH comparison.html, D feature list, Features, $(CATEGORY_FEATURES $(SUBNAV_FEATURES))) $(TOCENTRYTH download.html, Download a D compiler, Downloads & Tools, $(CATEGORY_DOWNLOAD $(SUBNAV_DOWNLOAD))) $(TOCENTRYT changelog.html, History of changes to D, Changelog) - $(TOCENTRYT http://d.puremagic.com/issues/, D issue and bug tracking system, Bug tracker) + $(TOCENTRYT bugstats.php, D issue and bug tracking system, Bug tracker) $(TOCENTRYTH faq.html, Frequently Asked Questions, FAQ, $(CATEGORY_FAQ $(SUBNAV_FAQ))) $(TOCENTRYH appendices.html, Appendices, $(CATEGORY_APPENDICES $(SUBNAV_APPENDICES))) $(TOCENTRYT acknowledgements.html, Thank-you to these people who have helped with D, Acknowledgments) diff --git a/fetch-issue-cnt.php b/fetch-issue-cnt.php new file mode 100644 index 0000000000..5bb4374d18 --- /dev/null +++ b/fetch-issue-cnt.php @@ -0,0 +1,13 @@ + +

+ +

+ diff --git a/posix.mak b/posix.mak index e9136f95f3..374c7e85c9 100644 --- a/posix.mak +++ b/posix.mak @@ -36,7 +36,7 @@ search-button.gif Thumbs.db tdpl.jpg ubuntu_logo.png win32_logo.png) STYLES=css/style.css css/print.css PREMADE=dcompiler.html language-reference.html appendices.html \ -howtos.html articles.html +howtos.html articles.html fetch-issue-cnt.php TARGETS=32-64-portability.html cpptod.html ctod.html download.html \ pretod.html gsoc2011.html index.html overview.html spec.html \ @@ -61,7 +61,7 @@ TARGETS=32-64-portability.html cpptod.html ctod.html download.html \ unittest.html hash-map.html pdf-intro-cover.html \ pdf-spec-cover.html pdf-tools-cover.html intro-to-datetime.html \ std_consolidated_header.html simd.html dmd-windows.html \ - dmd-linux.html dmd-freebsd.html dmd-osx.html + dmd-linux.html dmd-freebsd.html dmd-osx.html bugstats.php PDFINTRO=index.html overview.html wc.html warnings.html builtin.html \ ctod.html cpptod.html pretod.html template-comparison.html @@ -112,6 +112,9 @@ ALL_FILES = $(ALL_FILES_BUT_SITEMAP) $(DOC_OUTPUT_DIR)/sitemap.html $(DOC_OUTPUT_DIR)/%.html : %.dd $(DDOC) $(DMD) -c -o- -Df$@ $(DDOC) $< +$(DOC_OUTPUT_DIR)/%.php : %.php.dd $(DDOC) + $(DMD) -c -o- -Df$@ $(DDOC) $< + $(DOC_OUTPUT_DIR)/% : % @mkdir -p $(dir $@) cp $< $@ @@ -151,7 +154,7 @@ clean: rm -rf $(DOC_OUTPUT_DIR) ${DMD_DIR}.${LATEST} ${LATEST}.ddoc rm -rf ${DRUNTIME_DIR}.${LATEST} ${PHOBOS_DIR}.${LATEST} -rsync : #all +rsync : all rsync -avz $(DOC_OUTPUT_DIR)/ d-programming@digitalmars.com:data/ pdf : $(PDFTARGETS) From d3c14ba270d5052cfa5ae42e11662633ba5e9426 Mon Sep 17 00:00:00 2001 From: Andrei Alexandrescu Date: Sun, 22 Jan 2012 01:12:42 -0600 Subject: [PATCH 2/2] Small improvements. PHP is actually not used in this script, keeping it just for future reference. --- bugstats.php.dd | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/bugstats.php.dd b/bugstats.php.dd index 413eb5961b..8452708128 100644 --- a/bugstats.php.dd +++ b/bugstats.php.dd @@ -2,20 +2,7 @@ Ddoc $(D_S Bug tracker, -$(PHP - -function getIssueCount($url) -{ - $data = file_get_contents($url); - $regex = '/(\d+) issues found./'; - preg_match($regex,$data,$match); - #var_dump($match); - return "$match[1]"; -} - -) - -$(BOOKTABLE $(SECTION3 Current bugs $(LINK2 http://d.puremagic.com/issues/enter_bug.cgi?product=D,[new])), +$(BOOKTABLE $(SECTION3 Current bugs $(LINK2 http://d.puremagic.com/issues/enter_bug.cgi?product=D,[report new bug])), $(DISPLAY Regression, query_format=advanced&bug_severity=regression&bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&product=D, #ff0000) $(DISPLAY Blocker, query_format=advanced&bug_severity=blocker&bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&product=D) $(DISPLAY Critical, query_format=advanced&bug_severity=critical&bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&product=D)