Added more links to the wiki documentation

This commit is contained in:
Erik C. Thauvin 2023-03-18 12:24:25 -07:00
parent a3063eee07
commit b27b0965af
13 changed files with 57 additions and 41 deletions

View file

@ -10,49 +10,49 @@ This project provides a collection of template renderers.
## Date/Time Renderers ## Date/Time Renderers
| Renderer | Description | | Renderer | Description |
|:----------------------------------------------------------------------------------------------------------|:----------------------------------------------------------------| |:------------------------------------------------------------------------------------------------------------------|:----------------------------------------------------------------|
| `rife.render.BeatTime` | Renders the current time in Swatch Internet (.beat) Time format | | [rife.render.BeatTime](https://github.com/rife2/rife2-template-renderers/wiki/rife.render.BeatTime) | Renders the current time in Swatch Internet (.beat) Time format |
| `rife.render.DateIso` | Renders the current date in ISO 8061 format | | [rife.render.DateIso](https://github.com/rife2/rife2-template-renderers/wiki/rife.render.DateIso) | Renders the current date in ISO 8061 format |
| [rife.render.DateTimeIso](https://github.com/rife2/rife2-template-renderers/wiki/rife.render.DateTimeIso) | Renders the current date and time in ISO 8061 format | | [rife.render.DateTimeIso](https://github.com/rife2/rife2-template-renderers/wiki/rife.render.DateTimeIso) | Renders the current date and time in ISO 8061 format |
| `rife.render.DateTimeRfc2822` | Renders the current date and time in RFC 2822 format | | [rife.render.DateTimeRfc2822](https://github.com/rife2/rife2-template-renderers/wiki/rife.render.DateTimeRfc2822) | Renders the current date and time in RFC 2822 format |
| `rife.render.TimeIso` | Renders the current time in ISO 8061 format | | [rife.render.TimeIso](https://github.com/rife2/rife2-template-renderers/wiki/rife.render.TimeIso) | Renders the current time in ISO 8061 format |
| `rife.render.Year` | Renders the current year | | [rife.render.Year](https://github.com/rife2/rife2-template-renderers/wiki/rife.rennder.Year) | Renders the current year |
## Encoding Renderers ## Encoding Renderers
| Renderer | Description | | Renderer | Description |
|:---------------------------------|:-------------------------------------------------------| |:------------------------------------------------------------------------------------------------------------|:-------------------------------------------------------|
| `rife.render.EncodeBase64` | Encodes a template value to Base64 | | [rife.render.EncodeBase64](https://github.com/rife2/rife2-template-renderers/wiki/rife.render.EncodeBase64) | Encodes a template value to Base64 |
| `rife.render.EncodeHtml` | Encodes a template value to HTML | | `rife.render.EncodeHtml` | Encodes a template value to HTML |
| `rife.render.EncodeHtmlEntities` | Encodes a template value to HTML decimal entities | | `rife.render.EncodeHtmlEntities` | Encodes a template value to HTML decimal entities |
| `rife.render.EncodeJs` | Encodes a template value to JavaScript/ECMAScript | | `rife.render.EncodeJs` | Encodes a template value to JavaScript/ECMAScript |
| `rife.render.EncodeJson` | Encodes a template value to JSON | | `rife.render.EncodeJson` | Encodes a template value to JSON |
| `rife.render.EncodeQp` | Converts a template value to a quoted-printable string | | `rife.render.EncodeQp` | Converts a template value to a quoted-printable string |
| `rife.render.EncodeUnicode` | Encodes a template value to Unicode escape codes | | `rife.render.EncodeUnicode` | Encodes a template value to Unicode escape codes |
| `rife.render.EncodeUrl` | URL-encodes a template value | | `rife.render.EncodeUrl` | URL-encodes a template value |
| `rife.render.EncodeXml` | Encodes a template value to XML | | `rife.render.EncodeXml` | Encodes a template value to XML |
## Format Renderers ## Format Renderers
| Renderer | Description | | Renderer | Description |
|:------------------------------------------------------------------------------------------------|:-----------------------------------------------------------------| |:--------------------------------------------------------------------------------------------------------|:-----------------------------------------------------------------|
| `rife.render.formatCreditcard` | Formats a template credit card number value to the last 4 digits | | `rife.render.formatCreditcard` | Formats a template credit card number value to the last 4 digits |
| `rife.render.ShorteUrl` | Shortens a template value using [is./gd](https://is.gd/) | | [rife.render.ShortenUrl](https://github.com/rife2/rife2-template-renderers/wiki/rife.render.ShortenUrl) | Shortens a template value using [is./gd](https://is.gd/) |
| [rife.render.Uptime](https://github.com/rife2/rife2-template-renderers/wiki/rife.render.Uptime) | Renders the server uptime in various customizable formats | | [rife.render.Uptime](https://github.com/rife2/rife2-template-renderers/wiki/rife.render.Uptime) | Renders the server uptime in various customizable formats |
## Text Renderers ## Text Renderers
| Renderer | Description | | Renderer | Description |
|:----------------------------|:--------------------------------------------------------------| |:--------------------------------------------------------------------------------------------------------|:--------------------------------------------------------------|
| `rife.render.Capitalize` | Capitalizes a template value | | [rife.render.Capitalize](https://github.com/rife2/rife2-template-renderers/wiki/rife.render.Capitalize) | Capitalizes a template value |
| `rife.render.Lowercase` | Converts a template value to lowercase | | `rife.render.Lowercase` | Converts a template value to lowercase |
| `rife.render.Rot13` | Translates a template value to/from ROT13 | | `rife.render.Rot13` | Translates a template value to/from ROT13 |
| `rife.render.SwapCase` | Swap case of a template value | | `rife.render.SwapCase` | Swap case of a template value |
| `rife.render.Trim` | Removes leading and trailing whitespace from a template value | | `rife.render.Trim` | Removes leading and trailing whitespace from a template value |
| `rife.render.Uncapitalize` | Un-capitalizes a template value | | `rife.render.Uncapitalize` | Un-capitalizes a template value |
| `rife.render.Uppercase` | Converts a template value to uppercase | | `rife.render.Uppercase` | Converts a template value to uppercase |
## Usage in Templates ## Usage in Templates

View file

@ -33,6 +33,7 @@ import java.time.ZonedDateTime;
* </pre> * </pre>
* *
* @author <a href="https://erik.thauvin.net/">Erik C. Thauvin</a> * @author <a href="https://erik.thauvin.net/">Erik C. Thauvin</a>
* @see <a href="https://github.com/rife2/rife2-template-renderers/wiki/rife.render.BeatTime">rife.render.BeatTime</a>
* @since 1.0 * @since 1.0
*/ */
public class BeatTime implements ValueRenderer { public class BeatTime implements ValueRenderer {

View file

@ -32,6 +32,7 @@ import rife.tools.Localization;
* </pre> * </pre>
* *
* @author <a href="https://erik.thauvin.net/">Erik C. Thauvin</a> * @author <a href="https://erik.thauvin.net/">Erik C. Thauvin</a>
* @see <a href="https://github.com/rife2/rife2-template-renderers/wiki/rife.render.Capitalize">rife.render.Capitalize</a>
* @since 1.0 * @since 1.0
*/ */
public class Capitalize implements ValueRenderer { public class Capitalize implements ValueRenderer {

View file

@ -35,6 +35,7 @@ import java.time.format.DateTimeFormatter;
* </pre> * </pre>
* *
* @author <a href="https://erik.thauvin.net/">Erik C. Thauvin</a> * @author <a href="https://erik.thauvin.net/">Erik C. Thauvin</a>
* @see <a href="https://github.com/rife2/rife2-template-renderers/wiki/rife.render.DateIso">rife.render.DateIso</a>
* @since 1.0 * @since 1.0
*/ */
public class DateIso implements ValueRenderer { public class DateIso implements ValueRenderer {

View file

@ -39,6 +39,7 @@ import java.util.Properties;
* </pre> * </pre>
* *
* @author <a href="https://erik.thauvin.net/">Erik C. Thauvin</a> * @author <a href="https://erik.thauvin.net/">Erik C. Thauvin</a>
* @see <a href="https://github.com/rife2/rife2-template-renderers/wiki/rife.render.DateTimeIso">rife.render.DateTimeIso</a>
* @since 1.0 * @since 1.0
*/ */
public class DateTimeIso implements ValueRenderer { public class DateTimeIso implements ValueRenderer {

View file

@ -35,6 +35,7 @@ import java.time.format.DateTimeFormatter;
* </pre> * </pre>
* *
* @author <a href="https://erik.thauvin.net/">Erik C. Thauvin</a> * @author <a href="https://erik.thauvin.net/">Erik C. Thauvin</a>
* @see <a href="https://github.com/rife2/rife2-template-renderers/wiki/rife.render.DateTimeRfc2822">rife.render.DateTimeRfc2822</a>
* @since 1.0 * @since 1.0
*/ */
public class DateTimeRfc2822 implements ValueRenderer { public class DateTimeRfc2822 implements ValueRenderer {

View file

@ -34,6 +34,7 @@ import java.nio.charset.StandardCharsets;
* </pre> * </pre>
* *
* @author <a href="https://erik.thauvin.net/">Erik C. Thauvin</a> * @author <a href="https://erik.thauvin.net/">Erik C. Thauvin</a>
* @see <a href="https://github.com/rife2/rife2-template-renderers/wiki/rife.render.EncodeBase64">rife.render.EncodeBase64</a>
* @see StringUtils#encodeBase64(byte[]) * @see StringUtils#encodeBase64(byte[])
* @since 1.0 * @since 1.0
*/ */

View file

@ -123,10 +123,10 @@ public final class RenderUtils {
/** /**
* Returns the plural form of a word, if count &gt; 1. * Returns the plural form of a word, if count &gt; 1.
* *
* @param count the count. * @param count the count
* @param word the singular word. * @param word the singular word
* @param plural the plural word. * @param plural the plural word
* @return the singular or plural string. * @return the singular or plural String
*/ */
public static String plural(final long count, final String word, final String plural) { public static String plural(final long count, final String word, final String plural) {
if (count > 1) { if (count > 1) {
@ -307,8 +307,8 @@ public final class RenderUtils {
/** /**
* Returns the formatted server uptime. * Returns the formatted server uptime.
* *
* @param uptime the uptime in milliseconds. * @param uptime the uptime in milliseconds
* @param properties the format properties. * @param properties the format properties
* @return The formatted uptime. * @return The formatted uptime.
*/ */
public static String uptime(long uptime, Properties properties) { public static String uptime(long uptime, Properties properties) {

View file

@ -33,6 +33,7 @@ import rife.template.ValueRenderer;
* </pre> * </pre>
* *
* @author <a href="https://erik.thauvin.net/">Erik C. Thauvin</a> * @author <a href="https://erik.thauvin.net/">Erik C. Thauvin</a>
* @see <a href="https://github.com/rife2/rife2-template-renderers/wiki/rife.render.ShortenUrl">rife.render.ShortenUrl</a>
* @since 1.0 * @since 1.0
*/ */
public class ShortenUrl implements ValueRenderer { public class ShortenUrl implements ValueRenderer {

View file

@ -35,6 +35,7 @@ import java.time.format.DateTimeFormatter;
* </pre> * </pre>
* *
* @author <a href="https://erik.thauvin.net/">Erik C. Thauvin</a> * @author <a href="https://erik.thauvin.net/">Erik C. Thauvin</a>
* @see <a href="https://github.com/rife2/rife2-template-renderers/wiki/rife.render.TimeIso">rife.render.TimeIso</a>
* @since 1.0 * @since 1.0
*/ */
public class TimeIso implements ValueRenderer { public class TimeIso implements ValueRenderer {

View file

@ -28,8 +28,15 @@ import java.util.Properties;
/** /**
* Renders the server uptime. * Renders the server uptime.
* *
* @see <a href="https://github.com/rife2/rife2-template-renderers/wiki/rife.render.Uptime">rife.render.Uptime</a> * <p>Usage:</p>
*
* <pre>
* &lt;!--v render:rife.render.Uptime/--&gt;
* {{v render:rife.render.Uptime/}}
* </pre>
*
* @author <a href="https://erik.thauvin.net/">Erik C. Thauvin</a> * @author <a href="https://erik.thauvin.net/">Erik C. Thauvin</a>
* @see <a href="https://github.com/rife2/rife2-template-renderers/wiki/rife.render.Uptime">rife.render.Uptime</a>
* @since 1.0 * @since 1.0
*/ */
public class Uptime implements ValueRenderer { public class Uptime implements ValueRenderer {

View file

@ -35,6 +35,7 @@ import java.time.format.DateTimeFormatter;
* </pre> * </pre>
* *
* @author <a href="https://erik.thauvin.net/">Erik C. Thauvin</a> * @author <a href="https://erik.thauvin.net/">Erik C. Thauvin</a>
* @see <a href="https://github.com/rife2/rife2-template-renderers/wiki/rife.rennder.Year">rife.render.Year</a>
* @since 1.0 * @since 1.0
*/ */
public class Year implements ValueRenderer { public class Year implements ValueRenderer {

View file

@ -1,3 +1,3 @@
<!--v render:rife.render.DateTimeIso--> <!--v render:rife.render.DateTimeIso-->
tz=UTC tz=UTC
<!--/v--> <!--/v-->