• Stars
    star
    111
  • Rank 314,510 (Top 7 %)
  • Language
    Go
  • License
    MIT License
  • Created almost 8 years ago
  • Updated over 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Rebecca is a readme generator for Go

Rebecca

Rebecca is a readme generator.

Managing the GitHub readme for your Go project can be a drag. When creating jennifer I found examples copied into the markdown would get out of date, and documentation was duplicated. I created rebecca to solve this: see README.md.tpl in the jennifer repo for a real world example.

Install

go install github.com/dave/rebecca/cmd/becca@latest

Usage

becca [-package={your-package}]

Rebecca will read README.md.tpl and overwrite README.md with the rendered template. The package specified on the command line is parsed (if no package is specified, it is detected from the current working directory).

The package is scanned for examples and documentation. Rebecca uses the Go template library, and adds some custom template functions:

Example

{{ "ExampleFoo" | example }}

This prints the code and expected output for the ExampleFoo example.

Doc

{{ "Foo" | doc }}

This prints the documentation for Foo. All package level declarations are supported (func, var, const etc.)

{{ "Foo.Bar" | doc }}

This prints the documentation for the Bar member of the Foo type. Methods and struct fields are supported.

You can also specify which sentances to print, using Go slice notation:

{{ "Foo[i]" | doc }}
{{ "Foo[i:j]" | doc }}
{{ "Foo[i:]" | doc }}
{{ "Foo[:i]" | doc }}

See here and here for real-world examples of this.

Code, Output

{{ "ExampleFoo" | code }}

This prints just the code for the ExampleFoo example.

{{ "ExampleFoo" | output }}

This prints just the expected output for the ExampleFoo example.

More Repositories

1

jennifer

Jennifer is a code generator for Go
Go
3,055
star
2

dst

Decorated Syntax Tree - manipulate Go source with perfect fidelity.
Go
1,165
star
3

jsgo

GopherJS compiler, serving framework and CDN.
Go
267
star
4

blast

Blast is a simple tool for API load testing and batch jobs
Go
213
star
5

courtney

Courtney is a coverage tool for Go
Go
150
star
6

wasmgo

Compiles Go to WASM and deploys to the jsgo.io CDN
Go
145
star
7

play

jsgo playground: edit and run Go code in the browser, supporting arbitrary import paths
Go
50
star
8

brenda

Brenda is a boolean expression solver for Go AST
Go
44
star
9

html2vecty

Translate html to vecty syntax
Go
12
star
10

asm

High level assembly DSL
Go
8
star
11

forky

A tool to automate forking and modifying codebases
Go
7
star
12

services

Services for interacting with remote services (gcs, git, http etc.) shared between jsgo, play and frizz.
Go
7
star
13

youtube

Tool to upload videos directly from Google Drive to YouTube
Go
6
star
14

govpn

Go
5
star
15

libify

Convert any Go command line app into a library
Go
5
star
16

dropper

GopherJS package to accept files by drag+drop
Go
5
star
17

gpx

Quick util to manipulate GPX files
Go
4
star
18

flux

Vecty flux library
Go
4
star
19

stablegob

Fork of encoding/gob, with deterministic binary output
Go
4
star
20

dontstayin

I created dontstayin.com back in 2003. We peaked in 2005 with 10 employees, 1.5m uniques & 50m page views per month. We sold the company in 2009 and it was shut down by the new owners in 2012. You can see a documentary filmed in the early days here: https://vimeo.com/24485226. The code is here purely for posterity - it is filled with horrors.
C#
4
star
21

golib

Go
3
star
22

jast

jast is an experimental tool for converting AST to jennifer
Go
2
star
23

patsy

Patsy is a package helper for Go.
Go
2
star
24

kerr

Go errors, but a bit more testable
Go
2
star
25

gopackages

Go utils for for package paths, package names and file paths
Go
2
star
26

sorter

Simplify sorting in Go
Go
2
star
27

frizz

The frizz editor - not ready for public consumption yet
Go
2
star
28

groupshare

Group Share
Dart
2
star
29

astrid

Astrid is a collection of AST utilities for Go
Go
2
star
30

splitter

GopherJS wrapper for Split.js
Go
1
star
31

img

Compress image files in the browser with GopherJS - jsgo.io/dave/img
Go
1
star
32

protod

Protocol Buffer Deltas
Dart
1
star
33

iot

Go
1
star
34

saver

GopherJS package to save files using the FileSaver.js library
Go
1
star
35

dbcombo

DbCombo was mildly successful when I launched in 2001, but it was shut down and deleted in about 2006. I was amazed to find we still have an active user in 2017!
C#
1
star
36

geny

A code generator for Go
Go
1
star
37

refreshable_reorderable_list

A fork of ReorderableList which adds the physics property needed for RefreshIndicator to work
Dart
1
star
38

cfag-server

Dockerfile
1
star
39

oak

A generic CMS in Meteor
JavaScript
1
star
40

scrapy

Web scraper test project
Go
1
star
41

wildernessprime

CSS
1
star