Giter Club home page Giter Club logo

discordchatsimulator's Introduction

Discord Chat Simulator

This repository contains code that produces a fake discord conversation between multiple people. It takes in a text file of the form

Jim:
Hey Bob
What kind of chocolate...
Do you find in airports?

Bob:
idk Jim
what kind?

# this line is ignore becaused it has a # sign
Jim:
plain

and produces a sequence of discord messages, like those found in Beluga or Mr. P Solver videos. Messages from the same person stack: for example, in the chat above, the sequence of messages produced by the first chats of Jim are “Hey Bob” then “Hey Bob (newline) What kind of chocolate…” and then “Hey Bob (newline) What kind of chocolate… (newline) Do you find in airports?”

To run

  1. pip install -r requirements.txt
  2. Add all desired profile pictures to the profile_pictures/ folder.
  3. Inside the profile_pictures/ folder, update the profile_pic_dict.json with names (corresponding to the names in whatever script txt file you want to convert) and corresponding profile pictures.
  4. Inside the repository folder, run python generate_chat.py. It will prompt you to choose a .txt file of a script (format outlines above) somewhere on your computer. The images will be saved in a newly created chat/ folder with the form 007T.png where the first 3 numbers represent the image number in the entire sequence and the letter is the first letter of speakers name.

The file naming convention for saved .PNG chats is used because videos (very likely) have less than 1000 messages and the three digits allows for easy importing and sorting into a software like premiere pro.

discordchatsimulator's People

Contributors

alzywelzy avatar henryruss2 avatar lukepolson avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

discordchatsimulator's Issues

Traceback (most recent call last): File "/home/renen/DiscordChatSimulator/generate_chat.py", line 41, in <module> profile_pic_dict = json.loads(file.read()) File "/usr/lib/python3.10/json/__init__.py", line 346, in loads return _default_decoder.decode(s) File "/usr/lib/python3.10/json/decoder.py", line 337, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) File "/usr/lib/python3.10/json/decoder.py", line 353, in raw_decode obj, end = self.scan_once(s, idx) json.decoder.JSONDecodeError: Invalid control character at: line 1 column 26 (char 25)

Traceback (most recent call last):
File "/home/renen/DiscordChatSimulator/generate_chat.py", line 41, in
profile_pic_dict = json.loads(file.read())
File "/usr/lib/python3.10/json/init.py", line 346, in loads
return _default_decoder.decode(s)
File "/usr/lib/python3.10/json/decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/lib/python3.10/json/decoder.py", line 353, in raw_decode
obj, end = self.scan_once(s, idx)
json.decoder.JSONDecodeError: Invalid control character at: line 1 column 26 (char 25)

Hello

Hello, how are you doing today?
I am so interested in your profile, and I want to connect with you.
Looking forward to hearing from you.
Andres.

Font issue

Hello, you forgot to put the font folder in the code, thats all i gotta say ig

here's a quick fix for it
Go to the code folder where you put your code in and extract this folder, then it should work

fonts.zip

Get Rid Of __pycache__

You don’t want __pycache__ in your repo. That’s just the compiled version of the Python code, which may not be appropriate for the user’s system.

diff --git a/.gitignore b/.gitignore
index 3d9a6f3..0065e7c 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,4 @@
+/__pycache__/
 *.png
 *.PNG
 *.otf

Profile Picture Halved

Whenever I run the script, the profile pictures are halved. Is there a specific dimension I have to use to get good results?

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.