GithubHelp home page GithubHelp logo

Comments (11)

rusq avatar rusq commented on June 3, 2024 3

Hey @yarikoptic , with the great help of a slackdump user in Telegram, we were able to get it going, you can check the "v3" branch.

git checkout v3

The only thing you need to do, is to use the -enteprise flag.

In the examples I will use the "record" format which is a new way to save the Workspace information implemented in v3. It is already quite stable, so the plan is for future versions to support it unchanged. I'll show how to convert to export further, please keep reading.

Exporting

To export full workspace (in the "chunk" format):

go run ./cmd/slackdump archive -enterprise

To export some conversations:

go run ./cmd/slackdump archive -enterprise CHANNEL_ID1 CHANNEL_ID2

This will create "slackdump_" directory. I will refer to it as "slackdump_record_dir" further in this message.

To get the chunk format spec:

go run ./cmd/slackdump help chunk

EXPERIMENTAL: viewing the archive

"View" allows to view the slackdump record archives, Slack and slackdump export ZIP files and directories, and Slackdump dump archives. It will detect the format automatically.

To view the archive, run:

go run ./cmd/slackdump view slackdump_record_dir

Then head to http://localhost:8080

Converting to Slack export format

If you wish for some reason to convert to slack export format, run this command:

go run ./cmd/slackdump convert -o my_export_file.zip slackdump_record_dir

Any feedback is welcomed.

from slackdump.

rusq avatar rusq commented on June 3, 2024 2

Hey @xiaket, thank you for the feedback! Sorry about that, v3 is in heavy development, I have renamed "record" to "archive" to make the purpose more clear, I'll update my prev msg.

from slackdump.

xiaket avatar xiaket commented on June 3, 2024 1

Thanks for your hard work on this @rusq ! Really appreciated it! I can confirm that it works on my side as well. I checked out v3 branch, ran make arm_darwin to generate a binary, then used ./arm_darwin workspace to login and ./arm_darwin dump -enterprise C0xxxxxx to dump all messages in a channel. I'd like to report that the record command is not found on my v3 checkout(ffd4532)

from slackdump.

hutchiko avatar hutchiko commented on June 3, 2024 1

@rusq I have also verified this works as advertised off the v3-wiz branch against my work enterprise Slack account. However I did have to make one small change as the Slack URL my workspace uses is not compatible with the current test. Ours is of the format:

https:///company.enterprise.slack.com/...

To get past this I updated the regexp used in url_parse.go to verify the URL to the following:

var slackURLRe = regexp.MustCompile(`^https:\/\/[a-zA-Z0-9]{1}[-\w]+(\.enterprise)?\.slack\.com\/archives\/[A-Z]{1}[A-Z0-9]+(\/p(\d+))?$`)

Thanks for all you work on this.

from slackdump.

rusq avatar rusq commented on June 3, 2024

Hey @yarikoptic, thanks for the suggestion! Right now it would prevent the export from working on the enterprise instances. I suspect, the workaround would be to "observe" the edge api and making a custom call to the edge APIs.

from slackdump.

xiaket avatar xiaket commented on June 3, 2024

It looks like we have the code here, but it is not being actively used in the codebase.

from slackdump.

rusq avatar rusq commented on June 3, 2024

I even know who wrote it 😂 It's just a stray one from one of the experimental branches that I did not want to lose. Did not go far with it. It will need to be revised.

from slackdump.

rusq avatar rusq commented on June 3, 2024

Known restrictions:

1. error getting conversation users: callback error: enterprise_is_restricted
2. error getting members for [my test channel]: callback error: enterprise_is_restricted

from slackdump.

rusq avatar rusq commented on June 3, 2024

Experimented with this over the weekend - findings:

Slack does not allow to seek past Page 100, when page > 100 requested, Slack
returns the first page (Page=1). Seems to be an internal limitation. The
workaround would be to use the Query parameter, to be more specific about the
channel names, but to get all channels, this would require iterating through
all 65536 runes of unicode give or take the special characters.

I'll take a break from this, maybe some idea comes up.

from slackdump.

rusq avatar rusq commented on June 3, 2024

Getting help

Help is still in progress, but most of the commands will provide the flags and their description.

To get the list of commands:

go run ./cmd/slackdump help

To get help for the command or read a help topic:

go run ./cmd/slackdump help <topic or command>

To get help on a subcommand:

go run ./cmd/slackdump help command subcommand

for example

go run ./cmd/slackdump help list users

from slackdump.

rusq avatar rusq commented on June 3, 2024

Hey @hutchiko thanks for letting me know, I'll update the code and tests, when able! Glad that you were able to make it work.

from slackdump.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.