Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hankei6km/reposition
reposition is a command line tool to send a repository list to Notion database.
https://github.com/hankei6km/reposition
github notion
Last synced: 3 months ago
JSON representation
reposition is a command line tool to send a repository list to Notion database.
- Host: GitHub
- URL: https://github.com/hankei6km/reposition
- Owner: hankei6km
- License: mit
- Created: 2023-02-19T11:58:26.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-09-17T12:21:48.000Z (3 months ago)
- Last Synced: 2024-09-17T15:14:59.877Z (3 months ago)
- Topics: github, notion
- Language: TypeScript
- Homepage:
- Size: 969 KB
- Stars: 0
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# reposition
`reposition` is a command line tool to send a repository list to Notion database.
## Requirement
- GitHub CLI with authenticated to GitHub
- Notion Database
- Notion Integration## Install
```diff
npm install -g @hankei6km/reposition
```## Setup
Create a database with following properties in Notion workspace.
| name | type |
| ------------------ | -------------- |
| `title` | `title` |
| `isPrivate` | `checkbox` |
| `name` | `text` |
| `owner` | `text` |
| `url` | `url` |
| `description` | `text` |
| `repositoryTopics` | `multi_select` |
| `createdAt` | `date` |
| `updatedAt` | `date` |
| `pushedAt` | `date` |## Usage
```bash
$ export REPOSITION_API_KEY=
$ export REPOSITION_DATABASE_ID=
$ gh repo list \
--json nameWithOwner,isPrivate,name,owner,url,description,repositoryTopics,createdAt,updatedAt,pushedAt,openGraphImageUrl \
--jq .[] | reposition
```Add `-L` option to `gh` if you hava many repositories.
```bash
$ gh repo list -L 50 \
--json nameWithOwner,isPrivate,name,owner,url,description,repositoryTopics,createdAt,updatedAt,pushedAt,openGraphImageUrl \
--jq .[] | reposition
```When updating the database, use the `--filter-time-range` option to reduce the number of repositories to be send.
```bash
$ gh repo list -L 50 \
--json nameWithOwner,isPrivate,name,owner,url,description,repositoryTopics,createdAt,updatedAt,pushedAt,openGraphImageUrl \
--jq .[] | reposition --filter-time-range 172800 # repositories updated(pushed) within 2 days.
```Note: `reposition` does not have the function to remove pages from the database.
## License
MIT License
Copyright (c) 2023 hankei6km