Did you know ... | Search Documentation: |
Title for pldoc(dir_index) |
This repository contains the software of http://www.swi-prolog.org. The (wiki) content of the website and required add-ons are stored in git submodules. These must be installed separately using the command below. To install the site from scratch locally, perform the following commands:
% git clone https://github.com/SWI-Prolog/plweb.git % cd plweb % git submodule update --init
<dl> <dt>annotations.db</dt> <dd>Comments on web pages</dd> <dt>tags.db</dt> <dd>Tags on web pages</dd> <dt>openid.db</dt> <dd>User administration</dd> <dt>packs.db</dt> <dd>Known packages</dd> <dt>post.db</dt> <dd>News posts</dd> <dt>reviews.db</dt> <dd>Pack reviews</dd> <dt>download</dt> <dd>Points to the download directory</dd> </dl>
Install the download descriptions by running the script install-custom
% mkdir log pack % chgrp www-data log pack % chmod g+ws log pack
After installation, the website may be started locally using the commands below. After that, you have access to the same content as available from https://www.swi-prolog.org, except for the download section of the website. The default port of the site is 3040, and therefore it may be accessed on http://localhost:3040/
% swipl -l load.pl ?- server.
A good way to run the website on a Linux server is by creating a Linux
container using lxc. After installing the server, you can enable it to
start at boot time by copying upstart/swi-prolog.conf
to `/etc/init`
after editing it to suit your configuration requirements. By default,
the server runs as user www-data
, group www-data
as specified in the
above configuration file.
Make sure the following components are writeable to the server process. For files, this means mode 664, group www-data. For directories, this means mode 2775, group www-data.
% git checkout master % git pull % git checkout -b wiki % find . -type d | xargs chmod 2775 % find . -name '*.txt' | xargs chmod 664 % chgrp -W www-data .
?- set_setting(recaptcha:public_key, 'public key goes here'). ?- set_setting(recaptcha:private_key, 'private key goes here'). ?- save_settings.
annotation.pl -- Annotation | ||
---|---|---|
annotation/3 | Show annotations for Object. | |
api.pl | ||
autocomplete.pl -- SWI-Prolog website autocompletion support | ||
blog.pl | ||
changelog.pl | ||
customise.pl | ||
daemon.pl | ||
did_you_know.pl -- Interesting snippets about SWI-Prolog | ||
did_you_know/2 | Generate a DYK fragment. | |
did_you_know_script/3 | Emit script to fetch DYK through AJAX. | |
download.pl | ||
examples.pl | ||
ex_xref/3 | ||
index_examples/0 | Update the example index. | |
reindex_examples/0 | Update the example index. | |
fastly.pl -- Purge pages on our CDN | ||
purge_location/1 | Send a purge request for a Fastly URL. | |
footer.pl -- Footer | ||
footer/3 | Emit the footer, which contains the community content, server address and user information. | |
server_information/2 | Emit server information. | |
forum.pl | ||
generics.pl -- Generics | ||
is_empty/1 | ||
request_to_id/3 | True when Request is a request to the post service for the given Kind and Id. | |
uri_query_add/4 | Inserts the given name-value pair as a query component into the given URI. | |
wiki_file_codes_to_dom/3 | DOM is the HTML dom representation for Codes that originate from File. | |
git_html.pl | ||
git_commit_info/5 | Component to show an individual commit. | |
git_shortlog/4 | Component that show the top-N most recent changes in Pack. | |
gitweb.pl -- Provide gitweb support | ||
holidays.pl | ||
todays_holiday/1 | succeeds if Holiday is 'todays holiday'. | |
http_cgi.pl -- Run CGI scripts from the SWI-Prolog web-server | ||
http_cgi_handler/2 | Locate a CGI script in the file-search-path Alias from the path_info in Request and execute the script using http_run_cgi/3. | |
http_run_cgi/3 | Execute the given CGI script. | |
load.pl | ||
make.pl | ||
markdown.pl -- Parse markdown documents into a DOM | ||
markdown_dom/2 | Process markdown input into an HTML DOM structure compatible to load_structure/3 and html//1 as provided by library(http/html_write). | |
markitup.pl -- Wrapper for markItUp ajax markup editor | ||
markitup/3 | Insert a textarea with markItUp support. | |
messages.pl -- Run goals that produce messages | ||
call_showing_messages/2 | Execute Goal, showing the feedback in the browser. | |
news.pl -- News on the SWI-Prolog Web site | ||
random_news/2 | Emit a random news item for the Did You Know place of the page. | |
notify.pl -- Send notications by E-mail | ||
msg_user/3 | Plain-text reference to a user with hyperlink. | |
notify/2 | Notify watching users by mail of the event on Object, described by Term. | |
object_support.pl -- Object support | ||
object_id/2 | True when Id is a (hash) id for Object. | |
object_label/2 | True when Label is a label for Object. | |
openid.pl -- Handle users of the SWI-Prolog website | ||
create_user/1 | Create a new user for the given Google Profile. | |
login_existing_user/1 | True if the user is know to us and thus we can perform the login without further interaction. | |
authenticate/3 | Get authentication for editing wiki pages. | |
current_user/2 | ||
grant/2 | Grant/revoke User (a UUID) the right to access Token. | |
login_link/3 | Create a link to login, which returns to the current page. | |
redirect_master/1 | Redirect a request to the master server, so we do not have to deal with multiple versions of the database files. | |
revoke/2 | Grant/revoke User (a UUID) the right to access Token. | |
site_user/2 | Demand the user to be logged on and, if this is the first logon, verify the user and create a profile. | |
site_user_logged_in/1 | True when User is logged on. | |
user_profile_link/3 | Create a link to the profile of a user. | |
xrds_specified_location/2 | Hacks to deal with broken Yadis support. | |
pack.pl | ||
current_pack/2 | True when Pack is a pack that satisfies Filter. | |
hash_file_url/2 | True when SHA1 was installed using GIT from GitURL. | |
hash_git_url/2 | True when SHA1 was installed using GIT from GitURL. | |
pack/1 | True when Pack is a currently known pack. | |
pack_table/4 | Show a table of packs. | |
pack_url_hash/2 | True when Hash is the registered hash for URL. | |
pack_version_hashes/2 | True when HashesByVersion is an ordered list Version-Hashes, latest version first. | |
sort_packs/3 | ||
pack_analyzer.pl -- Analyse the content of a Prolog pack | ||
pack_analysis/2 | Result is the analysis result for Pack. | |
pack_members/2 | Members is a list of file(File,Size) that represent the files in Pack. | |
pack_open_entry/3 | Open an entry in the Pack for reading. | |
xref_pack/1 | Run the cross-referencer on all Prolog files inside pack. | |
xref_pack_file/2 | Run the cross-referencer on File inside Pack. | |
xref_open_source/2 | If Id refers to a known Prolog pack, open the pack entry. | |
xref_source_file/3 | ||
xref_source_identifier/2 | ||
pack_info.pl -- Visual (web) components that show info about packs | ||
clean_pack_info/1 | Remove the collected info for Pack. | |
pack_file_details/3 | Reply with an web-page with details on File in Pack. | |
pack_file_hierarchy/3 | Create a ul for all files that appear in the pack. | |
pack_readme/3 | Insert readme information if provided. | |
update_pack_metadata/0 | Destroy and recompute all pack meta-data. | |
update_pack_metadata_in_background/0 | Destroy and recompute all pack meta-data. | |
pack_mirror.pl -- Mirror pack archives | ||
pack_mirror/3 | Try to mirror the latest version of Pack into File. | |
pack_mirror_directory/1 | True when Dir is the absolute file name for the mirrors. | |
pack_unmirror/1 | Delete all mirrors we have for Pack. | |
ssl_verify/5 | Currently we accept all certificates. | |
page.pl | ||
github_actions/3 | Emit the github star and sponsor buttons. | |
doc_page_header/4 | Called to render the PlDoc page header and link menu. | |
body/4 | Provide the page skin. | |
parms.pl | ||
server/2 | Describe known servers and their role. | |
server/3 | Describe known servers and their role. | |
plweb.pl -- Server for PlDoc wiki pages and SWI-Prolog website | ||
doc_directory/1 | Enable editing of wiki documents from the www directory. | |
post.pl -- Posts | ||
add_post_link/4 | Emit HTML that allows for adding a new post. | |
all/1 | News filter, returning all objects. | |
find_posts/3 | True when Ids is a list of all posts of Kind for which call(CheckId, Id) is true. | |
fresh/1 | True if post Id is considered fresh. | |
post/3 | True if Post have Value for the given attribute. | |
post/4 | Generate HTML for apost. | |
post_process/2 | HTTP handler that implements a REST interface for postings. | |
posts/6 | Generate HTML for a list of posts and add a link to add new posts. | |
relevance/2 |
| |
user_post_count/3 | True when Count is the number of posts of Kind created by User. | |
user_posts/4 | Show posts from a specific user of the specified Kind. | |
user_vote_count/3 | Number of votes issued by this user. | |
proxy.pl | ||
proxy/2 | Proxy a request to a remote server. | |
proxy/3 | Proxy a request to a remote server. | |
rating.pl -- Provide a star-rating widget | ||
register.pl | ||
review.pl -- Handle rating and reviewing of packages | ||
pack_comment_count/2 | True when Count is the number of comments for Pack. | |
pack_rating_votes/3 | Rating is the current rating for Pack, based on Votes. | |
pack_reviews/3 | Show reviews for Pack. | |
profile_reviews/3 | Create a h2 section with all reviews by a given OpenID. | |
show_pack_rating/3 | Show overall rating. | |
show_pack_rating/7 | Show rating for Pack. | |
user_review_count/2 | True when Count is the number of reviews by UUID. | |
stats.pl -- Server statistics components | ||
http_server_pool_table/2 | Display table with statistics on thread-pools. | |
http_server_statistics/2 | HTML component showing statistics on the HTTP server. | |
http_session_table/2 | HTML component that writes a table of currently logged on users. | |
tagit.pl | ||
ac_object/3 | Provide additional autocompletion matches on tags,. | |
tagit_footer/4 | Show tagit widget for adding and deleting tags. | |
user_tags/4 | Show all tags created by a given user. | |
test_recaptcha.pl | ||
tests.pl | ||
update.pl | ||
db_sync_thread/1 | Sync the persistency database every Time seconds. | |
watchdog.pl | ||
wiki.pl | ||
extract_title/3 | Extract the title from a wiki page. | |
file/4 | Trap translation of \file(+Path, Options) . | |
include/5 | ||
index_wiki_pages/0 | Create a (title) index of the available wiki pages. | |
safe_file_name/1 | True when Name is a file without references to parent directories. | |
title_text/2 | Turn the title, represented as an argument to html//1 into a plain string. | |
update_wiki_page_title/1 | Update the cached information about a wiki file. | |
wiki_file_to_dom/2 | DOM is the HTML dom representation for the content of File. | |
wiki_page_title/2 | True when Title is the title of the wiki page at Location. | |
wiki_edit.pl -- Edit PlDoc wiki pages | ||
edit_button/3 | Present a button for editing the web-page. | |
location_wiki_file/2 | ||
location_wiki_file/3 |