Code Monkey home page Code Monkey logo

cli-github's Introduction

cli-github

A Command-Line Python Application to display Github from the CLI ! License

Version Downloads
PyPI version PyPi downloads

gif

Installation

Using pip

pip install cli-github

Get the latest build from the Source

  • Clone the repo git clone https://github.com/harshasrinivas/cli-github.git
  • Run python setup.py install

Building debian package

  • Clone the repo.
  • Execute bash build_deb/build_deb.sh

Dependencies

  • prettytable pip install prettytable
  • future pip install future
  • python-dateutil pip install python-dateutil

Setting Up

Github Token as Temporary Environment Variable

$ GITHUB_TOKEN=<your-token-with-quotes>

Github Token as Permanent Environment Variable

$ echo "export GITHUB_TOKEN=<your-token-with-quotes>" | sudo tee -a /etc/environment

Without saving your Environment Variable

$ cat cli_github/mains.py | sed -e "s/API_TOKEN = os.environ.get('GITHUB_TOKEN')/API_TOKEN = <your-token-with-quotes>/" > cli_github/mains.py


Options

-h, --help          show this help message and exit
-n URL, --url URL   
					Get repos from the user profile URL/USERNAME
-r RECURSIVE, --recursive RECURSIVE
                    Get the file structure from the repo link URL
-R README, --readme README
                    Get the raw version of the repository readme file from repo link URL
-re RELEASES, --releases RELEASES
                 	Get the list of releases from repo link
-dt TARBALL, --tarball TARBALL
                    Download the tarball from repo link
-dz ZIPBALL, --zipball ZIPBALL
					Download the zipball from repo link
-op OPENFILE, --openfile OPENFILE
                    Show the contents of the given file in a repo
-f FOLLOWERS, --followers FOLLOWERS
                    Get followers of the user
-fo FOLLOWING, --following FOLLOWING
                    Get people following the user
-c CONTRIBUTORS, --contributors CONTRIBUTORS
                   	Get contributors of a repo

Usage

Display the list of a user's repositories from the username/URL, along with the number of stargazers

$ cli-github -n harshasrinivas

Display all the files and folders within a repository recursively from the repository URL, along with their sizes

$ cli-github -r harshasrinivas/cli-github

Get the RAW version of the readme file of a repository from the repository URL

$ cli-github -R harshasrinivas/cli-github

Get the list of releases from the user's repo link

$ cli-github -re harshasrinivas/cli-github

Download the tarball of the any repo

$ cli-github -dt harshasrinivas/cli-github

Download the zipball of the any repo

$ cli-github -dz harshasrinivas/cli-github

List the contents of the given folder

$ cli-github -op harshasrinivas/cli-github/setup.py

Get the list of followers of the user

$ cli-github -f harshasrinivas

Get the list of people following the user

$ cli-github -fo harshasrinivas

Get the contributors of a repo

$ cli-github -fo harshasrinivas/cli-github

Live Demo

DEMO : Display the list of a user's repositories from the username/URL, along with the number of stargazers

DEMO : Display all the folders and files within a repository recursively from the repository URL, along with their sizes

DEMO : To get the RAW version of the readme file of a repository from the repository URL

DEMO : To get the list of releases from the user's repository URL

DEMO : Download the tarball from the user's repository URL

DEMO : Download the zipball from the user's repository URL

DEMO : Show the contents of a given file/folder

DEMO : List the followers of a user

Contribute

If you want to add features, improve them, or report issues, feel free to send a pull request.

Contributors

cli-github's People

Contributors

bryant1410 avatar harshasrinivas avatar pratik151 avatar sanketdg avatar spockuto avatar ssundarraj avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cli-github's Issues

Content of any file

Right now only the contents of the README can be seen, this can be extended to other files.

Don't need metadata for rst files

The project currently uses two readme files, a README.md and a README.rst. We dont need both.
To allow the project description to be displayed in the pypi project page, we would only need one of them. If we use, README.md we need to add it to [metadata] in setup.cfg, but if we use ReST, we wouldn't need any [metadata].

No tests

Whats the point of having continuous integration without having any tests at all?!

cli-github -n does not work

I was unable to get cli-github -n to work...

$ cli-github -n robbyoconnor
Enter a valid URL. For help, type 'cli-github -h'

Multiple commits

Why are there continuous commits with the same commit message and code diff?

Use pypandoc to eliminate need of README.rst

@harshasrinivas Hi, I was wondering if README.rst could be removed from the source if pypandoc is used?

Something like this in setup.py -

try:
    import pypandoc
    long_description = pypandoc.convert('Readme.md', 'rst')
except(IOError, ImportError):
    long_description = open('Readme.md').read()

Will this work?

not able to auth

➜  ~  cli-github -n sindhus
------------------------------------------------------------------------------------------------------------------------------------------------------
Invalid Credentials. For help, type 'clipy-github -h'
------------------------------------------------------------------------------------------------------------------------------------------------------
➜  ~  source ~/.zshrc
git_cmd=git
➜  ~  echo $GITHUB_TOKEN
<redacted>
➜  ~  cli-github -n sindhus
------------------------------------------------------------------------------------------------------------------------------------------------------
Invalid Credentials. For help, type 'clipy-github -h'
------------------------------------------------------------------------------------------------------------------------------------------------------
➜  ~  clipy-github -h
zsh: command not found: clipy-github

Am pretty sure I've set the the GITHUB_TOKEN env var and what's clipy-github -h? shouldn't it be cli-github -h?

What am I missing here with regards to credentials here that I can't use your module?
Thanks.

Argparse in setup

argparse is include by default in most python distributions. You don't need to include it in the requirements.

Invalid Credentials

I installed it using pip as mentioned and consequently tried running it but it gave me an error "INVALID CREDENTIALS", I am sorry but am I missing something?

Here is the screenshot for a quick look -

http://cl.ly/image/303K1g3N1s1n

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.