GithubHelp home page GithubHelp logo

alishalabi / syntax-helper Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 39.81 MB

Command line interface to help generate proper code syntax, pulled from documentation

License: Apache License 2.0

Go 96.03% Makefile 3.97%

syntax-helper's Introduction

Maintenance Ask Me Anything ! Documentation Status GitHub issues Awesome Badges LicenseGo Report Card

Syntax Helper CLI

Syntax Helper is a CLI that helps developers quickly get access to built-in code syntax. Syntax Helper supports a variety of code packages for both Golang and Python. Data is scrapped directly from https://golang.org/pkg/ & https://docs.python.org/3/library/.

Installation

Install locally using:

git clone [email protected]:alishalabi/syntax-helper.git

Install using go get command:

go get github.com/alishalabi/syntax-helper

Usage

asciicast

  • Note: All functionality requires broadband connection

Get all Golang functions for given package name:

./syntax-helper golang <pkg-name>

Example:

$ ./syntax-helper golang unsafe                
func Alignof(x ArbitraryType) uintptr
func Offsetof(x ArbitraryType) uintptr
func Sizeof(x ArbitraryType) uintptr
type ArbitraryType
type Pointer

Get syntax for specific public function from package (Note: function names all begin with a capital letter)

./syntax-helper golang <pkg-name> <function-name>

Example:

$ ./syntax-helper golang unsafe Offsetof
Function Syntax:
func Offsetof(x ArbitraryType) uintptr
For Synatx example:
$ ./syntax-helper golang unsafe Offsetof example

Get example of specific public function from package (Note: function names all begin with a capital letter)

./syntax-helper golang <pkg-name> <function-name> example

Example:

$ ./syntax-helper golang fmt Fprintf example    
Function Example:
package main

import (
	"fmt"
	"os"
)

func main() {
	const name, age = "Kim", 22
	n, err := fmt.Fprintf(os.Stdout, "%s is %d years old.\n", name, age)

	// The n and err return values from Fprintf are
	// those returned by the underlying io.Writer.
	if err != nil {
		fmt.Fprintf(os.Stderr, "Fprintf: %v\n", err)
	}
	fmt.Printf("%d bytes written.\n", n)

}

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

Milestones

  • Generate skeleton structure
  • Implement Golang command
  • Implement Golang package parameter
  • Implement Golang function parameter
  • Implement Golang function example parameter
  • Implement Go-Colly to populate messages
  • Implement Python command
  • Implement Python package parameter
  • [] Implement Python function parameter
  • [] Implement Python function example parameter
  • Finalize ReadMe.md
  • Implement badges
  • [] Deploy as Homebrew package

License

Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

ForTheBadge built-with-love

syntax-helper's People

Contributors

alishalabi avatar

Watchers

James Cloos avatar  avatar

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.