Skip to content

A weird little C program to fetch your stared repos and mount to a directory

License

MPL-2.0, Unknown licenses found

Licenses found

MPL-2.0
LICENSE.md
Unknown
COPYING.md
Notifications You must be signed in to change notification settings

dmolik/githubfs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GitHubFS

I got curious over the weekend and wonder what it would be like to query the GitHub API in C using libCurl. I quickly realized I was going to need a JSON parser, so I reached for libfastjson, which is a fork of json-c brought to us by the rsyslog folks.

The project has evolved! it now mounts a full list of your stared repos to a directory of your choosing using Fuse.

The code has now been refactored to use LMDB for persistence, and Repo access.

Prerequisites

You're going to need a; Compiler, Make of some sort, libfastjson with headers, and libcurl with it's headers, libfuse, and now lmdb with it's headers.

Building

All you need to do is run:

make

Running

The fetcher needs two environment variables GH_USER; your github username, and GH_TOKEN; a personal access token to your public repos. Execution might look something like this:

export GH_USER=dmolik
export GH_TOKEN=<redacted>
./githubfs <some dir>

For example:

> export GH_USER=dmolik
> export GH_TOKEN=example123
> ./githubfs t

> githubfs t
t
├── aalhour
│   └── awesome-compilers
├── acassen
│   └── keepalived
├── adapta-project
│   └── adapta-gtk-theme
├── admiraltyio
│   └── multicluster-scheduler
└── AidoP
    └── Skypaper

> cat t/acassen/keepalived
URL: git@github.com:acassen/keepalived.git
Description: Keepalived

About

A weird little C program to fetch your stared repos and mount to a directory

Topics

Resources

License

MPL-2.0, Unknown licenses found

Licenses found

MPL-2.0
LICENSE.md
Unknown
COPYING.md

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published