/headlines

Primary LanguageGoApache License 2.0Apache-2.0

Headlines

This is a simple little application that generates headlines based on random strings contained in data files. It acts to create MabLibs-like sentences that mimic some of the nonsense headlines we've been having since 2020 started.

Extending

The folder data contains a series of files that contains lists of different types. You can add more random headline parts here to make more headline possibilities.

Example

package main

import (
	"fmt"
	"math/rand"
	"time"

	"github.com/tpryan/headlines"
)

func main() {


	err := headlines.LoadCache("../../data")
	if err != nil {
		fmt.Printf("err: %s\n", err)
	}

	h, err := headlines.New()
	if err != nil {
		fmt.Printf("err: %s\n", err)
	}
	fmt.Printf("%s\n", h.Sprint())

}

This is not an official Google Product.