Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .clasp.json.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"scriptId": "",
"rootDir": "./dist",
"fileExtension": "js",
"filePushOrder": []
}
2 changes: 2 additions & 0 deletions .env
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
VITE_GITHUB_TOKEN=
VITE_STARS_EXPLORER_URL=
70 changes: 70 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
name: CI/CD Pipeline

on:
push:
branches:
- main
pull_request:

jobs:
lint:
name: Lint & Format Check
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 18
cache: 'npm'

- name: Install dependencies
run: npm ci

- name: Run ESLint
run: npm run lint

- name: Run Prettier Check
run: npm run prettier

test:
name: Run Tests
runs-on: ubuntu-latest
needs: lint
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 22
cache: 'npm'

- name: Install dependencies
run: npm ci

- name: Run Tests
run: npm run test

build:
name: Build Project
runs-on: ubuntu-latest
needs: test
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 22
cache: 'npm'

- name: Install dependencies
run: npm ci

- name: Build the project
run: npm run build
20 changes: 20 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
node_modules
dist
*.local
.clasp.json

# Logs
logs
*.log
npm-debug.log*

# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
.DS_Store
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
5 changes: 5 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
dist/
.clasp.json
.clasp.json.example
appsscript.json
appsscript.json.example
7 changes: 7 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"semi": false,
"singleQuote": true,
"arrowParens": "avoid",
"printWidth": 100,
"plugins": ["prettier-plugin-organize-imports"]
}
101 changes: 101 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
# awesome-things

Have you faced ever with the challenge of choosing the right solutions among many alternatives?

**awesome-things** helps you organize all the options in one table, compare the numbers of stars, open/closed issues/PRs, track the project's dynamic and ultimately make an informed which solution to pick.

The project uses data from awesome-\* repositories, like as [awesome-python](https://github.com/vinta/awesome-python), extracts and parses the data (only from GitHub repositories), and generates a neat spreadsheet table that integrates seamlessly with Google Spreadsheets via Apps Script.

## Requirements

- Google Account
- GitHub Account

## Setup (local usage only)

1. Clone this repository

```shell
git clone https://github.com/roboloop/awesome-things
```

2. Install [clasp](https://github.com/google/clasp) and grand access

```shell
npm install -g @google/clasp

# Log in and grant access to Apps Script functionality
clasp login
```

3. Associate the cloned project with your Google Spreadsheets

1. Enable the Google Apps Script API [here](https://script.google.com/home/usersettings)

2. Create a blank Google Spreadsheets [here](https://docs.google.com/spreadsheets/u/0/create?usp=sheets_web)

3. Go to `Extensions` —> `Apps Script`

4. On the Apps Script page, open `Settings` and copy the Script ID

5. Create a `.clasp.json` file:

```shell
cp .clasp.json.example .clasp.json
```

6. Paste the Script ID into the `scriptId` field

4. Set up a GitHub Personal Access Token

1. Get a PAT [here](https://github.com/settings/personal-access-tokens) (no scopes required)

2. Create a `.env.local`

```shell
cp .env .env.local
```

3. Add the GitHub token to `.env.local` file

5. _(Optional)_ Integrate [daily-stars-explorer](https://github.com/emanuelef/daily-stars-explorer) to check extended GitHub repository statistics:

1. Add the address to `.env.local` file:

```
VITE_STARS_EXPLORER_URL=127.0.0.1:8080
```

2. Run the instance (it retrieves the PAT and address from `.env.local` file):

```shell
docker run --rm --name daily-stars-explorer \
--env PAT="$(sed -n 's/^VITE_GITHUB_TOKEN=//p' .env.local)" \
--publish "$(sed -n 's/^VITE_STARS_EXPLORER_URL=//p' .env.local)":8080 \
ghcr.io/emanuelef/daily-stars-explorer:latest
```

6. Deploy the project with following command:

```shell
npm run deploy
```

## Usage

1. Refresh the Google Spreadsheet page

2. Load the Table of Contents:

1. In the `Awesome Things` menu, select `Load Table of Contents`

2. Enter the GitHub repository link, e.g., <https://github.com/vinta/awesome-python>
3. The `ToC` sheet will be populated

3. Load the specific thing:

1. Select the cell with the interesting item

2. In the `Awesome Things` menu, select `Load Things`

3. A new sheet will be created and filled with data
6 changes: 6 additions & 0 deletions appsscript.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"timeZone": "UTC",
"dependencies": {},
"exceptionLogging": "STACKDRIVER",
"runtimeVersion": "V8"
}
1 change: 1 addition & 0 deletions env.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/// <reference types="google-apps-script" />
17 changes: 17 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
// @ts-check

import eslint from '@eslint/js'
import tseslint from 'typescript-eslint'

export default tseslint.config(
eslint.configs.recommended,
tseslint.configs.recommended,
{
ignores: ['dist/'],
},
{
rules: {
'@typescript-eslint/no-unused-vars': 'off',
},
},
)
Loading