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
Copy file name to clipboardexpand all lines: README.md
+101-3
Original file line number
Diff line number
Diff line change
@@ -40,9 +40,106 @@ This plugin for [Obsidian][Obsidian] imports your GitHub stars into your vault a
40
40
41
41
## How to use
42
42
43
-
- Install this plugin from community plugin list in Obsidian
44
-
-[Create a fine grained access token](https://github.blog/security/application-security/introducing-fine-grained-personal-access-tokens-for-github/#creating-personal-access-tokens) on your GitHub account developer settings page
45
-
- ..
43
+
### Prepare
44
+
45
+
To work with this plugin, you need to have a GitHub account and a fine grained access token.
46
+
To generate a fine grained access token, follow these steps:
47
+
48
+
1. Go to your GitHub account's [personal access tokens page](https://github.com/settings/personal-access-tokens).
49
+
2. Click on "Generate new token".
50
+
3. Confirm access if you have two-factor authentication enabled.
51
+
4. Give your token a name.
52
+
5. Setup expiration date (and optionally description).
53
+
6. Select read-only access to "Starring" (see "Account permissions" settings).
54
+
7. Click on "Generate token".
55
+
8. Copy generated token value and paste it into the plugin settings after plugin will be installed.
56
+
57
+
### Installation
58
+
59
+
You have two options to install this plugin:
60
+
1. Install this plugin from community plugin list in Obsidian.
61
+
2. Use [BRAT][BRAT] plugin to use this plugin version directly from [GitHub](https://github.com/vovanbo/obsidian-github-stars/releases).
62
+
63
+
### Usage
64
+
65
+
#### First synchronization
66
+
67
+
1. Open the plugin settings.
68
+
2. Enter your GitHub token in "GitHub API access token" field (see a demo video above).
69
+
3. Wait a second, and plugin will save your token to settings.
70
+
4. Press `Cmd + P` (Mac) or `Ctrl + P` (Windows/Linux) to open the Obsidian command palette.
71
+
5. Type "GitHub stars" and select plugin command `GitHub stars: Synchronize your starred repositories`.
72
+
6. If API token is valid, plugin will start synchronization process. In dependence of count of your starred repositories it will take some time.
73
+
For example, if you have around 2500 starred repositories, it will take about 5 minutes with page size set to `50`
74
+
(about 5 seconds to request/response).
75
+
The reason of this is that GitHub GraphQL API uses pagination to fetch data, which means that the plugin needs to make multiple requests to the API to retrieve all the data.
76
+
By default page size is set to 50, but you can change it in the plugin settings.
77
+
7. After synchronization is complete you will have a new folder with your starred repositories in your vault.
78
+
Name of the folder is set to "GitHub" by default, but you can change it in the plugin settings too.
79
+
8. Inside of this folder will be:
80
+
-`GitHub/db` subfolder. This is the place where plugin stores SQLite database with information about your starred repositories.
81
+
-`GitHub/repositories` subfolder. This is the place where plugin stores markdown files with information about your starred repositories.
82
+
Each repository will be placed in subfolder with its owner name. For example, star of this repository will be placed in file `GitHub/repositories/vovanbo/obsidian-github-stars.md`.
83
+
- Three index files:
84
+
-`Stars by days.md`. This file contains a list of all your starred repositories grouped by the day they were starred.
85
+
-`Stars by owners.md`. This file contains a list of all your starred repositories grouped by the owner of the repository.
86
+
-`Stars by languages.md`. This file contains a list of all your starred repositories grouped by the main programming language used in the repository.
87
+
88
+
#### Structure of Markdown repository file
89
+
90
+
##### Content
91
+
92
+
Each repository file created from the empty file template that have the following structure:
93
+
94
+
```
95
+
<!-- GITHUB-STARS-START -->
96
+
97
+
<!-- GITHUB-STARS-END -->
98
+
99
+
---
100
+
```
101
+
102
+
Between the `<!-- GITHUB-STARS-START -->` and `<!-- GITHUB-STARS-END -->` tags will be placed generated content.
103
+
So, don't edit content inside these tags manually.
104
+
It will be overwritten on each update.
105
+
Don't worry, these HTML comments are the valid Markdown syntax.
106
+
107
+
Any of your notes related to this repository should be placed after horizontal rule line (`---`).
108
+
They will be never touched by this plugin.
109
+
110
+
That exactly will be placed inside tags you can see in the demo video above. In short:
111
+
112
+
- Name of repository
113
+
- URL to repository
114
+
- Description of repository (if available)
115
+
- Homepage URL
116
+
- URL to repository owner page on GitHub
117
+
- Information about latest release if available
118
+
- List of programming languages used in the repository
119
+
- Funding links (if available)
120
+
121
+
##### Frontmatter
122
+
123
+
Each repository Markdown page will have the following frontmatter:
124
+
125
+
```
126
+
---
127
+
url: <repository URL>
128
+
homepageUrl: <homepage URL>
129
+
isArchived: <boolean>
130
+
isFork: <boolean>
131
+
isPrivate: <boolean>
132
+
isTemplate: <boolean>
133
+
stargazerCount: <number>
134
+
forkCount: <number>
135
+
createdAt: <date>
136
+
importedAt: <date>
137
+
pushedAt: <date>
138
+
starredAt: <date>
139
+
updatedAt: <date>
140
+
topics: <list of topics>
141
+
---
142
+
```
46
143
47
144
## Roadmap to 1.0
48
145
@@ -88,3 +185,4 @@ This plugin for [Obsidian][Obsidian] imports your GitHub stars into your vault a
0 commit comments