Perchance is a tool for creating and sharing custom random generators. It enables users to generate random outputs using a user-friendly syntax, suitable for both simple and complex tasks.
List Creation and Referencing: Users create lists of items and reference these lists in templates to randomly select items. For example, users can define a list of objects and then use a template to generate random outputs from this list. The template system supports varying probabilities by assigning different weights to items.
Advanced Text Generation: The platform allows modifications such as capitalization, pluralization, and tense. This feature is useful for producing dynamic and varied text outputs.
Import and Integration: Users can import generators from others, allowing for collaborative and integrated projects. This feature extends the functionality and versatility of individual generators.
Export and Embedding: Generators can be exported as HTML files, embedded in websites, or turned into bots for Twitter or Tumblr. These options provide flexibility in how generators are used and shared.
Perchance is built using HTML, CSS, and JavaScript. This choice reflects a goal of engaging users with coding through a practical and accessible interface.
Creating a Generator: Define lists of items and reference them in a template. For example:
output
Your \[pack\] contains \[item\], \[item\] and \[item\].
item
a few coins
an old \{silver|bronze\} ring
a handkerchief
a shard of bone
some lint
a tin of tea leaves
pack
purse
backpack
bag
pack
knapsack
rucksack
Adjusting Odds: Modify item probabilities by adding weights:
pack
purse
backpack ^2
bag
Importing Generators: Integrate other generators with import syntax:
sentence
I need a new \{import:noun\}.
Quickly, \{import:verb\}!
Customizing Output: Change text properties such as case:
sentence
\[name.titleCase\], can you hear me?
HELLO, \[name.upperCase\]!
name
patricia
khalid
anaya
Join the Lemmy community for discussions and support. Explore the useful generators list for additional resources.
This summary provides a structured overview of Perchance’s features and usage, offering users the information needed to create and manage random generators effectively.