-
-
Notifications
You must be signed in to change notification settings - Fork 74
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #386 from rusq/v3-doc
Documentation and viewer fix on Windows
- Loading branch information
Showing
27 changed files
with
641 additions
and
127 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,43 @@ | ||
# Archive Command | ||
# Command: archive | ||
|
||
The archive command archives the Slack workspace into a directory of files. | ||
By default, it will perform the archiving of the full workspace that is accessible | ||
to your user. | ||
The `archive` command saves your Slack workspace as a directory of files. By | ||
default, it archives the entire workspace that your user can access. You can | ||
customize the archive to include specific channels, groups, or direct messages | ||
by providing their URLs or IDs. | ||
|
||
Optionally, one can select channels, groups and DMs to archive. For this, one | ||
needs to specify the URLs or IDs of the channels. | ||
## Features | ||
|
||
The workspace is archived in the "Chunk" format, that can be viewed with the | ||
`view` command, or converted to other supported formats, such as native Slack | ||
Export format. | ||
### Default Behavior | ||
- Archives the full workspace accessible to your user. | ||
|
||
## What is contained in the archive? | ||
### Optional Customization | ||
- Specify channels, groups, or DMs to archive by providing their URLs or IDs. | ||
|
||
"Archive" behaves similarly to the Slackdump export feature, the output of a | ||
successful run contains the following: | ||
- channels.json.gz - list of channels in the workspace (full archives only); | ||
- users.json.gz - list of users in the workspace; | ||
- CXXXXXXX.json.gz - channel or group conversation messages, where XXXXXXX is | ||
the channel ID; | ||
- DXXXXXXX.json.gz - direct messages, where XXXXXXX is the user ID; | ||
### Output Format | ||
- The archive uses the **"Chunk" format**, which can be: | ||
- Viewed using the `view` command. | ||
- Converted to other formats, including the native Slack Export format. | ||
|
||
Output format: | ||
## Archive Contents | ||
|
||
- Each file is a JSONL file compressed with GZIP. | ||
The archive behaves like the Slackdump export feature. A successful run | ||
output includes: | ||
|
||
Please note that "archive" can not create ZIP files, but you can zip the output | ||
directory manually. | ||
- **`channels.json.gz`**: A list of channels in the workspace (only for full | ||
archives). | ||
- **`users.json.gz`**: A list of users in the workspace. | ||
- **`CXXXXXXX.json.gz`**: Messages from a channel or group, where `XXXXXXX` is | ||
the channel ID. | ||
- **`DXXXXXXX.json.gz`**: Direct messages, where `XXXXXXX` is the user ID. | ||
|
||
## What is chunk file format? | ||
### File Format | ||
- Files are saved as **JSONL** (newline-delimited JSON) and compressed with | ||
**GZIP**. | ||
- Note: The `archive` command does not create ZIP files, but you can manually | ||
compress the output directory into a ZIP file if needed. | ||
|
||
## What is the Chunk Format? | ||
|
||
The Chunk format is a specific structure used for archiving data. For details | ||
on this format, run: `slackdump help chunk` | ||
|
||
Run `slackdump help chunk` for the format specification. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
# Command: search | ||
|
||
The `search` command allows you to search and export messages or files from a | ||
Slack workspace based on specified query terms. This command supports searching | ||
for messages, files, or both, and outputs the results in a directory. | ||
|
||
### Subcommands | ||
- **`slackdump search messages`**: Searches and records messages matching the | ||
given query. | ||
- **`slackdump search files`**: Searches and records files matching the given | ||
query. | ||
- **`slackdump search all`**: Searches and records both messages and files | ||
matching the query. | ||
|
||
### Flags | ||
- **`--no-channel-users`**: Skips retrieving user data for channels, making the | ||
process approximately 2.5x faster. | ||
|
||
### Requirements | ||
- Authentication is required for all search operations. | ||
- An output directory must be specified (see configuration details). | ||
|
||
## Usage Examples | ||
|
||
### Search Messages | ||
|
||
```bash | ||
slackdump search messages "meeting notes" | ||
``` | ||
|
||
### Search Files | ||
|
||
```bash | ||
slackdump search files "report" | ||
``` | ||
|
||
### Search Messages and Files | ||
|
||
```bash | ||
slackdump search all "project updates" | ||
``` | ||
|
||
### Faster Searches | ||
To speed up searches, add the `--no-channel-users` flag: | ||
|
||
```bash | ||
slackdump search messages -no-channel-users "status update" | ||
``` | ||
|
||
|
||
## Output Directory | ||
The search command outputs results to the specified directory. The directory | ||
contains: | ||
|
||
- **`search.jsonl.gz`**: A list of messages matching the query. | ||
- directory with saved files (if files are included in the search). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
# Command: export | ||
|
||
The `export` command saves your Slack workspace as a directory of files. | ||
By default, it exports the entire workspace that your user can access. | ||
You can customize the archive to include specific channels, groups, or | ||
direct messages by providing their URLs or IDs. | ||
|
||
The ZIP file it generates is compatible with the Slack Export format with | ||
Slackdump specific extensions. | ||
|
||
The export file is understood by Slack Import feature with the following | ||
caveat: | ||
- files will not be imported, unless the `export` token is specified. | ||
Github user @codeallthethingz has created a script that allows you to | ||
import attachments from the export file. You can find it | ||
[here](https://github.com/rusq/slackdump/issues/371) | ||
|
||
|
||
## Export file structure | ||
|
||
```plaintext | ||
/ | ||
├── __uploads : all uploaded files are placed in this dir. | ||
│ └── F02PM6A1AUA : slack file ID is used as a directory name | ||
│ └── Chevy.jpg : file attachment | ||
├── everyone : channel "#everyone" | ||
│ ├── 2022-01-01.json : all messages for the 1 Jan 2022. | ||
│ └── 2022-01-04.json : " " " " 4 Jan 2022. | ||
├── DM12345678 : Your DMs with Scumbag Steve^ | ||
│ └── 2022-01-04.json : (you did not have much to discuss — | ||
│ : Steve turned out to be a scumbag) | ||
├── channels.json : all workspace channels information | ||
├── dms.json : direct message information | ||
└── users.json : all workspace users information | ||
``` | ||
|
||
### Channels | ||
The channels are be saved in directories, named after the channel title, | ||
i.e. `#random` would be saved to "random" directory. The directory will | ||
contain a set of JSON files, one per each day. If there were no | ||
conversations on some particular day, there will be no JSON file for that | ||
day. | ||
|
||
### Users | ||
User directories will have a "D" prefix, to find out the user name, check | ||
`users.json` file. | ||
|
||
### Group Messages | ||
Group messages will have all involved user handles in their name. | ||
|
||
## Inclusive and Exclusive Modes | ||
|
||
It is possible to **include** or **exclude** channels in/from the Export. | ||
|
||
For more details, run `slackdump help syntax`. | ||
|
||
## Viewing the Export | ||
|
||
To view the export, run `slackdump view <export_file>`. | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.