Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
M
magicseteditor
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
MyCard
magicseteditor
Commits
7580b472
Commit
7580b472
authored
Jul 14, 2007
by
twanvl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Yet more function documentation
parent
aaa9a020
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
182 additions
and
2 deletions
+182
-2
doc/function/combine_blend.txt
doc/function/combine_blend.txt
+1
-1
doc/function/copy_file.txt
doc/function/copy_file.txt
+22
-0
doc/function/english_plural.txt
doc/function/english_plural.txt
+16
-0
doc/function/filter_text.txt
doc/function/filter_text.txt
+27
-0
doc/function/masked_blend.txt
doc/function/masked_blend.txt
+1
-1
doc/function/symbols_to_html.txt
doc/function/symbols_to_html.txt
+22
-0
doc/function/to_html.txt
doc/function/to_html.txt
+30
-0
doc/function/to_text.txt
doc/function/to_text.txt
+17
-0
doc/function/write_image_file.txt
doc/function/write_image_file.txt
+24
-0
doc/function/write_text_file.txt
doc/function/write_text_file.txt
+22
-0
No files found.
doc/function/combine_blend.txt
View file @
7580b472
Function:
linear
_blend
Function:
combine
_blend
--Usage--
--Usage--
> combine_blend(image1: image, image2: image, combine: combine_mode)
> combine_blend(image1: image, image2: image, combine: combine_mode)
...
...
doc/function/copy_file.txt
View file @
7580b472
Function: copy_file
--Usage--
> copy_file(filename)
Copy a file from the export template package to the output directory.
If a file with the given name already exists it is overwritten.
Returns the name of the file written.
This function can only be used in an [[type:export template]], when <tt>create directory</tt> is true.
--Parameters--
! Parameter Type Description
| @input@ [[type:filename]] File to copy
--Examples--
> copy_file("logo.png") == "logo.png" # this file is now in the output directory
--See also--
| [[fun:write_text_file]] Write a text file to the output directory.
| [[fun:write_image_file]] Write an image file to the output directory.
doc/function/english_plural.txt
View file @
7580b472
Function: english_plural
--Usage--
> english_plural(some_word)
> english_singular(some_word)
Convert a word to the plural or singular form.
--Parameters--
! Parameter Type Description
| @input@ [[type:string]] String to convert
--Examples--
> english_plural("apple") == "apples"
> english_plural("berry") == "berries"
> english_singular("Red Horses") == "Red Horse"
doc/function/filter_text.txt
View file @
7580b472
Function: filter_text
--Usage--
> filter_text(some_string, match: regular expression, in_context: regular expression)
> filter_rule(match: ..., in_context: ...)(some_string)
Filter text by only keeping the parts of the input that match the regular expression.
If @in_context@ is given, the context must also match the string where the match is represented as <tt><match></tt>.
--Parameters--
! Parameter Type Description
| @input@ [[type:string]] String to replace in.
| @match@ [[type:regex]] Regular expression to match.
| @in_context@ [[type:regex]] (optional) Context to match
--Examples--
> filter_text(match: "a", "banana") == "aaa"
> filter_text(match: ".", in_context:"a<match>", "banana") == "nn"
> filter_text(match: "[xy]", "xyz") == "xy"
>
> f := filter_rule(match: "xx+")
> f("xyzxxyyzz") == "xx"
--See also--
| [[fun:replace|replace / replace_rule]]
Replace text matching a regular expression.
doc/function/masked_blend.txt
View file @
7580b472
Function:
linear
_blend
Function:
masked
_blend
--Usage--
--Usage--
> linear_blend(light: image, dark: image, mask: image)
> linear_blend(light: image, dark: image, mask: image)
...
...
doc/function/symbols_to_html.txt
View file @
7580b472
Function: symbols_to_html
--Usage--
> symbols_to_html(some_tagged_text)
Convert a [[type:tagged string]] to HTML code for use in web pages, entirely using a symbol font.
This is intended for fields with @always symbol:true@.
This function can only be used in an [[type:export template]], when <tt>create directory</tt> is true, as the images
of the font are written to the output directory.
--Parameters--
! Parameter Type Description
| @input@ [[type:tagged string]] String to convert to html
| @symbol_font@ [[type:string]] Name of a symbol font to use.
| @symbol_font_size@ [[type:double]] (optional) Size in points to use for the symbol font, default 12
--Examples--
> symbols_to_html("WU") == "<img src='data-dir/w.png' alt='W'><img src='data-dir/u.png' alt='U'>"
--See also--
| [[fun:to_html]] Convert [[type:tagged text]] to html.
doc/function/to_html.txt
View file @
7580b472
Function: to_html
--Usage--
> to_html(some_tagged_text)
Convert a [[type:tagged string]] to HTML code for use in web pages.
Characters are correctly escaped for HTML code.
The following tags are converted to html:
! Tag Description
| <tt><b></tt> Bold
| <tt><i></tt> Italic
| <tt><sym></tt> Symbols, if the @symbol_font@ parameter is set.
Symbol fonts can only be used in an [[type:export template]], when <tt>create directory</tt> is true, as the images
of the font are written to the output directory.
--Parameters--
! Parameter Type Description
| @input@ [[type:tagged string]] String to convert to html
| @symbol_font@ [[type:string]] (optional) Name of a symbol font to use for images.
| @symbol_font_size@ [[type:double]] (optional) Size in points to use for the symbol font, default 12
--Examples--
> to_html("<b>bold text</b>") == "<b>bold text</b>"
> to_html("<sym>WU</sym>") == "<img src='data-dir/w.png' alt='W'><img src='data-dir/u.png' alt='U'>"
--See also--
| [[fun:symbols_to_html]] Convert text to html using a [[type:symbol font]].
| [[fun:to_text]] Remove all tags from tagged text.
doc/function/to_text.txt
View file @
7580b472
Function: to_text
--Usage--
> to_text(some_tagged_text)
Convert a [[type:tagged string]] to a normal string by removing all tags and restoring escaped < characters.
--Parameters--
! Parameter Type Description
| @input@ [[type:tagged string]] String to convert to text
--Examples--
> to_text("<b>bold text</b>") == "bold text"
--See also--
| [[fun:to_html]] Convert [[type:tagged text]] to html.
doc/function/write_image_file.txt
View file @
7580b472
Function: write_image_file
--Usage--
> write_image_file(some_image, file: filename)
Write an image to a file in the output directory.
If a file with the given name already exists it is overwritten.
Returns the name of the file written.
This function can only be used in an [[type:export template]], when <tt>create directory</tt> is true.
--Parameters--
! Parameter Type Description
| @input@ [[type:image]] Image to write to the file.
| @file@ [[type:string]] Name of the file to write to
| @width@ [[type:int]] Width in pixels to use for the image, by default the size of the image is used if available.
| @height@ [[type:int]] Height in pixels to use for the image, by default the size of the image is used if available.
--Examples--
> write_image("image_out.png", linear_blend(...)) == "image_out.png" # image_out.png now contains the given image
--See also--
| [[fun:write_text_file]] Write a text file to the output directory.
doc/function/write_text_file.txt
View file @
7580b472
Function: write_text_file
--Usage--
> write_text_file(some_string, file: filename)
Write a string to a file in the output directory.
If a file with the given name already exists it is overwritten.
Returns the name of the file written.
This function can only be used in an [[type:export template]], when <tt>create directory</tt> is true.
--Parameters--
! Parameter Type Description
| @input@ [[type:string]] Text to write to the file.
| @file@ [[type:string]] Name of the file to write to
--Examples--
> write_file("index.html", lots_of_html_code) == "index.html" # index.html now contains the given text
--See also--
| [[fun:write_image_file]] Write an image file to the output directory.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment