Giter Club home page Giter Club logo

yagg's Introduction

yagg

Yet Another Git Gist is a no-database public git-gist.

Utility

It's an user-friendly web-app designed primarily to keep a record of text snippets using light-weight git. Gists can be created and shared locally (for e.g. in an organization). The changes can be tracked easily. One can also view the list of gists and edit, delete, download, remove etc. as required.

Installation

  • Install cmake from brew or apt-get package manager. To build from source, follow this link

  • Install libgit2 as follows :

      $ wget https://github.com/libgit2/libgit2/archive/v0.23.4.tar.gz
      $ tar xzf v0.23.4.tar.gz
      $ cd libgit2-0.23.4/
      $ cmake .
      $ make
      $ sudo make install
    
  • Install go packages as folloes :

      $ go get github.com/libgit2/git2go
    
  • Build the project using :

      $ go build
    
  • Troubleshooting:-
    ImportError: libgit2.so.0: cannot open shared object file: No such file or directory
    This happens for instance in Ubuntu, the libgit2 library is installed within the /usr/local/lib directory, but the linker does not look for it there. To fix this call

      $ sudo ldconfig
    

Server Side Commands:

yagg  [-b] [-h] [-p] [-r]

Options:

-h Used for getting the usage of the flags.

-r path/to/save/repo Used to set the repository path where the git-gist repository will be saved. If nothing is specified, data folder in the present working directory will be set as the default path.

-p port-number Used to specify the port used by YAGG. Port 8080 will be used by default.

-b host-name Used to set the hostname for the server. If nothing is specified, 0.0.0.0 will be used as the host.

How to use:

  • Run the server at 0.0.0.0:8080 using command :

    $ yagg -b 0.0.0.0 -p 8080
    
  • Let's create our first gist main.go

    • http://0.0.0.0:8080/

    Create-gist-image

  • View

    • http://0.0.0.0:8080/show/gist-name
    • http://0.0.0.0:8080/show-by-id/gist-name/commit-id

    View-gist-image

  • Edit

    • http://0.0.0.0:8080/edit/gist-name

    Edit-gist-image

  • Track the changes

    • http://0.0.0.0:8080/history/gist-name

    History-gist-image

  • Generate raw file

    • wget http://0.0.0.0:8080/raw/gist-name

    • wget http://0.0.0.0:8080/raw-by-id/gist-name/commit-id

    Raw-gist-image

  • Download

    -http://0.0.0.0:8080/download/gist-name

    -http://0.0.0.0:8080/download-by-id/gist-name/commit-id

  • Delete

    -http://0.0.0.0:8080/remove/gist-name

  • View all:

    -http://0.0.0.0:8080/list

    List-gist-image

To-do:

  • Sorting gists in the list page based on options like last updated, etc. Currently gists are sorted in the order of gist-name
  • Search field to be included
  • Option of uploading a file as a gist
  • Creating user-specific gists
  • User Interface to be enhanced

References

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.