generate.name

command module
v0.0.0-...-1495e9f Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 6, 2024 License: MIT Imports: 4 Imported by: 0

README

generate.name

Go Report Card GoDoc License MIT

A Generator-Generator

Fields on the edit page

Each generator has Name, Template, Key and Field1 to Field6 input fields.

Name

The name field is used to generate the slug, the slug is not changed if you update the name.

Template

The template field should contain a Golang text/template. Example: {{.Field1}}, {{.Field2}}

You can also use a few predefined tags in both the template and each individual field:

  • [BR] - Inserts a <br>
  • [D] - Random number from 1-9
  • [ROMAN10] - Random roman numeral from 1-10
  • [END] - End the generated string
  • [GENERATE slug] - Generates string based on generator identified by slug
Key

A key used to lock down editing of the generator. (Optional, but a generator without a key can be edited by anyone)

You need to pass in the key as a query parameter in order to show the edit button: http://generate.name/<generator-slug>?key=<your-key>

Field1 - Field6

The fields used by the template.

License (MIT)

Copyright (c) 2015-2020 Peter Hellberg

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
stores

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL