You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Create a [new fine-grained personal token](https://github.com/settings/personal-access-tokens/new)
128
+
To authenticate, simply run:
129
+
```
130
+
shbin init
131
+
```
132
+
133
+
This command will guide you through creating a token and and selecting a repository,
134
+
then store them locally so that `shbin` can use them right away.
135
+
136
+
Alternatively, you can **manually** create a [new fine-grained personal token](https://github.com/settings/personal-access-tokens/new)
135
137
on Github restricted to your "pastebin" repository (under your user or
136
-
your organization's ownership), with read and write permissions on
137
-
"Contents".
138
+
your organization's ownership), with **read and write** permission on **Contents**:
-Then set the environment variables in your preferred place:
142
+
Then set the environment variables:
142
143
143
144
```
144
145
export SHBIN_GITHUB_TOKEN="<your personal token>"
145
-
export SHBIN_REPO="<user_or_org>/<repo>" # example "Shiphero/pastebin"
146
-
```
147
-
148
-
- By default `shbin` assigns a top-level folder to separate the content
149
-
uploaded by each user. This can be changed using the `SHBIN_NAMESPACE`
150
-
environment variable or the `--namespace` argument from the command
151
-
line. For example:
146
+
export SHBIN_REPO="<user_or_org>/<repo>" # example "myorg/pastebin"
147
+
```
152
148
153
-
-`export SHBIN_NAMESPACE=""` # no namespace
154
-
-`export SHBIN_NAMESPACE="pastebin_folder"` # the full pastebin is inside pastebin_folder/"
155
-
-`export SHBIN_NAMESPACE="pastebin_folder/{user}"` # mix of both: each user has its own subfolder
156
-
inside `pastebin_folder/`
157
149
158
-
-[optional] To interact with the clipboard, we use the library `pyclip`.
159
-
This may require some additional system dependencies
160
-
depending your operating system.
161
-
See [these notes](https://github.com/spyoungtech/pyclip#platform-specific-notesissues).
150
+
By default `shbin` assigns a top-level folder to separate the content
151
+
uploaded by each user. This can be changed using the `SHBIN_NAMESPACE`
152
+
environment variable or the `--namespace` argument from the command
153
+
line. For example:
162
154
163
-
If you want to disable the automatic copying of the URL to the clipboard
164
-
you can set the environment variable `SHBIN_COPY_URL=false` (or "0" or "no").
155
+
-`export SHBIN_NAMESPACE=""` # no namespace
156
+
-`export SHBIN_NAMESPACE="pastebin_folder"` # the full pastebin is inside pastebin_folder/"
157
+
-`export SHBIN_NAMESPACE="pastebin_folder/{user}"` # mix of both: each user has its own subfolder
158
+
inside `pastebin_folder/`
165
159
166
-
This is useful in some Linux distributions that use Wayland as the call via `wl-copy`
167
-
that `pyclip` uses in such environment can be slow.
160
+
> [!NOTE]
161
+
> To interact with the clipboard, we use the library `pyclip`. This may require some additional system
162
+
> dependencies depending your operating system. See [these notes](https://github.com/spyoungtech/pyclip#platform-specific-notesissues).
163
+
> If you want to disable the automatic copying of the URL to the clipboard
164
+
> you can set the environment variable `SHBIN_COPY_URL=false` (or "0" or "no").
165
+
>
166
+
> This is useful in some Linux distributions that use Wayland as the call via `wl-copy`
167
+
> that `pyclip` uses in such environment can be slow.
168
168
169
-
Nice video courtesy of [tuterm](https://github.com/veracioux/tuterm), [asciinema](https://asciinema.org/)
170
-
and [svg-term-cli](https://github.com/marionebl/svg-term-cli)
169
+
Nice video courtesy of [tuterm](https://github.com/veracioux/tuterm), [asciinema](https://asciinema.org/) and [svg-term-cli](https://github.com/marionebl/svg-term-cli)
0 commit comments