Metadata-Version: 2.1
Name: glink2
Version: 0.1.1
Summary: UNKNOWN
Home-page: https://github.com/Cologler/glink-python
Author: Cologler
Author-email: skyoflw@gmail.com
License: MIT License
Platform: UNKNOWN
Classifier: Development Status :: 5 - Production/Stable
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Description-Content-Type: text/markdown
Requires-Dist: PyGithub (<2.0,>=1.53)
Requires-Dist: click-anno (<0.2.0,>=0.1.1)
Requires-Dist: click-log (<0.4.0,>=0.3.2)
Requires-Dist: filelock (<4.0.0,>=3.0.12)
Requires-Dist: requests (<3.0.0,>=2.25.0)
Requires-Dist: sqlitedict (<2.0.0,>=1.7.0)
Requires-Dist: typeguard (<3.0.0,>=2.10.0)
Requires-Dist: xdg (<6.0.0,>=5.0.1)

# glink

Sync files between gist and localhost.

## Purpose

When I clone a lot of repos and found a lot of interesting code file,
I can simplily push them to my gist via `glink`.

After I pull all the above repos,
I can simplily update all my gists via one single command (`glink sync`).

`glink` store sync states in `~/.config/Cologler/glink/...`,
which mean if you move the linked file,
it will lose the connection.

Try [gist-sync](https://github.com/Cologler/gist-sync-python) if you need move the gist files.

## Installation

``` bash
pip install glink2
```

## Login

To login a remote repo, you need to edit the `~/.config/Cologler/glink/auth.json`.
The format is like:

``` json
{
    "<USER>@<SERVICE>": ...
}
```

*The user name is required because the `glink` support multi-accounts per provider.*

### Gist

*Login is required for push only.*

To login gist, you need to create a new dev token from https://github.com/settings/tokens/new.
Ensure you checked the `gist` scope.

After you get the token, add following text into `auth.json`:

``` json
{
    "<USER>@gist": "<TOKEN>"
}
```


