airajena commented on code in PR #8: URL: https://github.com/apache/fineract-chat-archive/pull/8#discussion_r2777023471
########## Readme.md: ########## @@ -1 +1,41 @@ -#fineract chat message archive +# Fineract Chat Archive + +A standalone tool that will archive public Slack messages for Apache Fineract into a static site. + +## Local run + +``` +./gradlew updateChatArchive +``` + +Configuration: +- File: `config/archive.properties` +- Key: `channels.allowlist` (comma-separated channel names, e.g. `#fineract`) +- Key: `output.dir` (relative path for site output, default `docs`) +- Key: `state.dir` (relative path for cursor state, default `state`) +- Key: `fetch.lookback.days` (how many days to re-fetch, default `1`) + +Output: +- Daily pages: `docs/daily/<channel>/<YYYY-MM-DD>.md` +- Channel index: `docs/daily/<channel>/index.md` +- Global index: `docs/index.md` +- Thread replies are rendered below parent messages with a simple prefix. + +Environment: +- `SLACK_TOKEN` (Slack Bot token) Review Comment: To create the Slack app needed for your "Step 1," follow these exact steps. ### Step 1: Create the App 1. Go to **[[api.slack.com/apps](https://api.slack.com/apps)](https://api.slack.com/apps)** in your web browser. 2. Click the **"Create New App"** button (top right). 3. Select **"From scratch"** in the popup. 4. **App Name:** Enter a name (e.g., `FineractArchiver`). 5. **Pick a workspace:** Select your free testing workspace from the dropdown. 6. Click **"Create App"**. ### Step 2: Add Permissions (Scopes) 1. In the left sidebar menu, look under "Features" and click **"OAuth & Permissions"**. 2. Scroll down to the section called **"Scopes"**. 3. Under **"Bot Token Scopes"** (NOT User Token Scopes), click "Add an OAuth Scope" and add these four exactly as listed in your instructions: * `channels:read` (Allows viewing public channels) * `channels:history` (Allows reading past messages) * `users:read` (Allows translating User IDs like `U1234` to names like `Adam`) *Note: In modern Slack apps, adding these scopes automatically creates the "Bot User" for you, so you don't need to do that separately.* ### Step 3: Install and Get Token 1. Scroll back to the very top of the **"OAuth & Permissions"** page. 2. Click the green **"Install to Workspace"** button. 3. Slack will ask for permission to access your workspace. Click **"Allow"**. 4. You will be redirected back. Look for the **"Bot User OAuth Token"**. 5. It will start with `xoxb-...`. **Copy this string.** This is the token you need for your Step 4 (`$env:SLACK_TOKEN`). ### Step 4: Invite the Bot (Crucial!) A bot cannot read a channel unless it is a member of that channel. 1. Open your Slack workspace app (desktop or web). 2. Go to the channel you want to test (e.g., `#general` or create a new one like `#test-archive`). 3. Type this command in the chat and hit enter: `/invite @FineractArchiver` (or whatever name you gave it). -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
