sixarm_ruby_html

SixArm.com » Unix » HTML helpers for layouts, lists, tables, etc.

https://github.com/sixarm/sixarm_ruby_html

Science Score: 44.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (7.1%) to scientific vocabulary

Keywords

extensions gem html ruby

Keywords from Contributors

names
Last synced: 4 months ago · JSON representation ·

Repository

SixArm.com » Unix » HTML helpers for layouts, lists, tables, etc.

Basic Info
  • Host: GitHub
  • Owner: SixArm
  • License: other
  • Language: Ruby
  • Default Branch: main
  • Homepage: http://sixarm.com
  • Size: 391 KB
Statistics
  • Stars: 0
  • Watchers: 2
  • Forks: 0
  • Open Issues: 0
  • Releases: 0
Topics
extensions gem html ruby
Created over 15 years ago · Last pushed 9 months ago
Metadata Files
Readme Changelog Contributing License Code of conduct Citation Codeowners

README.md

SixArm.com → Ruby →
HTML utility methods to generate lists, tables, etc.

Introduction

HTML utility methods to generate well-formed HTML for tables, lists, etc.

This is typically to render Ruby objects, such as arrays, as HTML output.

For docs go to http://sixarm.com/sixarm_ruby_html/doc

Want to help? We're happy to get pull requests.

Install

Gem

To install this gem in your shell or terminal:

gem install sixarm_ruby_html

Gemfile

To add this gem to your Gemfile:

gem 'sixarm_ruby_html'

Require

To require the gem in your code:

require 'sixarm_ruby_html'

Table Methods

  • table - Builds an HTML table from the supplied parameters: string CSS: ID, Class; array of strings: Headers, Footers; array of array of string: Rows
  • tables - Builds one or more HTML tables from a supplied array of arrays (each sub-array holding the params specified for the table method)
  • thead - Builds the thead section of a table from an array of strings
  • th - Returns a TH table cell
  • ths - Returns a string of TH table cells
  • tbody - Builds the tbody section of a table from an array of arrays of strings (each sub-array becomes a table row)
  • tr - Returns a TR table row
  • trs - Returns a string of TR table rows
  • td - Returns a TD table cell
  • tds - Returns a string of TD table cells
  • tfoot - Builds the tfoot section of a table from an array of strings

Table Examples

headers = ['a','b','c']
footers = ['x','y','z']
rows=[['d','e,'f']]
table(:id=>'foo', :class=>'bar', :headers=>headers, :footers=>footers, :rows=>rows)
=>
<table id="foo" class="bar">
<thead>
<tr>
<th>a</th>
<th>b</th>
<th>c</th>
</tr>
</thead>
<tbody>
<tr>
<td>d</td>
<td>e</td>
<td>f</td>
</tr>
</tbody>
<tfoot>
<tr>
<th>x</th>
<th>y</th>
<th>z</th>
</tr>
</tfoot>
</table>

List Methods

  • ul - Builds an HTML unordered list from an array of strings or Enumerables
  • uls - Builds one or more HTML unordered lists from an array of arrays of strings or Enumerables (sub-arrays can be a mix of both)
  • li - Returns an LI item
  • lis - Returns a string of LI items

List Examples

ul(['a','b','c']) =>
<ul><li>a</li><li>b</li><li>c</li></ul>

uls(['a','b','c'],['d','e','f'],[1,2,3]) =>
<ul><li>a</li><li>b</li><li>c</li></ul><ul><li>d</li><li>e</li><li>f</li></ul><ul><li>1</li><li>2</li><li>3</li></ul>

Misc Methods

  • comment - Return the text parameter wrapped in an HTML comment
  • wrap - Return the text parameter wrapped in a tag pair

Misc Examples

comment('the following comes from') =>
<!-- the following comes from -->

wrap('foo', 'bar') =>
<bar>foo</bar>

Owner

  • Name: SixArm
  • Login: SixArm
  • Kind: organization
  • Email: sixarm@sixarm.com
  • Location: San Francisco

SixArm Software

Citation (CITATION.cff)

cff-version: 1.2.0
title: SixArm.com → Ruby → <br> HTML utility methods to generate lists, tables, etc.
message: >-
  If you use this work and you want to cite it,
  then you can use the metadata from this file.
type: software
authors:
  - given-names: Joel Parker
    family-names: Henderson
    email: joel@joelparkerhenderson.com
    affiliation: joelparkerhenderson.com
    orcid: 'https://orcid.org/0009-0000-4681-282X'
identifiers:
  - type: url
    value: 'https://github.com/SixArm/sixarm_ruby_html/'
    description: SixArm.com → Ruby → <br> HTML utility methods to generate lists, tables, etc.
repository-code: 'https://github.com/SixArm/sixarm_ruby_html/'
abstract: >-
  SixArm.com → Ruby → <br> HTML utility methods to generate lists, tables, etc.
license: See license file

GitHub Events

Total
  • Push event: 1
Last Year
  • Push event: 1

Committers

Last synced: 6 months ago

All Time
  • Total Commits: 96
  • Total Committers: 2
  • Avg Commits per committer: 48.0
  • Development Distribution Score (DDS): 0.01
Past Year
  • Commits: 1
  • Committers: 1
  • Avg Commits per committer: 1.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
Joel Parker Henderson j****l@j****m 95
Joel Parker Henderson j****l@s****m 1
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 0
  • Total pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Total issue authors: 0
  • Total pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 0
  • Pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 0
  • Pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
Pull Request Authors
Top Labels
Issue Labels
Pull Request Labels