Git Product home page Git Product logo

pathogen's Introduction

pathogen

Build Status Coverage

Pathogen provides a generic templated filesystem entry generator. While written in Go and using Go template syntax, pathogen is completely agnostic with regard to the type and format of the generated filesystem entries.

Usage

An example pathogen template repository and usage is provided here.

Contributing

  1. Fork this repository into your GitHub account.
  2. Clone your fork locally (git clone https://github.com/<account>/pathogen && cd pathogen).
  3. Create your feature branch (git checkout -b feature).
  4. Make changes and add them (git add .).
  5. Commit your changes (git commit -m 'add feature that does things').
  6. Push to the branch (git push origin feature).
  7. Create new pull request.

pathogen's People

Contributors

joshua-rutherford avatar roostergator avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

pathogen's Issues

Example command does not work using commit/5d55b46e93721e913830c35f361801cbd41f81d2

When going with all defaults, I get the following error:

$ make build
--> Vendoring dependencies...
--> Building binary...


$ pathogen generate [email protected]:galaho/pathogen.git//example ./example

        Enter the first name of a person [Moe](^[A-Z].*$): 
Variable does not match expected pattern.
Enter the first name of a person [Moe](^[A-Z].*$): 
Enter the last name of a person [Howard](^[A-Z].*$): 
Enter a comma separated list of partners for the person [Larry Fine,Curly Howard](): 
Error: error walking repository: error processing file [/private/var/folders/q1/c9dc2n616jd1tr2gm80z764w0000gn/T/0b1314a30e60833777f29a8523c0ce2d/{{ variable "firstName" | lower }}-{{ variable "lastName" | lower }}.yaml]: error rendering template file [{{ variable "firstName" | lower }}-{{ variable "lastName" | lower }}.yaml]: error parsing template: template: :5: function "sort" not defined
Usage:
  pathogen generate REPOSITORY DESTINATION [flags]

Flags:
  -h, --help           help for generate
  -i, --input string   file for non-interactive variable resolution

error walking repository: error processing file [/private/var/folders/q1/c9dc2n616jd1tr2gm80z764w0000gn/T/0b1314a30e60833777f29a8523c0ce2d/{{ variable "firstName" | lower }}-{{ variable "lastName" | lower }}.yaml]: error rendering template file [{{ variable "firstName" | lower }}-{{ variable "lastName" | lower }}.yaml]: error parsing template: template: :5: function "sort" not defined

Add output file of manually input answers, add ability to process a file containing those answers

If we use this tool to build out files from templates it would be helpful 1) to output a file containing the manually input answers
2) add ability to process input file

These changes would be helpful if the template changes then we could continue to use the same input values to generate updated files.

Example usage: generate 1.1 config files for proxy and listener. in 1.2 the some fields that were defined in proxy file are moved to listener file. If we have the answers file used to generate the 1.1 configs then we can just apply that to the 1.2 templates.

This is not so bad when we have 10 services but if an organization had 1000 services the update process would be a real time sink

pathogen doesn't read in and process traditional YAML for input

If I have a set of templates that define two people, person1 and person2, it would be nice to be able to pass in a YAML file that has indention formatting.

For example, if my template looked like this:

team: {{ variable "team" }}
person1:
  name:  {{ variable "person1.name" }}
  email: {{ variable "person1.email" }}
  favorite drink: {{ variable "person1.drink" }}

person2:
  name:  {{ variable "person2.name" }}
  email: {{ variable "person2.email" }}
  favorite drink: {{ variable "person2.drink" }}

Then the input file may look something like this:

team: winners
person1:
  name: chris
  email: [email protected]
  drink: bourbon
person2:
  name: josh
  email: [email protected]
  drink: warm beer

Currently, this type of input file in not supported and pathogen will fail to use the inputs.

Also of note, if this type of input is provided even with a valid team value, pathogen will still prompt for team.

Document Install Steps

Currently, there is no documentation on how to install Pathogen. Releases are available but they are not referenced in the README at all.

version flag isn't yielding helpful results

I pulled a recent release and checked the version

curl -L -O https://github.com/galaho/pathogen/releases/download/v0.3.1/pathogen.linux.tar.gz
tar -xvzf pathogen.linux.tar.gaz
./bin/pathogen.linux

results

pathogen  ()

The same results were produced from

git clone https://github.com/galaho/pathogen.git
cd pathogen/
make
cd bin
./pathogen.linux

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.