All Projects → cdanis → emojifs

cdanis / emojifs

Licence: GPL-3.0 license
emojifs is a FUSE filesystem that allows you to manipulate custom emojis on your various Slacks and Discords

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to emojifs

EmojiType
The writing helps to express as emoji. It was created to create short, funny scripts
Stars: ✭ 12 (-60%)
Mutual labels:  emoji
emoji
❤️ List of emojis
Stars: ✭ 151 (+403.33%)
Mutual labels:  emoji
electronic-moji
😱 🙀 😎
Stars: ✭ 37 (+23.33%)
Mutual labels:  emoji
diskover-community
Diskover Community Edition - Open source file indexer, file search engine and data management and analytics powered by Elasticsearch
Stars: ✭ 1,257 (+4090%)
Mutual labels:  filesystem
arch-btrfs-install-guide
Arch Linux installation guide with btrfs and snapper, this guide is based on the information from unicks.eu guide https://www.youtube.com/watch?v=TKdZiCTh3EM, and Arch Linux UEFI step-by-step installation guide https://www.youtube.com/watch?v=dOXYZ8hKdmc from ALU.
Stars: ✭ 32 (+6.67%)
Mutual labels:  filesystem
moonmoji
🌛 Return an emoji representing the current moon phase.
Stars: ✭ 86 (+186.67%)
Mutual labels:  emoji
cloudstore
简易分布式云存储服务
Stars: ✭ 22 (-26.67%)
Mutual labels:  filesystem
EmojIDE
Programming in Discord emojis. Second place for the ProgrammerHumor Hackathon
Stars: ✭ 30 (+0%)
Mutual labels:  emoji
pyFileManager
This script lets you automatically relocate files based on their extensions. Very useful from the downloads folder !
Stars: ✭ 22 (-26.67%)
Mutual labels:  filesystem
flutter file utils
Flutter package for managing files on Android
Stars: ✭ 35 (+16.67%)
Mutual labels:  filesystem
morsemoji
Translate text to morse code, but the morse code is emojis
Stars: ✭ 48 (+60%)
Mutual labels:  emoji
EmojiBuilder
Construct (or destruct) emoji from layered SVGs
Stars: ✭ 13 (-56.67%)
Mutual labels:  emoji
flysystem-curlftp
Flysystem Adapter for the FTP with cURL implementation
Stars: ✭ 36 (+20%)
Mutual labels:  filesystem
discord-reaction-role-bot
A Discord bot that allows users to self-assign roles using reactions.
Stars: ✭ 110 (+266.67%)
Mutual labels:  emoji
apfs-clone-checker
An utility to check if two files are clones in macOs APFS.
Stars: ✭ 30 (+0%)
Mutual labels:  filesystem
GitFS
A FUSE filesystem that stores data on Git
Stars: ✭ 26 (-13.33%)
Mutual labels:  filesystem
Django-WebApp
This is a web-app created using Python, Django. By using this user can login, upload files and also can view and download files uploaded by other users.
Stars: ✭ 285 (+850%)
Mutual labels:  filesystem
reactions
❤ A Flarum extension that adds reactions to your Flarum Community!
Stars: ✭ 17 (-43.33%)
Mutual labels:  emoji
xv6-file-system-visualizer
Online Visualizer for xv6 File System Image
Stars: ✭ 33 (+10%)
Mutual labels:  filesystem
dropbox-fs
📦 Node FS wrapper for Dropbox
Stars: ✭ 35 (+16.67%)
Mutual labels:  filesystem

the emojifs mascot: a blobmoji holding a 'yes' sign as well as a 'no' sign and emphatically waving both simultaneously

emojifs

Introduction

emojifs is a FUSE filesystem that allows you to manipulate custom emojis on your various Slacks and Discords.

Example usage applications

# Copy one emote from Slack to Discord.
cp /emoji/slack/xooglers/docker-fire.gif /emoji/discord/unchaind/

# Upload a whole pile of emoji.
cp ~/emojipacks/parrots/* /emoji/slack/mynewslack/

# Grab all those blobmoji across all my Discords and put them on Slack.
cp /emoji/discord/*/*blob* /emoji/slack/myslack/

⚠️ WARNING! ⚠️

☢️ 😱 DO NOT USE THIS PROGRAM. 😱 ☢️
This program is not a program of honor.

No highly esteemed function is executed here.

What is here is dangerous and repulsive to us.

The danger is still present, in your time, as it was in ours,
without even the implied warranty of MERCHANTABILITY
or FITNESS FOR A PARTICULAR PURPOSE.

This program is best shunned and left unused (but it is free software,
and you are welcome to redistribute it under certain conditions).
😱 ☢️ DO NOT USE THIS PROGRAM. ☢️ 😱

Getting your Slack and Discord secrets

⚠️ SERIOUS WARNING! I MEAN IT! ⚠️
Don't share your cookies or tokens with anyone or anything, including this program.
They allow full control of your account!
⚠️ SERIOUS WARNING! I MEAN IT! ⚠️

Slack

For Slack, the easiest thing to do is:

  • In your web browser, log in to all the Slacks you want to use with this hunk of junk.
  • Open your browser devtools network panel
  • Find a request going towards edgeapi.slack.com or api.slack.com or a URL path starting with /api. In Chrome, you can just type api in the Filter box above the timeline.
  • Extract the cookie header value from your request, and use it in the config file below.

Discord

  • In your web browser, go to https://discord.com/app
  • Open your browser devtools network panel
  • Find a request going towards https://discord.com/api/v6. In Chrome, you can just type api in the Filter box above the timeline.
  • Extract the value of the authorization: header from one of your requests, and use it in the config file below.

Pepe the Frog, sweating, his eyes replaced with a blinking marquee reading TOS ⚠️ SERIOUS WARNING! I MEAN IT! ⚠️
Using this program with Discord violates their Terms of Service.
It is possible your account could be banned.
⚠️ SERIOUS WARNING! I MEAN IT! ⚠️

 

Requirements

  • Python 3.7+
  • A system that supports libfuse2
    • Linux or MacOS (or probably most BSDs, but I haven't tried)
    • Windows might work with WinFsp, also untested
  • A profound amount of either fearlessness, or foolishness, or both

Installation

Like most Python packages, just pip install emojifs, or you can git clone the repo and python setup.py install.

You probably want to do either of the above inside a venv.

If you have poetry installed, then poetry install will work great.

Writing a config file

The format is TOML. It looks a lot like an INI file, if that means something to you.

The default location for the configuration file is ~/.emojifs.toml

A barebones config file

[emojifs]
mountpoint = '~/emoji'

[slack]
cookies = ['d=wpwQ4182w08qxmE4YP0gvlMb2L...']

[discord]
token = 'mfa.x91xxxxx......'
acknowledged = "I understand that using this program violates Discord's ToS"

That's all you need. All Slacks you logged into will be autodetected.

On Windows, your mountpoint should be a drive letter:

[emojifs]
mountpoint = 'E:'

A comprehensive configuration

There are a few niceties available:

[emojifs]
mountpoint = '/emoji'  # if you want to feel extra cool
foreground = true

[slack]
tokens = [
  'xoxp-asdf...',
  'xoxs-qwer...',
]

cookies = [
  'd=dvfib...',
  'd=ivu80...',
]

[slack.renames]
thisisaverylongname = 'short'

This will:

  • mount everything under /emoji
  • keep emojifs in the foreground as it runs (necessary if you want verbose logging output)
  • first read the auth tokens one by one, then scrape logins for the cookies listed
  • instead of mounting thisisaverylongname.slack.com's emojis under the usual path, they'll appear under /emoji/slack/short.

Invoking emojifs

usage: emojifs [-h] [-m MOUNTPOINT] [-f FOREGROUND] [-c CONFIG] [-v] [-V]

optional arguments:
  -h, --help            show this help message and exit
  -m MOUNTPOINT, --mountpoint MOUNTPOINT
                        Where to mount emojifs. If present here, overrides
                        mountpoint from config. (default: None)
  -f FOREGROUND, --foreground FOREGROUND
                        If set, stay in the foreground. (default: False)
  -c CONFIG, --config CONFIG
                        Path to your config file with secrets
                        (default: ~/.emojifs.toml)
  -v, --verbose         Verbosity (-v, -vv, etc). Higher verbosities will log
                        all HTTP traffic (NB: at higher levels, this will log
                        your auth secrets!) (default: 0)
  -V, --version         show program's version number and exit

A note on semantics

Emojis are always 'rendered' in the filesystem with extensions (.png, .gif, etc) attached; however, the filesystem will accept reads and writes to filenames without extensions (assuming, of course, the filenames are valid emoji names).

Known issues

  • The first time you ls a directory for a Slack or Discord, it will take a very long time: possibly dozens of seconds 😬 but will be much faster afterwards. Sorry, there are hopefully some reasonable ways to fix this. (If you're morbidly curious, look for real_sizes in emojifs/slack.py.)
  • While deletions and creations are supported, overwriting emojis in place is not yet supported. As a workaround, you can use cp --remove-destination which, before writing new versions, will delete any existent emojis.
  • Some Slacks have emojis from long ago which are aliases to emojis that don't themselves appear in the emoji listing -- although there isn't actually data missing, as they have a data: URL.
  • The use of this program with Discord violates their Terms of Service.
  • The existence of this program is an unforgivable sin.

Future work

  • Aliases for Discord guild names, as they can be unwieldly from the CLI.
  • EaaFS: Integrating popular emojipacks as a filesystem.

Acknowledgements

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].