1
0
Fork 0
mirror of https://github.com/sbrl/Pepperminty-Wiki.git synced 2024-12-04 08:03:00 +00:00

Seriously reorganise stuff. Much tidier :D

This commit is contained in:
Starbeamrainbowlabs 2018-12-12 23:23:50 +00:00
parent 905e970dc0
commit ca68989bb7
Signed by: sbrl
GPG key ID: 1BE5172E637709C2
90 changed files with 7538 additions and 4486 deletions

3
.gitmodules vendored Normal file
View file

@ -0,0 +1,3 @@
[submodule "lantern-build-engine"]
path = lantern-build-engine
url = https://gitlab.com/sbrl/lantern-build-engine.git

View file

@ -1,32 +0,0 @@
.DEFAULT_GOAL := peppermint
.PHONY: setupApiDoc peppermint docs rest_docs module_api_docs
ApiDocPresent := $(shell sh -c apidoc --help 1\>/dev/null && rm -rf doc/)
peppermint:
@echo [peppermint/build] Rebuilding Pepperminty Wiki
php build.php
docs: rest_docs module_api_docs
rest_docs: setupApiDoc
@echo [peppermint/docs] Building docs
apidoc -o './docs/RestApi/' --config apidoc.json -f '.*\.php' -e 'index.php|ModuleApi'
rm -rf doc/
module_api_docs: phpdoc
@echo [peppermint/module api docs] Updating module api docs
php phpdoc run --directory . --target docs/ModuleApi --cache-folder docs/ModuleApiCache --ignore build/,php_error.php,Parsedown*,*.html --title "Pepperminty Wiki Module API" --visibility public
phpdoc:
curl -L https://phpdoc.org/phpDocumentor.phar -o phpdoc
setupApiDoc:
@echo [peppermint] Checking for apiDoc
ifndef ApiDocPresent
@echo [peppermint] Attempting to install ApiDoc, since it wasn't detected in your PATH
@echo [peppermint] Note that you may need to be root, and you'll need npm installed.
npm install apidoc --global
endif
@echo [peppermint] Check complete

View file

@ -1,6 +1,6 @@
{
"name": "Pepperminty Wiki",
"version": "0.13.0",
"version": "0.17.1",
"description": "A wiki in a box. This is the API documentation.",
"title": "Pepperminty Wiki (0.13-dev)"
}

View file

@ -1,2 +0,0 @@
@echo off
php build.php %*

147
build.sh
View file

@ -1,2 +1,147 @@
#!/usr/bin/env bash
php build.php $*
# Make sure the current directory is the location of this script to simplify matters
cd "$(dirname $(readlink -f $0))";
################
### Settings ###
################
# The name of this project
project_name="Pepperminty Wiki";
# The path to the lantern build engine git submodule
lantern_path="./lantern-build-engine";
###
# Custom Settings
###
# Put any custom settings here.
# The file to store the development server's PID in.
server_pid_file="/tmp/pepperminty-wiki-dev-server.pid";
###############################################################################
# Check out the lantern git submodule if needed
if [ ! -d "${lantern_path}" ]; then git submodule update --init "${lantern_path}"; fi
source "${lantern_path}/lantern.sh";
if [[ "$#" -lt 1 ]]; then
echo -e "${FBLE}${project_name}${RS} build script";
echo -e " by Starbeamrainbowlabs";
echo -e "${LC}Powered by the lantern build engine, v${version}${RS}";
echo -e "";
echo -e "${CSECTION}Usage${RS}";
echo -e " ./build ${CTOKEN}{action}${RS} ${CTOKEN}{action}${RS} ${CTOKEN}{action}${RS} ...";
echo -e "";
echo -e "${CSECTION}Available actions${RS}";
echo -e " ${CACTION}setup${RS} - Perform initial setup, check the environment (skip if only building Pepperminty Wiki itself)";
echo -e " ${CACTION}build${RS} - Build Pepperminty Wiki";
echo -e " ${CACTION}docs${RS} - Build the documentation";
echo -e " ${CACTION}docs-livereload${RS} - Start the documentation livereload server";
echo -e " ${CACTION}start-server${RS} - Start a development server";
echo -e " ${CACTION}stop-server${RS} - Stop the development server";
echo -e "";
exit 1;
fi
###############################################################################
function task_setup {
task_begin "Checking Environment";
check_command git true;
check_command npm true;
check_command npm true;
task_end $?;
task_begin "Initialising submodules";
git submodule update --init;
task_end $?;
task_begin "Installing packages";
npm install;
task_end $?;
task_begin "Creating build folders";
mkdir -p build/_tmp;
echo "This folder contains build tools automatically downloaded." >build/_tmp/README.txt;
task_end $?;
}
function task_build {
if [ -f "./build/index.php" ]; then
task_begin "Deleting old build result";
rm build/index.php;
task_end "$?";
fi
task_begin "Building";
php build.php
task_end $?;
}
function task_docs {
task_begin "Building HTTP API Docs";
node_modules/apidoc/bin/apidoc -o './docs/RestApi/' --config apidoc.json -f '.*\.php' -e 'index.php|ModuleApi'
exit_code="$?";
rm -rf doc/;
task_end "${exit_code}";
task_begin "Building PHP Module API Docs";
if [ ! -f "./build/_tmp/phpdoc" ]; then
subtask_begin "Downloading PHPDoc";
curl -sSL https://phpdoc.org/phpDocumentor.phar -o ./build/_tmp/phpdoc
subtask_end $?;
fi
php ./build/_tmp/phpdoc run \
--directory . \
--target docs/ModuleApi\
--cache-folder docs/ModuleApiCache \
--ignore build/,php_error.php,Parsedown*,*.html \
--title "Pepperminty Wiki Module API" \
--visibility public;
task_end $?;
task_begin "Building Main Documentation";
node_modules/docpress/bin/docpress build;
task_end $?;
}
function task_docs-livereload {
task_begin "Starting Livereload Documentation Server";
node_modules/docpress/bin/docpress serve;
task_end $?;
}
function task_start-server {
task_begin "Starting Server";
if [ -f "${server_pid_file}" ]; then
echo -e "${FRED}${HC}Error: A development server appears to be running already. Try running the 'stop-server' task before starting it again.${RS}";
task_end 1;
fi
php -S [::]:35623 -t build/ &
exit_code=$?; pid=$!;
echo "${pid}" >"${server_pid_file}";
task_end "${exit_code}";
task_begin "Opening Browser";
sensible-browser [::]:35623;
task_end $?;
}
function task_stop-server {
task_begin "Stopping Server";
kill "$(cat "${server_pid_file}")";
rm "${server_pid_file}";
task_end $?;
}
###############################################################################
tasks_run $@;

File diff suppressed because it is too large Load diff

View file

@ -20,22 +20,24 @@ Pepperminty Wiki has a downloader that you can use to select the modules you wan
You can also you the downloader offline. Simply clone this repository to your web server and then point your web browser at `your.server.com/path/to/pepperminty/wiki/download.php`.
## Method 4: Building from source
Pepperminty Wiki can also be built from source (and I do this all the time when testing). Start by cloning the repository. Then go into the `modules` folder and append `.disabled` to the names of any modules you don't want to be included (e.g. `modules/page-edit.php` would become `modules/page-edit.php.disabled`). Then follow the instructions for your platform below. The resulting file will be located at `build/index.php`.
Pepperminty Wiki can also be built from source (and I do this all the time when testing). Start by cloning the repository. Then go into the `modules` folder and append `.disabled` to the names of any modules you don't want to be included (e.g. `modules/page-edit.php` would become `modules/page-edit.php.disabled`). Then follow the instructions below. The resulting file will be located at `build/index.php`.
### Windows
Simply run the `build.bat` script in the root of the repository. It will handle everything for you.
### Linux and Everyone Else
Run the following commands from the root of the repository in order, adjusting them for your specific platform (these are for a standard Ubuntu Server install):
Run the following commands from the root of the repository in order, adjusting them for your specific platform if required:
```bash
rm build/index.php
php rebuild_module_index.php
php build.php
```
These commands are also in `build.sh`. You can run that if you want. Here's an explanation of what each command does:
These commands are also in `build.sh`. If you have bash installed (i.e. Linux and macOS users), you can run that instead like this:
```bash
./build.sh build
```
The extra `build` is because the build script can do other things. Omit the `build` for a full list of tricks it has up its sleeve :D
Here's an explanation of what each command does:
1. Deletes the old `index.php` in the build folder that comes with the repository
2. Rebuilds the module index that the build scripts uses to determine what modules it should include when building
3. Actually builds Pepperminty Wiki. Outputs to `index.php`.
2. Rebuilds the module index that the build scripts uses to determine what modules it should include when building, and then actually builds Pepperminty Wiki. Outputs to `index.php`.

View file

@ -2,7 +2,7 @@
The core of Pepperminty Wiki exposes several global objects, classes, functions, and miscellaneous files that you can use to write your own modules. This page documents these them so that you can create your own modules more easily.
## Table of Contents
- [Rest API](#rest-api)
- [HTTP API](#http-api)
- [Module API](#module-api)
- [Global Variables](#global-variables)
- [Files](#files)
@ -12,11 +12,11 @@ The core of Pepperminty Wiki exposes several global objects, classes, functions,
- [`recent-changes.json`](#recent-changesjson)
- [`statsindex.json`](#statsindexjson)
## Rest API
The REST api provided by Pepperminty Wiki itself is documented for bot owners and software developers alike over on GitHub pages [here](https://sbrl.github.io/Pepperminty-Wiki/docs/RestApi/).
## HTTP API
The HTTP API provided by Pepperminty Wiki itself is documented for bot owners and software developers alike. Find it via the _HTTP API_ section in the sidebar of this page.
## Module API
The main PHP-based module API is documented with php documentor. The docs can be found [here](https://sbrl.github.io/Pepperminty-Wiki/docs/ModuleApi/), hosted on GitHub Pages.
The main PHP-based module API is documented with _PHPDoc_. It can be found via the _PHP Module API_ section in the sidebar of this page.
This documentation covers all the functions and classes available in both the Pepperminty Wiki core, and the modules stored in this repository - as well as mentioning which module they are a part of.

View file

@ -1,14 +1,17 @@
# Development Notes
This page contains a few notes about Pepperminty Wiki development. These notes are intended to remind me of things I need to do, but you may find them useful.
# Making a Release
This page contains a few notes about making a release of Pepperminty Wiki. These notes are intended to remind me of things I need to do, but you may find them useful.
## Preparing for a release
The following things need to be done to prepare for a release:
- Check for outstanding issues
- Check the changelog
- Make sure that the README is up to date
- Make sure that Pepperminty Wiki actually works
- Bump the version
- Bump the version:
- In the `version` file
- In the changelog
- In `apidoc.json` (TODO: Automate this?)
- In the README.md (TODO: Automate this?)
- (Stable releases only) Pull down changes to update online downloader at starbeamrainbowlabs.com/labs/peppermint/download.php
- Update wikimatrix
- Write & publish the release

View file

@ -106,12 +106,12 @@
<ul class="dropdown-menu">
<li>
<a href="../reports/errors.html">
<i class="icon-list-alt"></i>&#160;Errors <span class="label label-info pull-right">47</span>
<i class="icon-list-alt"></i>&#160;Errors <span class="label label-info pull-right">44</span>
</a>
</li>
<li>
<a href="../reports/markers.html">
<i class="icon-list-alt"></i>&#160;Markers <span class="label label-info pull-right">6</span>
<i class="icon-list-alt"></i>&#160;Markers <span class="label label-info pull-right">6</span>
</a>
</li>
<li>
@ -136,10 +136,10 @@
<div class="accordion" style="margin-bottom: 0">
<div class="accordion-group">
<div class="accordion-heading">
<a class="accordion-toggle " data-toggle="collapse" data-target="#namespace-50850467"></a>
<a class="accordion-toggle " data-toggle="collapse" data-target="#namespace-1217283171"></a>
<a href="../namespaces/default.html" style="margin-left: 30px; padding-left: 0">\</a>
</div>
<div id="namespace-50850467" class="accordion-body collapse in">
<div id="namespace-1217283171" class="accordion-body collapse in">
<div class="accordion-inner">
@ -401,7 +401,7 @@ with a URL encoded version of the page name.</em></p>
<section class="span10 offset1">
<hr />
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor </a> and authored
on May 5th, 2018 at 20:53.
on December 12th, 2018 at 23:20.
</section>
</section>
</section>

View file

@ -106,12 +106,12 @@
<ul class="dropdown-menu">
<li>
<a href="../reports/errors.html">
<i class="icon-list-alt"></i>&#160;Errors <span class="label label-info pull-right">47</span>
<i class="icon-list-alt"></i>&#160;Errors <span class="label label-info pull-right">44</span>
</a>
</li>
<li>
<a href="../reports/markers.html">
<i class="icon-list-alt"></i>&#160;Markers <span class="label label-info pull-right">6</span>
<i class="icon-list-alt"></i>&#160;Markers <span class="label label-info pull-right">6</span>
</a>
</li>
<li>
@ -136,10 +136,10 @@
<div class="accordion" style="margin-bottom: 0">
<div class="accordion-group">
<div class="accordion-heading">
<a class="accordion-toggle " data-toggle="collapse" data-target="#namespace-992366407"></a>
<a class="accordion-toggle " data-toggle="collapse" data-target="#namespace-1482969679"></a>
<a href="../namespaces/default.html" style="margin-left: 30px; padding-left: 0">\</a>
</div>
<div id="namespace-992366407" class="accordion-body collapse in">
<div id="namespace-1482969679" class="accordion-body collapse in">
<div class="accordion-inner">
@ -414,7 +414,7 @@ Added image support</p>
<section class="span10 offset1">
<hr />
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor </a> and authored
on May 5th, 2018 at 20:53.
on December 12th, 2018 at 23:20.
</section>
</section>
</section>

View file

@ -106,12 +106,12 @@
<ul class="dropdown-menu">
<li>
<a href="../reports/errors.html">
<i class="icon-list-alt"></i>&#160;Errors <span class="label label-info pull-right">47</span>
<i class="icon-list-alt"></i>&#160;Errors <span class="label label-info pull-right">44</span>
</a>
</li>
<li>
<a href="../reports/markers.html">
<i class="icon-list-alt"></i>&#160;Markers <span class="label label-info pull-right">6</span>
<i class="icon-list-alt"></i>&#160;Markers <span class="label label-info pull-right">6</span>
</a>
</li>
<li>
@ -136,10 +136,10 @@
<div class="accordion" style="margin-bottom: 0">
<div class="accordion-group">
<div class="accordion-heading">
<a class="accordion-toggle " data-toggle="collapse" data-target="#namespace-2127223150"></a>
<a class="accordion-toggle " data-toggle="collapse" data-target="#namespace-778800744"></a>
<a href="../namespaces/default.html" style="margin-left: 30px; padding-left: 0">\</a>
</div>
<div id="namespace-2127223150" class="accordion-body collapse in">
<div id="namespace-778800744" class="accordion-body collapse in">
<div class="accordion-inner">
@ -525,7 +525,7 @@ index.</p>
<section class="span10 offset1">
<hr />
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor </a> and authored
on May 5th, 2018 at 20:53.
on December 12th, 2018 at 23:20.
</section>
</section>
</section>

View file

@ -106,12 +106,12 @@
<ul class="dropdown-menu">
<li>
<a href="../reports/errors.html">
<i class="icon-list-alt"></i>&#160;Errors <span class="label label-info pull-right">47</span>
<i class="icon-list-alt"></i>&#160;Errors <span class="label label-info pull-right">44</span>
</a>
</li>
<li>
<a href="../reports/markers.html">
<i class="icon-list-alt"></i>&#160;Markers <span class="label label-info pull-right">6</span>
<i class="icon-list-alt"></i>&#160;Markers <span class="label label-info pull-right">6</span>
</a>
</li>
<li>
@ -136,10 +136,10 @@
<div class="accordion" style="margin-bottom: 0">
<div class="accordion-group">
<div class="accordion-heading">
<a class="accordion-toggle " data-toggle="collapse" data-target="#namespace-855065177"></a>
<a class="accordion-toggle " data-toggle="collapse" data-target="#namespace-369263126"></a>
<a href="../namespaces/default.html" style="margin-left: 30px; padding-left: 0">\</a>
</div>
<div id="namespace-855065177" class="accordion-body collapse in">
<div id="namespace-369263126" class="accordion-body collapse in">
<div class="accordion-inner">
@ -190,10 +190,13 @@
<a href="../classes/page_renderer.html#method_render" class="">render()</a><br />
<a href="../classes/page_renderer.html#method_render_main" class="">render_main()</a><br />
<a href="../classes/page_renderer.html#method_render_minimal" class="">render_minimal()</a><br />
<a href="../classes/page_renderer.html#method_send_server_push_indicators" class="">send_server_push_indicators()</a><br />
<a href="../classes/page_renderer.html#method_get_header_html" class="">get_header_html()</a><br />
<a href="../classes/page_renderer.html#method_is_css_url" class="">is_css_url()</a><br />
<a href="../classes/page_renderer.html#method_get_css_as_html" class="">get_css_as_html()</a><br />
<a href="../classes/page_renderer.html#method_AddJSLink" class="">AddJSLink()</a><br />
<a href="../classes/page_renderer.html#method_AddJSSnippet" class="">AddJSSnippet()</a><br />
<a href="../classes/page_renderer.html#method_AddServerPushIndicator" class="">AddServerPushIndicator()</a><br />
<a href="../classes/page_renderer.html#method_render_navigation_bar" class="">render_navigation_bar()</a><br />
<a href="../classes/page_renderer.html#method_render_username" class="">render_username()</a><br />
<a href="../classes/page_renderer.html#method_generate_all_pages_datalist" class="">generate_all_pages_datalist()</a><br />
@ -335,7 +338,7 @@
<h3 class="public ">$minimal_content_template</h3>
<pre class="signature">$minimal_content_template : string</pre>
<p><em>A specially minified content template that doesn&#039;t include the navbar and
other elements not suiltable for printing.</em></p>
other elements not suitable for printing.</em></p>
<h4>Type</h4>
@ -603,6 +606,36 @@ value of the function passed is discarded.</p>
<div class="row-fluid">
<div class="span8 content class">
<a id="method_send_server_push_indicators" name="method_send_server_push_indicators" class="anchor"></a>
<article class="method">
<h3 class="public ">send_server_push_indicators()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">send_server_push_indicators() : integer|FALSE</pre>
<p><em>Sends the currently registered HTTP2 server push items to the client.</em></p>
<h4>Returns</h4>
integer|FALSE
&mdash; <p>The number of resource hints included in the link: header, or false if server pushing is disabled.</p>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<span class="label label-info">static</span>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr><td colspan="2"><em>None found</em></td></tr>
</table>
</aside>
</div>
<div class="row-fluid">
<div class="span8 content class">
<a id="method_get_header_html" name="method_get_header_html" class="anchor"></a>
<article class="method">
<h3 class="public ">get_header_html()</h3>
@ -640,6 +673,36 @@ value of the function passed is discarded.</p>
<div class="row-fluid">
<div class="span8 content class">
<a id="method_is_css_url" name="method_is_css_url" class="anchor"></a>
<article class="method">
<h3 class="public ">is_css_url()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">is_css_url() : boolean</pre>
<p><em>Figures out whether $settings-&gt;css is a url, or a string of css.</em></p>
<p>A url is something starting with &quot;protocol://&quot; or simply a &quot;/&quot;.</p>
<h4>Returns</h4>
boolean
&mdash; <p>True if it's a url - false if we assume it's a string of css.</p>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<span class="label label-info">static</span>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr><td colspan="2"><em>None found</em></td></tr>
</table>
</aside>
</div>
<div class="row-fluid">
<div class="span8 content class">
<a id="method_get_css_as_html" name="method_get_css_as_html" class="anchor"></a>
<article class="method">
<h3 class="public ">get_css_as_html()</h3>
@ -759,6 +822,46 @@ value of the function passed is discarded.</p>
<div class="row-fluid">
<div class="span8 content class">
<a id="method_AddServerPushIndicator" name="method_AddServerPushIndicator" class="anchor"></a>
<article class="method">
<h3 class="public ">AddServerPushIndicator()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">AddServerPushIndicator(string <span class="argument">$type</span>, string <span class="argument">$path</span>) </pre>
<p><em>Adds a resource to the list of items to indicate that the web server should send via HTTP/2.0 Server Push.</em></p>
<p>Note: Only specify static files here, as you might end up with strange (and possibly dangerous) results!</p>
<h4>Parameters</h4>
<table class="table table-condensed table-hover">
<tr>
<td>string</td>
<td>$type </td>
<td><p>The resource type. See <a href="https://fetch.spec.whatwg.org/#concept-request-destination">https://fetch.spec.whatwg.org/#concept-request-destination</a> for more information.</p></td>
</tr>
<tr>
<td>string</td>
<td>$path </td>
<td><p>The <em>relative url path</em> to the resource.</p></td>
</tr>
</table>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<span class="label label-info">static</span>
<dl>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr><td colspan="2"><em>None found</em></td></tr>
</table>
</aside>
</div>
<div class="row-fluid">
<div class="span8 content class">
<a id="method_render_navigation_bar" name="method_render_navigation_bar" class="anchor"></a>
<article class="method">
<h3 class="public ">render_navigation_bar()</h3>
@ -943,7 +1046,7 @@ navigation bar.</p></td>
<section class="span10 offset1">
<hr />
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor </a> and authored
on May 5th, 2018 at 20:53.
on December 12th, 2018 at 23:20.
</section>
</section>
</section>

View file

@ -106,12 +106,12 @@
<ul class="dropdown-menu">
<li>
<a href="../reports/errors.html">
<i class="icon-list-alt"></i>&#160;Errors <span class="label label-info pull-right">47</span>
<i class="icon-list-alt"></i>&#160;Errors <span class="label label-info pull-right">44</span>
</a>
</li>
<li>
<a href="../reports/markers.html">
<i class="icon-list-alt"></i>&#160;Markers <span class="label label-info pull-right">6</span>
<i class="icon-list-alt"></i>&#160;Markers <span class="label label-info pull-right">6</span>
</a>
</li>
<li>
@ -136,10 +136,10 @@
<div class="accordion" style="margin-bottom: 0">
<div class="accordion-group">
<div class="accordion-heading">
<a class="accordion-toggle " data-toggle="collapse" data-target="#namespace-25777709"></a>
<a class="accordion-toggle " data-toggle="collapse" data-target="#namespace-616725782"></a>
<a href="../namespaces/default.html" style="margin-left: 30px; padding-left: 0">\</a>
</div>
<div id="namespace-25777709" class="accordion-body collapse in">
<div id="namespace-616725782" class="accordion-body collapse in">
<div class="accordion-inner">
@ -342,7 +342,7 @@ merged into an inverted index.</em></p>
<article class="method">
<h3 class="public ">tokenize()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">tokenize(string <span class="argument">$source</span>) : array</pre>
<pre class="signature" style="margin-right: 54px;">tokenize(string <span class="argument">$source</span>, boolean <span class="argument">$capture_offsets = false</span>) : array</pre>
<p><em>Converts a source string into a series of raw tokens.</em></p>
@ -352,6 +352,11 @@ merged into an inverted index.</em></p>
<td>string</td>
<td>$source </td>
<td><p>The source string to process.</p></td>
</tr>
<tr>
<td>boolean</td>
<td>$capture_offsets </td>
<td><p>Whether to capture &amp; return the character offsets of the tokens detected. If true, then each token returned will be an array in the form [ token, char_offset ].</p></td>
</tr>
</table>
@ -789,7 +794,7 @@ sequential search.</p>
<article class="method">
<h3 class="public ">extract_context()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">extract_context(string <span class="argument">$query</span>, string <span class="argument">$source</span>) : string</pre>
<pre class="signature" style="margin-right: 54px;">extract_context(string <span class="argument">$invindex</span>, string <span class="argument">$pagename</span>, string <span class="argument">$query</span>, string <span class="argument">$source</span>) : string</pre>
<p><em>Extracts a context string (in HTML) given a search query that could be displayed
in a list of search results.</em></p>
@ -798,6 +803,16 @@ in a list of search results.</em></p>
<table class="table table-condensed table-hover">
<tr>
<td>string</td>
<td>$invindex </td>
<td><p>The inverted index to consult.</p></td>
</tr>
<tr>
<td>string</td>
<td>$pagename </td>
<td><p>The name of the paget that this source belongs to. Used when consulting the inverted index.</p></td>
</tr>
<tr>
<td>string</td>
<td>$query </td>
<td><p>The search queary to generate the context for.</p></td>
</tr>
@ -919,7 +934,7 @@ in a list of search results.</em></p>
<section class="span10 offset1">
<hr />
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor </a> and authored
on May 5th, 2018 at 20:53.
on December 12th, 2018 at 23:20.
</section>
</section>
</section>

View file

@ -106,12 +106,12 @@
<ul class="dropdown-menu">
<li>
<a href="../reports/errors.html">
<i class="icon-list-alt"></i>&#160;Errors <span class="label label-info pull-right">47</span>
<i class="icon-list-alt"></i>&#160;Errors <span class="label label-info pull-right">44</span>
</a>
</li>
<li>
<a href="../reports/markers.html">
<i class="icon-list-alt"></i>&#160;Markers <span class="label label-info pull-right">6</span>
<i class="icon-list-alt"></i>&#160;Markers <span class="label label-info pull-right">6</span>
</a>
</li>
<li>
@ -136,10 +136,10 @@
<div class="accordion" style="margin-bottom: 0">
<div class="accordion-group">
<div class="accordion-heading">
<a class="accordion-toggle " data-toggle="collapse" data-target="#namespace-1718878422"></a>
<a class="accordion-toggle " data-toggle="collapse" data-target="#namespace-96068186"></a>
<a href="../namespaces/default.html" style="margin-left: 30px; padding-left: 0">\</a>
</div>
<div id="namespace-1718878422" class="accordion-body collapse in">
<div id="namespace-96068186" class="accordion-body collapse in">
<div class="accordion-inner">
@ -784,7 +784,7 @@ dashes.</p>
todo
</th>
<td>
<p>Make this moree clevererer :D</p>
<p>Make this more clevererer :D</p>
</td>
</tr>
</table>
@ -1614,12 +1614,50 @@ don&#039;t have it.</em></p>
<div class="row-fluid">
<div class="span8 content class">
<a id="method_save_settings" name="method_save_settings" class="anchor"></a>
<article class="method">
<h3 class=" ">save_settings()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">save_settings() : boolean</pre>
<p><em>Saves the settings file back to peppermint.json.</em></p>
<h4>Returns</h4>
boolean
&mdash; <p>Whether the settings were saved successfully.</p>
</article>
</div>
<aside class="span4 detailsbar">
<h1><i class="icon-arrow-down"></i></h1>
<dl>
<dt>File</dt>
<dd><a href=""><div class="path-wrapper">core.php</div></a></dd>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr>
<th>
package
</th>
<td>
<p>Default</p>
</td>
</tr>
</table>
</aside>
</div>
<div class="row-fluid">
<div class="span8 content class">
<a id="method_save_userdata" name="method_save_userdata" class="anchor"></a>
<article class="method">
<h3 class=" ">save_userdata()</h3>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal" style="font-size: 1.1em; padding: 9px 14px"><i class="icon-code"></i></a>
<pre class="signature" style="margin-right: 54px;">save_userdata() : boolean</pre>
<p><em>Saves the currently logged in uesr&#039;s data back to peppermint.json.</em></p>
<p><em>Saves the currently logged in user&#039;s data back to peppermint.json.</em></p>
@ -2433,7 +2471,7 @@ an edit is saved.</em></p>
<section class="span10 offset1">
<hr />
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor </a> and authored
on May 5th, 2018 at 20:53.
on December 12th, 2018 at 23:20.
</section>
</section>
</section>

File diff suppressed because it is too large Load diff

View file

@ -106,12 +106,12 @@
<ul class="dropdown-menu">
<li>
<a href="../reports/errors.html">
<i class="icon-list-alt"></i>&#160;Errors <span class="label label-info pull-right">47</span>
<i class="icon-list-alt"></i>&#160;Errors <span class="label label-info pull-right">44</span>
</a>
</li>
<li>
<a href="../reports/markers.html">
<i class="icon-list-alt"></i>&#160;Markers <span class="label label-info pull-right">6</span>
<i class="icon-list-alt"></i>&#160;Markers <span class="label label-info pull-right">6</span>
</a>
</li>
<li>
@ -136,10 +136,10 @@
<div class="accordion" style="margin-bottom: 0">
<div class="accordion-group">
<div class="accordion-heading">
<a class="accordion-toggle " data-toggle="collapse" data-target="#namespace-755251852"></a>
<a class="accordion-toggle " data-toggle="collapse" data-target="#namespace-2093199389"></a>
<a href="../namespaces/default.html" style="margin-left: 30px; padding-left: 0">\</a>
</div>
<div id="namespace-755251852" class="accordion-body collapse in">
<div id="namespace-2093199389" class="accordion-body collapse in">
<div class="accordion-inner">
@ -239,7 +239,7 @@
<section class="span10 offset1">
<hr />
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor </a> and authored
on May 5th, 2018 at 20:53.
on December 12th, 2018 at 23:20.
</section>
</section>
</section>

View file

@ -1,94 +1,94 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>Pepperminty Wiki Download</title>
</head>
<body>
<h1><img src="https://starbeamrainbowlabs.com/images/logos/peppermint.png" class="logo" /> Pepperminty Wiki Downloader</h1>
<!-------------->
<h2>Module selector</h2>
<p>Choose the modules that you want to include in your installation of Pepperminty Wiki <?php echo(trim(file_get_contents("version"))); ?>.</p>
<p>
<button onclick="select(true);">Select All</button>
<button onclick="select(false);">Select None</button>
</p>
<table>
<tr>
<th></th>
<th>Name</th>
<th>Description</th>
<th>Author</th>
<th>Version</th>
<th style="width: 9rem;">Last Updated</th>
</tr>
<?php
$module_index = json_decode(file_get_contents("module_index.json"));
foreach($module_index as $module)
{
$checkedText = (isset($module->optional) && $module->optional === true) ? "" : " checked";
echo("<tr>
<td><input type='checkbox' id='$module->id'$checkedText /></td>
<td><label for='$module->id'>$module->name</label></td>
<td>$module->description</td>
<td>$module->author</td>
<td>$module->version</td>
<td>" . date("D jS M Y", $module->lastupdate) . "</td>
</tr>");
}
?>
</table>
<br />
<br />
<button onclick="download()" class="largebutton">Download</button>
<hr />
<p>
Pepperminty Wiki was built by <a href="https://starbeamrainbowlabs.com/"><img src="https://starbeamrainbowlabs.com/images/sbrl/SBRL-Small-64.png" class="logo" /> Starbeamrainbowlabs</a>. The code is available on <a href="//github.com/sbrl/pepperminty-wiki">GitHub</a>.
</p>
<p>
Other contributors: <a href="https://github.com/ikisler"><img src="https://avatars2.githubusercontent.com/u/12506147?v=3&s=32" class="logo" /> @ikisler</a>
</p>
<!------------------->
<link rel="stylesheet" href="//starbeamrainbowlabs.com/theme/basic.css" />
<style>
body { padding: 1rem; color: #442772; background-colour: #eee8f2; } /* syntaxtic gets confused sometimes */
a { color: #9e7eb4; }
.largebutton { font-size: 2rem; }
.logo { max-width: 1.25em; vertical-align: middle; }
</style>
<script>
function select(state)
{
var checkboxes = document.querySelectorAll("input[type=checkbox]");
for(var i = 0; i < checkboxes.length; i++)
{
checkboxes[i].checked = state;
}
}
function download()
{
var url = "pack.php?web=true&modules=",
checkboxes = document.querySelectorAll("input[type=checkbox]");
for(var i = 0; i < checkboxes.length; i++)
{
url += encodeURIComponent(checkboxes[i].id) + ",";
}
location.href = url;
}
</script>
</body>
</html>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>Pepperminty Wiki Download</title>
</head>
<body>
<h1><img src="https://starbeamrainbowlabs.com/images/logos/peppermint.png" class="logo" /> Pepperminty Wiki Downloader</h1>
<!-------------->
<h2>Module selector</h2>
<p>Choose the modules that you want to include in your installation of Pepperminty Wiki <?php echo(trim(file_get_contents("version"))); ?>.</p>
<p>
<button onclick="select(true);">Select All</button>
<button onclick="select(false);">Select None</button>
</p>
<table>
<tr>
<th></th>
<th>Name</th>
<th>Description</th>
<th>Author</th>
<th>Version</th>
<th style="width: 9rem;">Last Updated</th>
</tr>
<?php
$module_index = json_decode(file_get_contents("module_index.json"));
foreach($module_index as $module)
{
$checkedText = (isset($module->optional) && $module->optional === true) ? "" : " checked";
echo("<tr>
<td><input type='checkbox' id='$module->id'$checkedText /></td>
<td><label for='$module->id'>$module->name</label></td>
<td>$module->description</td>
<td>$module->author</td>
<td>$module->version</td>
<td>" . date("D jS M Y", $module->lastupdate) . "</td>
</tr>");
}
?>
</table>
<br />
<br />
<button onclick="download()" class="largebutton">Download</button>
<hr />
<p>
Pepperminty Wiki was built by <a href="https://starbeamrainbowlabs.com/"><img src="https://starbeamrainbowlabs.com/images/sbrl/SBRL-Small-64.png" class="logo" /> Starbeamrainbowlabs</a>. The code is available on <a href="//github.com/sbrl/pepperminty-wiki">GitHub</a>.
</p>
<p>
Other contributors: <a href="https://github.com/ikisler"><img src="https://avatars2.githubusercontent.com/u/12506147?v=3&s=32" class="logo" /> @ikisler</a>
</p>
<!------------------->
<link rel="stylesheet" href="//starbeamrainbowlabs.com/theme/basic.css" />
<style>
body { padding: 1rem; color: #442772; background-colour: #eee8f2; } /* syntaxtic gets confused sometimes */
a { color: #9e7eb4; }
.largebutton { font-size: 2rem; }
.logo { max-width: 1.25em; vertical-align: middle; }
</style>
<script>
function select(state)
{
var checkboxes = document.querySelectorAll("input[type=checkbox]");
for(var i = 0; i < checkboxes.length; i++)
{
checkboxes[i].checked = state;
}
}
function download()
{
var url = "pack.php?web=true&modules=",
checkboxes = document.querySelectorAll("input[type=checkbox]");
for(var i = 0; i < checkboxes.length; i++) {
if(!checkboxes[i].checked) continue;
url += encodeURIComponent(checkboxes[i].id) + ",";
}
location.href = url;
}
</script>
</body>
</html>

View file

@ -106,12 +106,12 @@
<ul class="dropdown-menu">
<li>
<a href="../reports/errors.html">
<i class="icon-list-alt"></i>&#160;Errors <span class="label label-info pull-right">47</span>
<i class="icon-list-alt"></i>&#160;Errors <span class="label label-info pull-right">44</span>
</a>
</li>
<li>
<a href="../reports/markers.html">
<i class="icon-list-alt"></i>&#160;Markers <span class="label label-info pull-right">6</span>
<i class="icon-list-alt"></i>&#160;Markers <span class="label label-info pull-right">6</span>
</a>
</li>
<li>
@ -136,10 +136,10 @@
<div class="accordion" style="margin-bottom: 0">
<div class="accordion-group">
<div class="accordion-heading">
<a class="accordion-toggle " data-toggle="collapse" data-target="#namespace-1590614701"></a>
<a class="accordion-toggle " data-toggle="collapse" data-target="#namespace-916802093"></a>
<a href="../namespaces/default.html" style="margin-left: 30px; padding-left: 0">\</a>
</div>
<div id="namespace-1590614701" class="accordion-body collapse in">
<div id="namespace-916802093" class="accordion-body collapse in">
<div class="accordion-inner">
@ -239,7 +239,7 @@
<section class="span10 offset1">
<hr />
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor </a> and authored
on May 5th, 2018 at 20:53.
on December 12th, 2018 at 23:20.
</section>
</section>
</section>

View file

@ -106,12 +106,12 @@
<ul class="dropdown-menu">
<li>
<a href="../reports/errors.html">
<i class="icon-list-alt"></i>&#160;Errors <span class="label label-info pull-right">47</span>
<i class="icon-list-alt"></i>&#160;Errors <span class="label label-info pull-right">44</span>
</a>
</li>
<li>
<a href="../reports/markers.html">
<i class="icon-list-alt"></i>&#160;Markers <span class="label label-info pull-right">6</span>
<i class="icon-list-alt"></i>&#160;Markers <span class="label label-info pull-right">6</span>
</a>
</li>
<li>
@ -136,10 +136,10 @@
<div class="accordion" style="margin-bottom: 0">
<div class="accordion-group">
<div class="accordion-heading">
<a class="accordion-toggle " data-toggle="collapse" data-target="#namespace-1201853617"></a>
<a class="accordion-toggle " data-toggle="collapse" data-target="#namespace-1519792449"></a>
<a href="../namespaces/default.html" style="margin-left: 30px; padding-left: 0">\</a>
</div>
<div id="namespace-1201853617" class="accordion-body collapse in">
<div id="namespace-1519792449" class="accordion-body collapse in">
<div class="accordion-inner">
@ -239,7 +239,7 @@
<section class="span10 offset1">
<hr />
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor </a> and authored
on May 5th, 2018 at 20:53.
on December 12th, 2018 at 23:20.
</section>
</section>
</section>

View file

@ -106,12 +106,12 @@
<ul class="dropdown-menu">
<li>
<a href="../reports/errors.html">
<i class="icon-list-alt"></i>&#160;Errors <span class="label label-info pull-right">47</span>
<i class="icon-list-alt"></i>&#160;Errors <span class="label label-info pull-right">44</span>
</a>
</li>
<li>
<a href="../reports/markers.html">
<i class="icon-list-alt"></i>&#160;Markers <span class="label label-info pull-right">6</span>
<i class="icon-list-alt"></i>&#160;Markers <span class="label label-info pull-right">6</span>
</a>
</li>
<li>