Giter Club home page Giter Club logo

Comments (8)

mootari avatar mootari commented on May 29, 2024 2

Just in case it's helpful in any way (e.g. for testing purposes), here's a JavaScript snippet that I've been using to fetch the list of custom emojis on the client side, via dev tools:

await (async (teamId) => {
  const {token} = JSON.parse(localStorage.localConfig_v2).teams[teamId];
  const query = (marker) =>
    fetch(`https://edgeapi.slack.com/cache/${teamId}/emojis/list`, {
      body: JSON.stringify({ count: 100, token, marker }),
      method: "POST",
      credentials: "include"
    }).then((r) => r.json());
  const results = [];
  let marker;
  do {
    const data = await query(marker);
    results.push(...data.results.map((d) => [d.name, d.value]));
    marker = data.next_marker;
  } while (marker);
  return Object.fromEntries(results);
})('THE_TEAM_ID')

Note that the results may not only contain image URLs but also aliases.

from slackdump.

craigrandall avatar craigrandall commented on May 29, 2024 1

No worries! This is open source after all. I appreciate all of your hard work--as you can get to it. Thank you!

Yes, I did see it more as a separate mode since it is somewhat orthogonal to channel content--similar to a user list. In terms of output, yes, that is roughly what I envisioned, where GIF would include animated support, if applicable.

Thanks for asking

from slackdump.

rusq avatar rusq commented on May 29, 2024 1

@craigrandall finally! Merged the emoji dump to master, it will be available in the v2.2.0, which I release soon. Thank you for the wait :)

Need to document it, and add to the UI, for now it can be invoked like this:

./slackdump -emoji -base my_emojis.zip

-base my_emoji.zip sets the output to my_emoji.zip. It can also be a directory, i.e. -base some_dir
-emoji sets the emoji download mode.

You can let me know your OS, and I can build a binary for you, if you wish to try it out before it's released?

from slackdump.

rusq avatar rusq commented on May 29, 2024 1

Hey @craigrandall, version 2.2.0 has the -emoji flag built in that allows to download the emojis, see this documentation section.

Thank you for your patience!

from slackdump.

rusq avatar rusq commented on May 29, 2024

@craigrandall sorry, it's taking me obscene long time to get to this.

Let me ask - do you see it as a separate mode, i.e. slackdump -emoji and it would dump the json definiton of those emojis along with png/gif files for them?

from slackdump.

rusq avatar rusq commented on May 29, 2024

Edge api are dodgy to deal with as there's no documentation, I'll put this snippet to a good use, thank you!

from slackdump.

craigrandall avatar craigrandall commented on May 29, 2024

from slackdump.

craigrandall avatar craigrandall commented on May 29, 2024

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.