Code Monkey home page Code Monkey logo

swissues's Introduction

Reason about issues related to SWI-Prolog and its packages

The Prolog programs in this repository reason about the SWI-Prolog (+ packages) issues that are filed on GitHub.

Browse the collection of SWI-Prolog issues, updated twice a day:

https://www.metalevel.at/swissues

issues.pl lets you obtain the repositories and issues on the toplevel. This is very easy to do, using a combination of SWI-Prolog's HTTP, HTML and XPATH libraries.

In principle, the repositories can be easily extracted from a github overview page with:

overview_repository(Page, R) :-
        load_html(Page, DOM, []),
        xpath(DOM, //a(contains(@itemprop, 'codeRepository'),@href), R0),
        atomic_list_concat(['https://github.com',R0], R).

Complications only arise because github does not answer very reliably on multiple requests, so keep-alive connections and timeouts are used.

If the github page structure changes, then such snippets must be adapted.

Example invocation:

$ swipl issues.pl

Sample query and its result:

?- repository(R), repository_issue(R, Text, Link).
R = 'https://github.com/SWI-Prolog/packages-http',
Text = text('      --debug=topic yields error with thread_httpd\n    '),
Link = 'https://github.com/SWI-Prolog/packages-http/issues/32' ;
R = 'https://github.com/SWI-Prolog/packages-http',
Text = text('      HEAD method must not return a message-body in the response\n    '),
Link = 'https://github.com/SWI-Prolog/packages-http/issues/31' ;
R = 'https://github.com/SWI-Prolog/packages-http',
Text = text('      Better approach towards throwing HTTP errors\n    '),
Link = 'https://github.com/SWI-Prolog/packages-http/issues/20' .

html_issues.pl uses library(http/html_write) to create the file swi-issues.html when make_html/0 is invoked. The HTML file displays the collected information about all issues.

To refresh swi-issues.html, use for example:

$ swipl -g make_html -t halt html_issues.pl

swissues's People

Contributors

triska avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.