diff --git a/app.py b/app.py index 056a737..dad8177 100755 --- a/app.py +++ b/app.py @@ -5,6 +5,7 @@ import datetime import dateutil import functools import jinja2 +import pathlib import pyld import re import requests @@ -16,7 +17,7 @@ from string import Template application = bottle.app() # Directories to search for HTML templates -bottle.TEMPLATE_PATH = [ './templates' ] +bottle.TEMPLATE_PATH = [ './pages' ] def query(query_string, jsonld_frame=None): """ @@ -25,7 +26,7 @@ def query(query_string, jsonld_frame=None): """ http_request = requests.post( - 'http://localhost:7000/dokk', + 'http://dokk:7000/dokk', data = { 'format': 'json', 'query': query_string}) results = http_request.json() @@ -54,6 +55,7 @@ template = functools.partial(template, template_settings = { }, 'globals': { 'now': lambda: datetime.datetime.now(datetime.timezone.utc), + 'query': query, 'request': request, 'url': application.get_url, }, @@ -70,158 +72,40 @@ def error404(error): return '[404] {}'.format(error.body) -@bottle.get('/static/', name='static') -def static(filename): - """ - Path for serving static files. - """ - - return bottle.static_file(filename, root='./static/') - -@bottle.get('/', name='homepage') -def homepage(): +@bottle.get('/favicon.ico') +def favicon(): """ """ - return template('index.html') + return bottle.static_file('favicon.ico', root='./') -@bottle.get('/library', name='library') -def library(): +@bottle.get('/static/', name='static') +def static(filename): """ + Path for serving static files. """ - data = query( - ''' - PREFIX library: - PREFIX license: - - CONSTRUCT { - ?item library:title ?title; - library:author ?author ; - library:license ?license . - ?license license:id ?license_id ; - license:name ?license_name . - } - WHERE { - ?item library:title ?title ; - library:author ?author ; - library:license ?license . - - OPTIONAL { - ?license license:id ?license_id_optional ; - license:name ?license_name_optional . - } - - BIND(COALESCE(?license_id_optional, SUBSTR(STR(?license), 14)) AS ?license_id) - BIND(COALESCE(?license_name_optional, SUBSTR(STR(?license), 14)) AS ?license_name) - } - ORDER BY UCASE(?title) - ''', - { - '@context': { - 'library': 'dokk:library:', - 'license': 'dokk:license:', - 'library:author': { '@container': '@set' }, - 'library:license': { '@container': '@set' } - }, - 'library:title': {} - }) - - return template('library.html', data=data) + return bottle.static_file(filename, root='./static/') @bottle.get('/library/', name='library_item') def library_item(item_id): """ """ - item_iri = '' - try: with open('../blob.dokk.org/pdf_to_text/' + item_id + '.txt', 'r') as file: item_plaintext = file.read() except: item_plaintext = '' - data = query(f''' - PREFIX library: - PREFIX license: - - CONSTRUCT {{ - ?item library:title ?title ; - library:author ?author ; - library:license ?license . - - ?license license:id ?license_id ; - license:name ?license_name . - }} - WHERE {{ - ?item - library:title ?title ; - library:author ?author ; - library:license ?license . - - FILTER (?item = {item_iri}) - - OPTIONAL {{ - ?license license:id ?license_id_optional ; - license:name ?license_name_optional . - }} - - BIND(COALESCE(?license_id_optional, SUBSTR(STR(?license), 14)) AS ?license_id) - BIND(COALESCE(?license_name_optional, SUBSTR(STR(?license), 14)) AS ?license_name) - }} - ''', - { - '@context': { - 'library': 'dokk:library:', - 'license': 'dokk:license:', - 'library:author': { '@container': '@set' }, - 'library:license': { '@container': '@set' } - }, - 'library:title': {} - }) - - return template('library_item.html', data=data['@graph'][0], item_id=item_id, plaintext=item_plaintext) - -@bottle.get('/license', name='licenses') -def licenses(): - """ - """ - - data = query( - ''' - PREFIX license: - - SELECT * - WHERE { - ?license license:id ?id ; - license:name ?name. - } - ORDER BY ASC(UCASE(?name)) - ''') - - return template('licenses.html', data=data) + return template('templates/library/item.tpl', item_id=item_id, plaintext=item_plaintext) -@bottle.get('/manpages', name='manpages') -def manpages(): +@bottle.get('/license/', name='license') +def license(id): """ """ - data = query( - ''' - PREFIX mp: - - SELECT DISTINCT ?distribution ?version - WHERE { - [] mp:source [ - mp:distribution_version ?version ; - mp:distribution_name ?distribution ; - ] . - } - ORDER BY ?distribution ?version - ''') - - return template('manpages.html', data=data) + return template('templates/license/license.tpl', license_id=id) @bottle.get('/manpages//', name='manpages_distribution') def manpages_distribution(distribution, version): @@ -244,7 +128,7 @@ def manpages_distribution(distribution, version): ORDER BY ?package ''') - return template('manpages_distribution.html', data=data, distribution=distribution, version=version) + return template('templates/manpages/distribution.tpl', data=data, distribution=distribution, version=version) @bottle.get('/manpages///', name='manpages_package') def manpages_package(distribution, version, package): @@ -268,7 +152,7 @@ def manpages_package(distribution, version, package): ORDER BY ?filename ''') - return template('manpages_package.html', data=data, distribution=distribution, version=version, package=package) + return template('templates/manpages/package.tpl', data=data, distribution=distribution, version=version, package=package) @bottle.get('/manpages////.
.', name='manpages_page') def manpages_page(distribution, version, package, name, section, lang): @@ -325,7 +209,7 @@ def manpages_page(distribution, version, package, name, section, lang): data['@graph'][0]['mp:html'] = html - return template('manpage.html', data=data['@graph'][0], distribution=distribution, + return template('templates/manpages/manpage.tpl', data=data['@graph'][0], distribution=distribution, version=version, package=package, name=name, section=section, lang=lang) @bottle.get('/manpages/.
', name='manpages_disambiguation') @@ -351,43 +235,7 @@ def manpages_disambiguation(name, section): 'mp:source': {}, }) - return template('manpage_disambiguation.html', name=name, section=section, data=data) - -@bottle.get('/license/', name='license') -def license(id): - """ - """ - - license_iri = 'license:' + id - - data = query(Template( - ''' - PREFIX license: - - DESCRIBE $license - ''').substitute(license=license_iri)) - - return template('license.html', data=data) - -@bottle.get('/mimi_and_eunice', name='mimi_and_eunice') -def mimi_and_eunice(): - """ - """ - - data = query( - ''' - PREFIX mimi_eunice: - PREFIX xsd: - - SELECT ?number ?title - WHERE { - ?id mimi_eunice:title ?title . - BIND (SUBSTR(STR(?id), 22) as ?number) - } - ORDER BY ?number - ''') - - return template('mimi_and_eunice.html', data=data) + return template('templates/manpages/disambiguation.tpl', name=name, section=section, data=data) @bottle.get('/mimi_and_eunice/', name='mimi_and_eunice_strip') def mimi_and_eunice_strip(number): @@ -419,44 +267,25 @@ def mimi_and_eunice_strip(number): } }) - return template('mimi_and_eunice_strip.html', data=data['@graph'][0]) + return template('templates/mimi_and_eunice/strip.tpl', data=data['@graph'][0]) @bottle.get('/articles', name='articles') def articles(): """ """ - data = query( - ''' - PREFIX : + pages = [ page.stem for page in sorted(pathlib.Path('./pages').glob('*.html')) ] + pages.remove('.html') - SELECT ?iri ?title - WHERE { - ?iri :title ?title - } - ORDER BY ?title - ''') + return template('templates/articles.tpl', pages=pages) - return template('articles.html', data=data) - -@bottle.get('/', name='article') -def article(id): +@bottle.get('/', name='homepage') +@bottle.get('/', name='page') +def article(page=''): """ + Path for serving a "page". """ - data = query( - f''' - PREFIX : - - DESCRIBE - ''', - { - '@context': { - 'a': 'dokk:articles:' - } - }) - - if '@graph' not in data or len(data['@graph']) < 1: - bottle.abort(404, "Article doesn't exist.") + page += '.html' - return template('article.html', data=data['@graph'][0]) + return template(page) diff --git a/dokk.png b/dokk.png deleted file mode 100644 index 126555a..0000000 Binary files a/dokk.png and /dev/null differ diff --git a/dokk.svg b/dokk.svg index ccc56b4..c407dd0 100644 --- a/dokk.svg +++ b/dokk.svg @@ -306,8 +306,7 @@ y="-1.6478174" mask="url(#mask7616)" inkscape:export-xdpi="6.1399999" - inkscape:export-ydpi="6.1399999" - inkscape:export-filename="/home/zplus/zPlus/projects/dokk/dokk.org/website/dokk/static/dokk.png" /> + inkscape:export-ydpi="6.1399999" />

DOKK

-

- Articles

-

- Library

-

- Licenses

-

- Man pages

-

- Mimi & Eunice comic strips

+

- Articles

+

- Library

+

- Licenses

+

- Man pages

+

- Mimi & Eunice comic strips





diff --git a/pages/1984_ehf..html b/pages/1984_ehf..html new file mode 100644 index 0000000..7dbeb5c --- /dev/null +++ b/pages/1984_ehf..html @@ -0,0 +1,46 @@ +{% set title = "1984 ehf." %} +{% extends "templates/article.tpl" %} + +{% block article %} + +
+
+
+

1984 ehf. is a web hosting company established in 2006 in Reykjavík, Iceland +with the goal of offering hosting services that protect the civil and political +rights of their customers, such as the freedom of expression and the right to +anonymity and privacy[cit1]. The company uses exclusively renewable energy +from geothermal and hydropower sources, and it is committed to using free +software wherever possible.

+
+
+

1984 offers shared hosting, VPS hosting, and domain registration services.

+
+
+
+
+

See also

+
+
+ +
+
+
+
+

References

+
+
+ +
+
+
+ +{% endblock %} diff --git a/pages/Bottle_(web_framework).html b/pages/Bottle_(web_framework).html new file mode 100644 index 0000000..b4fd2ae --- /dev/null +++ b/pages/Bottle_(web_framework).html @@ -0,0 +1,56 @@ +{% set title = "Bottle" %} +{% extends "templates/article.tpl" %} + +{% block article %} + +
+
+
+

Bottle is a micro web-framework for Python released under the MIT +license. It is distributed as a single-file module compatible with Python 2.7 +and Python 3, and it has no dependencies other then the Python Standard +Library[cit1]. The core functionalities of the framework can be extended by +third-party plugins[cit2]. Bottle has support for both WSGI and CGI +interfaces[cit3]. It was started in 2009 by Marcel Hellkamp[cit4].

+
+
+
+
+

"Hello World"

+
+
+
+
from bottle import get, run, template
+
+@get ('/hello/<name>')
+def index (name):
+    return template ('<b>Hello {{name}}</b>!', name=name)
+
+run (host='localhost', port=8080)
+
+
+
+
+ + +{% endblock %} diff --git a/pages/DOKK.html b/pages/DOKK.html new file mode 100644 index 0000000..02e250d --- /dev/null +++ b/pages/DOKK.html @@ -0,0 +1,33 @@ +{% set title = "DOKK" %} +{% extends "templates/article.tpl" %} + +{% block article %} + +
+
+
+

DOKK is a collaborative, free database maintained by the +The Peers Community [cit1]. +The database uses a graph data model and is maintained as a collection of Turtle +files[cit2]. It includes both user-submitted data as well as data imported from +other sources.

+
+
+
+
+

References

+ +
+ +{% endblock %} diff --git a/pages/Dragora_(software).html b/pages/Dragora_(software).html new file mode 100644 index 0000000..446f803 --- /dev/null +++ b/pages/Dragora_(software).html @@ -0,0 +1,49 @@ +{% set title = "Dragora" %} +{% extends "templates/article.tpl" %} + +{% block article %} + +
+
+
+

Dragora is a free/libre, GNU/Linux distribution made from scratch. +Dragora respects the freedom of the user with the values of free software and +provides control to those who use it. Dragora is developed entirely by +volunteers and it is published under the terms of the +GNU General Public License [cit1].

+
+
+

Dragora also has received official recognition by the GNU Project and the +Free Software Foundation as a Free System Distribution[cit2].

+
+
+
+
+

See also

+
+ +
+
+ + +{% endblock %} diff --git a/pages/ForgeFed.html b/pages/ForgeFed.html new file mode 100644 index 0000000..e8240a9 --- /dev/null +++ b/pages/ForgeFed.html @@ -0,0 +1,44 @@ +{% set title = "ForgeFed" %} +{% extends "templates/article.tpl" %} + +{% block article %} + +
+
+
+

ForgeFed is an extension to the ActivityPub protocol that is currently under +development. The goal of the project is to provide a server-to-server API for +enabling federation across code management systems such as Gitea, Pagure, and +Vervis [cit1]. Development of ForgeFed is carried out +on its mailing list[cit2].

+
+
+

ForgeFed was initially called GitPub but it was later renamed to reflect +the broader scope of the project (which should embrace more than a single +VCS), as well as to avoid any violation of the Git trademark[cit3][cit4].

+
+
+
+ + +{% endblock %} diff --git a/pages/GNU_Hackers_Meeting.html b/pages/GNU_Hackers_Meeting.html new file mode 100644 index 0000000..e2e3ca7 --- /dev/null +++ b/pages/GNU_Hackers_Meeting.html @@ -0,0 +1,39 @@ +{% set title = "GNU Hackers' Meetings" %} +{% extends "templates/article.tpl" %} + +{% block article %} + +
+
+
+

The GNU Hackers' Meetings, or GHM, is an annual conference for people +interested in the GNU operating system. The conference promotes an informal +environment for developers and users of GNU to share experiences and exchange +opinions. It usually lasts for three days over which multiple presentations +are scheduled. Presentations are allowed to cover a wide range of subjects, +both technical and social, related to the GNU project or to the Free Software +movement as a whole. +Participation in the conference is subject to prior registration and to the +payment of a fee. A limited budget is available to assist those who cannot +otherwise afford to attend the conference.

+
+
+

The first GHM took place in Orense, Spain in 2007 and every year it is held +in a different location[cit1].

+
+
+
+
+

References

+ +
+ +{% endblock %} diff --git a/pages/Gitea_(software).html b/pages/Gitea_(software).html new file mode 100644 index 0000000..9bc46e7 --- /dev/null +++ b/pages/Gitea_(software).html @@ -0,0 +1,66 @@ +{% set title = "Gitea" %} +{% extends "templates/article.tpl" %} + +{% block article %} + +
+
+
+

Gitea ("Git with a cup of tea") is a web-based source-code management system +for Git repositories. It is written in Go and is released under the +MIT license. Gitea was started in 2015[cit1] as a +community-managed fork of Gogs in response to the +single-maintainer management model adopted by Gogs[cit2].

+
+
+
+
+

History

+
+
+

When the development of Gogs slowed down for a prolonged period of time in 2015 +driven by a lack of activity of the project administrator[cit3], some of its +contributors decided to fork the project to a new one called go-gitea. +Eventually, go-gitea was merged into Gogs once the administrator was back, and +further development of the fork stopped. One year later however, the situation +repeated and for this reason some of the Gogs contributors decided to continue +the work on go-gitea in order to promote a community approach with more than +one maintainer[cit2]. The fork was later renamed "Gitea".

+
+
+
+
+

See also

+
+
+ +
+
+
+ + +{% endblock %} diff --git a/pages/Gogs_(software).html b/pages/Gogs_(software).html new file mode 100644 index 0000000..fde025d --- /dev/null +++ b/pages/Gogs_(software).html @@ -0,0 +1,82 @@ +{% set title = "Gogs" %} +{% extends "templates/article.tpl" %} + +{% block article %} + +
+
+
+

Gogs ("Go Git Service") is a web-based source-code management system for Git +repositories. It was initiated in February, 2014[cit1] by Jiahua Chen (also +known as unknwon[cit2]) and Lunny Xiao (also known as lunny[cit3]) with +the goal of building a free, self-hostable clone of GitHub[cit4]. +It is written in Go and is released under the MIT license.

+
+
+
+
+

Controversy and Gitea fork

+
+
+

The development of Gogs slowed down in 2015 and Jiahua, the sole person with +write access to the Gogs repository, stopped merging pull requests. This +prolonged inactivity sparked doubts about the future of the project[cit5][cit6] +and culminated with the creation of a fork called go-gitea. When Jiahua was +back, however, go-gitea was merged to Gogs and the development of the fork +stopped. One year later, in 2016, the situation repeated. For this reason some +of the Gogs contributors who grew frustrated with the management of the project[cit7] +decided to continue the work on go-gitea[cit8]. The fork was later renamed +Gitea.

+
+
+
+
+

See also

+
+
+ +
+
+
+ + +{% endblock %} diff --git a/pages/Header_Dictionary_Triples.html b/pages/Header_Dictionary_Triples.html new file mode 100644 index 0000000..8ffed5e --- /dev/null +++ b/pages/Header_Dictionary_Triples.html @@ -0,0 +1,73 @@ +{% set title = "Header Dictionary Triples" %} +{% extends "templates/article.tpl" %} + +{% block article %} + +
+
+
+

Header Dictionary Triples, or HDT, is a binary serialization format for RDF +datasets. It is capable of compressing RDF data while maintaining search and +browse operations without prior decompression[cit1]. HDT is an open format in +progress of standardization[cit2].

+
+
+
+
+

HDT tools

+
+
+
    +
  • +

    hdt-cpp is a library and command-line tool to create and search HDT files[cit3]

    +
  • +
  • +

    hdt-java allows integration of HDT with Apache Jena and Fuseki[cit4]

    +
  • +
  • +

    HDT-it! is a GUI application for browsing HDT files, which includes a 3D +Visualization of the RDF adjacency matrix of the RDF Graph[cit:5]

    +
  • +
+
+
+
+
+ +
+
+
+ +
+
+
+

HDT-it! +HDT-it!

+
+
+
+ + +{% endblock %} diff --git a/pages/Minifree_Ltd.html b/pages/Minifree_Ltd.html new file mode 100644 index 0000000..f84032d --- /dev/null +++ b/pages/Minifree_Ltd.html @@ -0,0 +1,60 @@ +{% set title = "Minifree Ltd" %} +{% extends "templates/article.tpl" %} + +{% block article %} + +
+
+
+

Minifree Ltd (formerly trading as Gluglug) is a supplier from Essex, UK that +sells computers with only free software, including the Libreboot BIOS and +GNU/Linux operating systems certified by the Free Software Foundation under the +Respects Your Freedom certification program. The company was founded by Leah +Rowe, who is also the founder of Libreboot. Profits from Minifree +sales are used to fund the development of the Libreboot project[cit2].

+
+
+

The word "Minifree" is a pun based on the ministries in the George Orwell’s 1984 +novel[cit1].

+
+
+
+
+ +
+
+

Libreboot T400 +Libreboot X200 +Libreboot X200 Tablet

+
+
+
+
+

See also

+
+ +
+
+
+

References

+
+ +
+
+ +{% endblock %} diff --git a/pages/NotABug.org.html b/pages/NotABug.org.html new file mode 100644 index 0000000..89db878 --- /dev/null +++ b/pages/NotABug.org.html @@ -0,0 +1,49 @@ +{% set title = "NotABug.org" %} +{% extends "templates/article.tpl" %} + +{% block article %} + +
+
+
+

NotABug.org is a web-based hosting service for version control using Git, +based on the Gogs code collaboration platform. While +registration is open to everyone, only those projects that meet the +Free Software or the Free Culture definition are accepted on the +website[cit1]. NotABug was started in 2015 by The Peers Community [cit2] +and is administered by Hein-Pieter van Braam-Stewart[cit3].

+
+
+
+
+

See also

+
+ +
+
+ + +{% endblock %} diff --git a/pages/The_Peers_Community.html b/pages/The_Peers_Community.html new file mode 100644 index 0000000..2ee2793 --- /dev/null +++ b/pages/The_Peers_Community.html @@ -0,0 +1,54 @@ +{% set title = "The Peers Community" %} +{% extends "templates/article.tpl" %} + +{% block article %} + +
+
+
+

The Peers Community is a community of people that collaborate on supporting +free culture and free software development[cit2].

+
+
+
+
+

Projects Jam

+
+
+

The Jam is a weekly meeting that takes place on the community IRC channel +on Fridays at 19:00Z-21:00Z. Participants can ask for help on any issue related +to free culture and free software projects, and the community works to fix them. +The first session took place on March, 2nd 2018[cit1], initiated by vaeringjar.

+
+
+
+
+ +
+
+
Presentation by Jorge Maldonado Ventura at the GHM 2017
+
+ +
+
+
+
+ + +{% endblock %} diff --git a/pages/TuxFamily.html b/pages/TuxFamily.html new file mode 100644 index 0000000..5ea96d0 --- /dev/null +++ b/pages/TuxFamily.html @@ -0,0 +1,77 @@ +{% set title = "TuxFamily" %} +{% extends "templates/article.tpl" %} + +{% block article %} + +
+
+
+

TuxFamily is a French non-profit organization founded in 2004[cit1] that +provides free hosting for projects adhering to the free software philosophy[cit2]. +TuxFamily’s hosting facilities are controlled with +VHFFS, a software developed +by TuxFamily members that allows administrators to accept or refuse services +requested by users via a web interface[cit3]. As of 2018 TuxFamily hosts more +than 2700 projects[cit2].

+
+
+
+
+

Services

+
+
+

TuxFamily makes these services available to free projects:

+
+
+
    +
  • +

    Web hosting (PHP5 or Python[cit4])

    +
  • +
  • +

    MySQL and PostgreSQL databases

    +
  • +
  • +

    CVS, Subversion, Mercurial, and GIT repositories hosting

    +
  • +
  • +

    Manage domain names (DNS hosting)

    +
  • +
  • +

    Email accounts (reachable over POP, IMAP or webmails)

    +
  • +
  • +

    Mailing lists

    +
  • +
  • +

    Download area of 1GB

    +
  • +
  • +

    200MB quota for all groups, not including the download area

    +
  • +
+
+
+
+ + +{% endblock %} diff --git a/pages/Vervis_(software).html b/pages/Vervis_(software).html new file mode 100644 index 0000000..9345f52 --- /dev/null +++ b/pages/Vervis_(software).html @@ -0,0 +1,42 @@ +{% set title = "Vervis" %} +{% extends "templates/article.tpl" %} + +{% block article %} + +
+
+
+

Vervis is a web-based project management system that is still under +development. It is written in Haskell with the Yesod web framework and is +released under the AGPLv3 license. It features +support for Git and Darcs, and is expected to support ForgeFed +[cit1].

+
+
+
+
+

See also

+
+ +
+
+
+

References

+
+
+ +
+
+
+ +{% endblock %} diff --git a/pages/Vikings_GmbH.html b/pages/Vikings_GmbH.html new file mode 100644 index 0000000..0a0b103 --- /dev/null +++ b/pages/Vikings_GmbH.html @@ -0,0 +1,41 @@ +{% set title = "Vikings GmbH" %} +{% extends "templates/article.tpl" %} + +{% block article %} + +
+
+
+

Vikings GmbH is a hosting provider located in Eschborn, Germany which +specializes in free/libre hosting services. It offers Virtual Servers, +Dedicated Servers, and Manged Server based exclusively on free software. The +company was founded by Thomas Umbach[cit1].

+
+
+
+
+

See also

+
+
+ +
+
+
+
+

References

+ +
+ +{% endblock %} diff --git a/pages/archive-webextension.html b/pages/archive-webextension.html new file mode 100644 index 0000000..7d5ab76 --- /dev/null +++ b/pages/archive-webextension.html @@ -0,0 +1,11 @@ +{% set title = "archive-webextension" %} +{% extends "templates/article.tpl" %} + +{% block article %} + +
+

archive-webextension is a WebExtension for saving web pages to the Internet +Archive. It’s developed by The Peers Community.

+
+ +{% endblock %} diff --git a/pages/freepost_(software).html b/pages/freepost_(software).html new file mode 100644 index 0000000..5d389b5 --- /dev/null +++ b/pages/freepost_(software).html @@ -0,0 +1,56 @@ +{% set title = "freepost" %} +{% extends "templates/article.tpl" %} + +{% block article %} + +
+
+
+

freepost is a web-based discussion board developed by +The Peers Community, where users can submit links +and text posts that other users can vote and discuss. An instance of freepost +is hosted on TuxFamily and accessible at https://freepo.st.

+
+
+

It is one of the early projects developed by the community[cit1].

+
+
+
+
+

Development

+
+
+

The software was initially developed with the Symfony PHP framework[cit2][cit3], +but it was later rewritten in plain PHP[cit4][cit5]. In 2018 it was rewritten +again from scratch using the Bottle web framework, +thus changing the code base from PHP to Python^Add +references^.

+
+
+
+ + +{% endblock %} diff --git a/pages/lib.reviews.html b/pages/lib.reviews.html new file mode 100644 index 0000000..e6f58bd --- /dev/null +++ b/pages/lib.reviews.html @@ -0,0 +1,73 @@ +{% set title = "lib.reviews" %} +{% extends "templates/article.tpl" %} + +{% block article %} + +
+
+
+

lib.reviews is a web-based platform for writing reviews about anything. It +was started in 2016 by Erik Moeller with the goal of creating a free and open +platform focusing on high quality, trustworthy reviews available under free +licenses[cit1]. As of August 2018 the database contains more than 800 +reviews[cit2]. Registration to the website is not open, and requires an +invitation from other users.

+
+
+
+
+

Teams

+
+
+

Users of the platform can organize their work by joining thematic groups called +"teams"[cit3]. Each team focus on reviewing a particular category of things. +Some examples are the "F-droid reviews" team for reviewing apps on the f-droid +app store, the "Esperanto" team for writing reviews in the Esperanto language, +and the "Gamebooks" team for reviewing anything related to gamebooks.

+
+
+
+
+ +
+
+
+ +
+
+
+
+
+

See Also

+
+ +
+
+ + +{% endblock %} diff --git a/templates/library.html b/pages/library.html similarity index 58% rename from templates/library.html rename to pages/library.html index 5041e9e..716b803 100644 --- a/templates/library.html +++ b/pages/library.html @@ -1,7 +1,44 @@ -{% extends "base.html" %} +{% extends "templates/base.tpl" %} {% block title %}Library{% endblock %} +{% set data = query(""" + PREFIX library: + PREFIX license: + + CONSTRUCT { + ?item library:title ?title; + library:author ?author ; + library:license ?license . + ?license license:id ?license_id ; + license:name ?license_name . + } + WHERE { + ?item library:title ?title ; + library:author ?author ; + library:license ?license . + + OPTIONAL { + ?license license:id ?license_id_optional ; + license:name ?license_name_optional . + } + + BIND(COALESCE(?license_id_optional, SUBSTR(STR(?license), 14)) AS ?license_id) + BIND(COALESCE(?license_name_optional, SUBSTR(STR(?license), 14)) AS ?license_name) + } + ORDER BY UCASE(?title) + """, + { + '@context': { + 'library': 'dokk:library:', + 'license': 'dokk:license:', + 'library:author': { '@container': '@set' }, + 'library:license': { '@container': '@set' } + }, + 'library:title': {} + }) +%} + {% block body %}
diff --git a/templates/licenses.html b/pages/license.html similarity index 68% rename from templates/licenses.html rename to pages/license.html index d0f8ec3..01bb8dc 100644 --- a/templates/licenses.html +++ b/pages/license.html @@ -1,4 +1,16 @@ -{% extends "base.html" %} +{% extends "templates/base.tpl" %} + +{% set data = query(""" + PREFIX license: + + SELECT * + WHERE { + ?license license:id ?id ; + license:name ?name. + } + ORDER BY ASC(UCASE(?name)) + """) +%} {% block title %}Licenses{% endblock %} diff --git a/templates/manpages.html b/pages/manpages.html similarity index 71% rename from templates/manpages.html rename to pages/manpages.html index f5c5fe6..72c9b2a 100644 --- a/templates/manpages.html +++ b/pages/manpages.html @@ -1,4 +1,18 @@ -{% extends "base.html" %} +{% extends "templates/base.tpl" %} + +{% set data = query(""" + PREFIX mp: + + SELECT DISTINCT ?distribution ?version + WHERE { + [] mp:source [ + mp:distribution_version ?version ; + mp:distribution_name ?distribution ; + ] . + } + ORDER BY ?distribution ?version + """) +%} {% block title %}man pages{% endblock %} @@ -7,7 +21,7 @@
- DOKK / + DOKK / manpages
diff --git a/templates/mimi_and_eunice.html b/pages/mimi_and_eunice.html similarity index 64% rename from templates/mimi_and_eunice.html rename to pages/mimi_and_eunice.html index 04144e8..d8c19b8 100644 --- a/templates/mimi_and_eunice.html +++ b/pages/mimi_and_eunice.html @@ -1,4 +1,17 @@ -{% extends "base.html" %} +{% extends "templates/base.tpl" %} + +{% set data = query(""" + PREFIX mimi_eunice: + PREFIX xsd: + + SELECT ?number ?title + WHERE { + ?id mimi_eunice:title ?title . + BIND (SUBSTR(STR(?id), 22) as ?number) + } + ORDER BY ?number + """) +%} {% block title %}Mimi & Eunice{% endblock %} diff --git a/pages/radio-browser.info.html b/pages/radio-browser.info.html new file mode 100644 index 0000000..9876ecf --- /dev/null +++ b/pages/radio-browser.info.html @@ -0,0 +1,30 @@ +{% set title = "radio-browser.info" %} +{% extends "templates/article.tpl" %} + +{% block article %} + +
+
+
+

radio-browser.info is a website that collects information about Internet +radio stations. All the data is released in the public domain. As of August, +2018 the database contains more than 20,000 radio stations and is integrated +into more than 20 projects, including RadioDroid, InternetRadio, +and NextCloud[cit1].

+
+
+
+
+

References

+
+ +
+
+ +{% endblock %} diff --git a/templates/article.html b/pages/templates/article.tpl similarity index 60% rename from templates/article.html rename to pages/templates/article.tpl index 220af04..cba9e2a 100644 --- a/templates/article.html +++ b/pages/templates/article.tpl @@ -1,6 +1,6 @@ -{% extends "base.html" %} +{% extends "templates/base.tpl" %} -{% block title %}{{ data["a:title"] }}{% endblock %} +{% block title %}{{ title }}{% endblock %} {% block stylesheets %} {% endblock %} @@ -10,14 +10,12 @@
- DOKK / - articles / - {{ data["a:title"] }} + DOKK
-

{{ data["a:title"] }}

+

{{ title }}

- {{ data["a:html"]|safe }} + {% block article %}{% endblock %}
diff --git a/templates/articles.html b/pages/templates/articles.tpl similarity index 70% rename from templates/articles.html rename to pages/templates/articles.tpl index 7d2e94d..33ef12f 100644 --- a/templates/articles.html +++ b/pages/templates/articles.tpl @@ -1,4 +1,8 @@ -{% extends "base.html" %} +{# This is an old page that listed articles and should be removed + because unused +#} + +{% extends "templates/base.tpl" %} {% block title %}Articles{% endblock %} @@ -11,9 +15,9 @@ articles
- {% for article in data["results"]["bindings"] %} + {% for page in pages %}

- {{ article['title']['value'] }} + {{ page }}

{% endfor %}
diff --git a/templates/base.html b/pages/templates/base.tpl similarity index 84% rename from templates/base.html rename to pages/templates/base.tpl index 84dc0eb..fe0f782 100644 --- a/templates/base.html +++ b/pages/templates/base.tpl @@ -1,3 +1,7 @@ +{# This is the "base" HTML that every other page is supposed to extend. It contains + the basic HTML structure of a page. +#} + diff --git a/templates/library_item.html b/pages/templates/library/item.tpl similarity index 59% rename from templates/library_item.html rename to pages/templates/library/item.tpl index 6e83ed6..6fe7f13 100644 --- a/templates/library_item.html +++ b/pages/templates/library/item.tpl @@ -1,4 +1,45 @@ -{% extends "base.html" %} +{% extends "templates/base.tpl" %} + +{% set data = query(""" + PREFIX library: + PREFIX license: + + CONSTRUCT { + ?item library:title ?title ; + library:author ?author ; + library:license ?license . + + ?license license:id ?license_id ; + license:name ?license_name . + } + WHERE { + ?item + library:title ?title ; + library:author ?author ; + library:license ?license . + + FILTER (?item = ) + + OPTIONAL { + ?license license:id ?license_id_optional ; + license:name ?license_name_optional . + } + + BIND(COALESCE(?license_id_optional, SUBSTR(STR(?license), 14)) AS ?license_id) + BIND(COALESCE(?license_name_optional, SUBSTR(STR(?license), 14)) AS ?license_name) + } + """, + { + "@context": { + "library": "dokk:library:", + "license": "dokk:license:", + "library:author": { "@container": "@set" }, + "library:license": { "@container": "@set" } + }, + "library:title": {} + } + )["@graph"][0] +%} {% block title %}{{ data['library:title'] }}{% endblock %} @@ -6,7 +47,7 @@
diff --git a/templates/license.html b/pages/templates/license/license.tpl similarity index 82% rename from templates/license.html rename to pages/templates/license/license.tpl index 915978d..228e9d2 100644 --- a/templates/license.html +++ b/pages/templates/license/license.tpl @@ -1,4 +1,11 @@ -{% extends "base.html" %} +{% extends "templates/base.tpl" %} + +{% set data = query(""" + PREFIX license: + + DESCRIBE license:""" + license_id + """ + """) +%} {% block title %}{{ data['license:name'] }}{% endblock %} diff --git a/templates/manpage_disambiguation.html b/pages/templates/manpages/disambiguation.tpl similarity index 87% rename from templates/manpage_disambiguation.html rename to pages/templates/manpages/disambiguation.tpl index 5dfde0b..5c046ff 100644 --- a/templates/manpage_disambiguation.html +++ b/pages/templates/manpages/disambiguation.tpl @@ -1,4 +1,4 @@ -{% extends "base.html" %} +{% extends "templates/base.tpl" %} {% block title %}Man pages named {{ name }} in section {{ section }}{% endblock %} @@ -7,8 +7,8 @@
- DOKK / - manpages + DOKK / + manpages

@@ -20,7 +20,7 @@ {% for page in data["@graph"] %} - + {{ page['mp:source']['mp:filename'] }} diff --git a/templates/manpages_distribution.html b/pages/templates/manpages/distribution.tpl similarity index 85% rename from templates/manpages_distribution.html rename to pages/templates/manpages/distribution.tpl index 61bd30e..a5c36df 100644 --- a/templates/manpages_distribution.html +++ b/pages/templates/manpages/distribution.tpl @@ -1,4 +1,4 @@ -{% extends "base.html" %} +{% extends "templates/base.tpl" %} {% block title %}{{ distribution }} {{ version }} man pages{% endblock %} @@ -7,8 +7,8 @@

- DOKK / - manpages / + DOKK / + manpages / {{ distribution }} {{ version }}
diff --git a/templates/manpage.html b/pages/templates/manpages/manpage.tpl similarity index 84% rename from templates/manpage.html rename to pages/templates/manpages/manpage.tpl index 3545d06..cbbff47 100644 --- a/templates/manpage.html +++ b/pages/templates/manpages/manpage.tpl @@ -1,4 +1,4 @@ -{% extends "base.html" %} +{% extends "templates/base.tpl" %} {% block title %}{{ data['mp:name'] }}({{ data['mp:section'] }}){% endblock %} {% block stylesheets %} @@ -10,8 +10,8 @@
- DOKK / - manpages / + DOKK / + manpages / {{ distribution }} {{ version }} / {{ package }} / {{ data["mp:source"]["mp:filename"] }} diff --git a/templates/manpages_package.html b/pages/templates/manpages/package.tpl similarity index 86% rename from templates/manpages_package.html rename to pages/templates/manpages/package.tpl index 1dc761d..1988e36 100644 --- a/templates/manpages_package.html +++ b/pages/templates/manpages/package.tpl @@ -1,4 +1,4 @@ -{% extends "base.html" %} +{% extends "templates/base.tpl" %} {% block title %}{{ package }} ({{ distribution }} {{ version }}) man pages{% endblock %} @@ -7,8 +7,8 @@
- DOKK / - manpages / + DOKK / + manpages / {{ distribution }} {{ version }} / {{ package }}
diff --git a/templates/mimi_and_eunice_strip.html b/pages/templates/mimi_and_eunice/strip.tpl similarity index 96% rename from templates/mimi_and_eunice_strip.html rename to pages/templates/mimi_and_eunice/strip.tpl index 7aeccd0..ce8d9c9 100644 --- a/templates/mimi_and_eunice_strip.html +++ b/pages/templates/mimi_and_eunice/strip.tpl @@ -1,4 +1,4 @@ -{% extends "base.html" %} +{% extends "templates/base.tpl" %} {% block title %}Mimi&Eunice {{ data['@id'][12:] }}: {{ data['mimi_eunice:title'] }}{% endblock %} diff --git a/pages/virtual_hosting_platform_for_free_software.html b/pages/virtual_hosting_platform_for_free_software.html new file mode 100644 index 0000000..4acd30a --- /dev/null +++ b/pages/virtual_hosting_platform_for_free_software.html @@ -0,0 +1,31 @@ +{% set title = "Virtual Hosting platform For Free Software" %} +{% extends "templates/article.tpl" %} + +{% block article %} + +
+
+
+

Virtual Hosting platform For Free Software, or VHFFS, is a free software +platform developed by TuxFamily for managing the organization’s +servers and users services. It provides a web interface for users to request +services, and a moderation system for administrators to accept or refuse +services creation. The project was started in 1999 by the TuxFamily +administrator team[cit1].

+
+
+
+
+

References

+
+
+ +
+
+
+ +{% endblock %}