A CMS/blog framework for SWI-Prolog.

![Build Status](


Getting started

Visit for the further info.


The MIT license. See the LICENSE file.

Prolog files

pack.plShow source
prolog/bc/bc_access.plShow source
prolog/bc/bc_admin.plShow source
prolog/bc/  -- Top-level API module */Show source
prolog/bc/  -- Access to the current API user */Show source
bc_actor/1Retrieves the current API user.Source
bc_set_actor/1Sets thread-local for the current user.Source
bc_unset_actor/0Unsets the author thread-local.Source
prolog/bc/bc_api_auth.plShow source
bc_auth/1Pre-action for handlers that need the user to be authenticated.Source
prolog/bc/bc_api_comment.plShow source
prolog/bc/  -- HTTP handlers for config entry management */Show source
prolog/bc/  -- HTTP handlers for managing posts */Show source
prolog/bc/bc_api_error.plShow source
bc_call_handle_error/1Calls handler through error cather that produces JSON reply on recognized errors.Source
bc_handle_error/1Handles known errors and produces approriate API response.Source
prolog/bc/  -- HTTP handlers for file managementShow source
prolog/bc/bc_api_io.plShow source
bc_read_by_schema/2Reads dict from JSON request and validates it against the schema.Source
bc_reply_error/1Sends error JSON response with Message.Source
bc_reply_success/1Sends JSON response with Data and success status.Source
prolog/bc/  -- HTTP handlers for mail system */Show source
prolog/bc/  -- Role API handlers */Show source
prolog/bc/  -- Search API handlers */Show source
prolog/bc/  -- Similarity API handlers */Show source
prolog/bc/  -- Tag API handlers */Show source
prolog/bc/  -- Type API handlers */Show source
prolog/bc/  -- User management API handlers */Show source
prolog/bc/  -- Client-side cache bustingShow source
bc_bust_token/1Retrieves the token for cache busting.Source
prolog/bc/bc_comment.plShow source
prolog/bc/  -- Handles comment formatting */Show source
bc_format_comment/2Formats the comment message by running it through the span-level Markdown formatter.Source
prolog/bc/bc_comment_mention.plShow source
bc_mentions_parse/3Parses mentions in content.Source
prolog/bc/bc_comment_notify.plShow source
bc_comment_notify/1Sends comment notifications.Source
prolog/bc/  -- Handles human check for comments */Show source
bc_random_question/2Picks random question for human testing.Source
prolog/bc/  -- Builds comment tree from reply-to structure */Show source
bc_build_comment_tree/2Builds comments tree from the flat list of comments.Source
prolog/bc/bc_data.plShow source
bc_data_close/0Closes the docstore database.Source
bc_data_open/1Opens the docstore database file.Source
prolog/bc/  -- Handles post comments */Show source
bc_comment_remove/3Removes the given comment.Source
bc_comment_save/3Saves a new comment.Source
bc_comment_tree/2Retrieves the tree of comments for the post.Source
prolog/bc/bc_data_config.plShow source
bc_config_dict/1Retrieves dict containing all config entries.Source
bc_config_get/2Retrieves the configuration entry.Source
bc_config_list/2Retrieves the list of all config values.Source
bc_config_set/2Sets the configuration value.Source
bc_config_set_api/3Same as bc_config_set/2 but checks that the current API user is an admin.Source
bc_config_set_list_api/2Same as bc_config_set_api/2 but takes a list of configuration entries.Source
prolog/bc/  -- Handles entry data */Show source
bc_entry/3Retrieves a single entry by its Id.Source
bc_entry_info/3Retrieves a single entry by its Id.Source
bc_entry_list/3Retrieves the list of entries of certain type.Source
bc_entry_remove/2Removes the given entry and its comments.Source
bc_entry_remove_trash/2Removes entry from trash.Source
bc_entry_restore/2Restores the given entry from trash.Source
bc_entry_save/3Saves and formats the new entry.Source
bc_entry_update/2Updates the given entry.Source
bc_purge_trash/1Removes all entries from trash that the actor has access to.Source
bc_trash_list/2Retrieves the list of entries in trash.Source
prolog/bc/  -- Mail-specific data operations */Show source
prolog/bc/  -- Handles the user and authentication data */Show source
bc_user/3Retrieves the given user.Source
bc_user_auth/2Authenticates the given user with username and password.Source
bc_user_list/2Retrieves the list of users.Source
bc_user_remove/2Removes the given user.Source
bc_user_save/3Saves the new user.Source
prolog/bc/  -- Checks the dependency versionsShow source
prolog/bc/bc_entry.plShow source
prolog/bc/  -- Helper for querying current environmentShow source
prolog/bc/bc_excerpt.plShow source
bc_excerpt/3Provides excerpt from HTML by removing tags and taking prefix of text.Source
prolog/bc/bc_files.plShow source
prolog/bc/bc_form.plShow source
bc_form_read/1Reads application/x-www-form-urlencoded data using http_read_data/3 and turns it into a dict.Source
prolog/bc/bc_headers.plShow source
bc_if_modified_since/2Extracts and parses If-Modified-Since header from the request.Source
prolog/bc/bc_hex.plShow source
bc_atom_hex/2Converts given atom into UTF-8-encoded hex atom.Source
bc_hex_atom/2Converts given hex atom into UTF-8-encoded atom.Source
prolog/bc/  -- Helper module to obtain image dimensions */Show source
prolog/bc/bc_list.plShow source
prolog/bc/  -- Helper module to send mail notifications */Show source
bc_mail_send/4Sends mail using the current SMTP configuration.Source
bc_mail_send_text/4Same as bc_mail_send/4 but takes prepared text instead of closure.Source
bc_mail_test/3Tries to send a test email.Source
prolog/bc/bc_mail_queue.plShow source
prolog/bc/bc_mail_template.plShow source
bc_mail_register_template/3Adds or replaces the given file.Source
bc_mail_render_template/3Renders the mail template with given data.Source
prolog/bc/  -- HTTP handlers for mail unsubscription */Show source
prolog/bc/  -- The main moduleShow source
bc_main/1Opens docstore database and runs the frameworks setup code.Source
bc_main/2Same as bc_main/1 but does not use options system.Source
prolog/bc/bc_migrate.plShow source
bc_migrate/3Executes the given migration in transaction.Source
prolog/bc/bc_role.plShow source
bc_register_role/3Registers a new role.Source
bc_role/3Matches/generates all registered roles.Source
bc_unregister_role/1Removes the given role.Source
prolog/bc/  -- HTTP routingShow source
bc_enable_expires/0Enables Cache-Control and Expires headers.Source
bc_route/1Routes the given HTTP request.Source
prolog/bc/  -- Search support */Show source
bc_index_all/0Indexes all entries.Source
bc_index_clean/0Cleans current index data.Source
bc_index_remove/0Removes all indexes.Source
bc_index_remove/1Removes the given entry index.Source
bc_search/3Runs search against the given type.Source
prolog/bc/bc_send.plShow source
bc_send_404/0Helper to send HTTP 404 Not Found response.Source
prolog/bc/  -- Entry similarity analysis */Show source
bc_similar/3Finds similar entries of the type for the given entry.Source
prolog/bc/bc_string.plShow source
bc_string_replace/4Helper to replace all occurences in given string.Source
prolog/bc/  -- Tag statistics */Show source
bc_tag_stat/1Same as bc_tag_stat/2 but uses post as the entry type.Source
bc_tag_stat/2Finds tags that are used by published posts.Source
bc_tag_stat_all/2Finds tags that are used by all posts.Source
prolog/bc/bc_type.plShow source
bc_register_canonical/2Registers a new type canonical URL.Source
bc_register_preview/2Registers a new type preview.Source
bc_register_type/5Registers a new type.Source
bc_type/5Matches/generates all registered types.Source
bc_type_preview/2Matches/generates all registered type canonical URLs.Source
bc_type_preview/2Matches/generates all registered type previews.Source
bc_unregister_canonical/1Removes the given type canonical URL.Source
bc_unregister_preview/1Removes the given type preview.Source
bc_unregister_type/1Removes the given type.Source
prolog/bc/bc_user.plShow source
prolog/bc/bc_view.plShow source
bc_view_disable_cache/0Disables view caching.Source
bc_view_enable_cache/0Enables view caching.Source
bc_view_not_found/0Sends non-cached 404 response.Source
bc_view_purge_cache/0Purges all cache entries.Source
bc_view_see_other/1Sends redirect 303 (see other) for the current request.Source
bc_view_send/2Same as bc_view_send/3 with the default content type.Source
bc_view_send/3Renders and sends a simple-template view.Source
prolog/bc/  -- Generic term transform */Show source
bc_walk/3Generic term transformation.Source