Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/stewid/gix
An R package to search a Git repository
https://github.com/stewid/gix
Last synced: 27 days ago
JSON representation
An R package to search a Git repository
- Host: GitHub
- URL: https://github.com/stewid/gix
- Owner: stewid
- License: gpl-2.0
- Created: 2014-09-13T20:52:38.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2014-10-14T19:45:39.000Z (about 10 years ago)
- Last Synced: 2024-06-12T18:16:34.680Z (5 months ago)
- Language: R
- Homepage:
- Size: 266 KB
- Stars: 9
- Watchers: 3
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.Rmd
- License: LICENSE
Awesome Lists containing this project
README
[![Build Status](https://travis-ci.org/stewid/gix.png)](https://travis-ci.org/stewid/gix)
# Introduction
`gix` is an R package that aims to index and search a Git repository
using the [Xapian](http://xapian.org/) search engine.## Index a repository
Index the content of a git repository to documents with the Xapian
search engine. A `document` is the data returned from a search. The
indexing creates a database located in the `.xapian` folder in the
repository.```{r, index, message=FALSE}
library(gix)## Index the 'gix' repository. (Current directory)
gixit(".", github = "stewid/gix")
```## Search a repository
```{r, search_author, message=FALSE}
## Search for author Widgren and display url to blob on GitHub
gix(".", "author:widgren")$url
``````{r, search_sha, message=FALSE}
## Search for sha that starts with 'd7'
gix(".", "sha:d7*")[, c("sha", "url")]
``````{r, search_content, message=FALSE}
## Search for 'biarch' and view date of author commit and url
gix(".", "biarch")[, c("when", "url")]
```## Installation
The following two R packages must be installed:
- [xapr](https://github.com/stewid/xapr)
- [git2r](https://github.com/ropensci/git2r)To install the development version of `gix`, it's easiest to use the
devtools package:```{r, install, eval = FALSE}
# install.packages("devtools")
library(devtools)
install_github("stewid/gix")
```
Another alternative is to use `git` and `make````
$ git clone https://github.com/stewid/gix.git
$ cd gix
$ make install
```**NOTE:** The package is in a very early development phase. Functions
and documentation may be incomplete and subject to
change. Suggestions, bugs, forks and pull requests are
appreciated. Get in touch.# License
The `gix` package is licensed under the GPL (>= 2). See these files
for additional details:- [LICENSE](LICENSE) - `gix` package license