Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nfultz/askgitdbi
a DBI wrapper around askgit
https://github.com/nfultz/askgitdbi
Last synced: about 1 month ago
JSON representation
a DBI wrapper around askgit
- Host: GitHub
- URL: https://github.com/nfultz/askgitdbi
- Owner: nfultz
- Created: 2021-08-05T03:04:22.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2021-08-05T03:09:06.000Z (over 3 years ago)
- Last Synced: 2024-08-13T07:11:42.891Z (4 months ago)
- Language: R
- Size: 6.84 KB
- Stars: 4
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.Rmd
Awesome Lists containing this project
- jimsghstars - nfultz/askgitdbi - a DBI wrapper around askgit (R)
README
---
output: github_document
---```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
```# askgit
This is a very quick DBI wrapper around the most excellent [askgit](https://github.com/askgitdev/askgit)
program, which has an undocumented SQLite extension mode.**WIP / DO NOT USE FOR CRITICAL JOBS**
## Installation
Ideally one could install the development version of the askgit DBI wrapper via:
``` r
remotes::install_github("nfultz/askgitdbi")
```However, I have no idea if it would work with submodules. Also you need the
appropriate golang tools as well as libgit2.## Example
This is a basic example which shows you how to query a repo:
```{r example}
library(DBI)con <- dbConnect(askgit::AskGit(), ":memory:")
dbGetQuery(con, "select hash, author_name from commits order by committer_when desc limit 3")
```
The below is a less contrived example:
```{r}
require(ggplot2)"select author_name, count(hash) as n
from commits('../DeclareDesign')
where message not like 'Merge%'
group by 1
order by 2 desc
limit 4" |>
dbGetQuery(conn=con) |>
ggplot() + aes(x=author_name, y=n) + geom_col()```