forked from distok/cutthecord
		
	Add experimental patches for new emojis on discord
This commit is contained in:
		
							parent
							
								
									1768776294
								
							
						
					
					
						commit
						ae64ae0a86
					
				
					 3 changed files with 33 additions and 1 deletions
				
			
		| 
						 | 
					@ -26,7 +26,7 @@ Automatically patched binaries are available on [distok.a3.pm/cutthecord](https:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
## Building patches
 | 
					## Building patches
 | 
				
			||||||
 | 
					
 | 
				
			||||||
`diff -crB -x "dist" Folder1 Folder2 > atmpatch.patch`
 | 
					`diff -crB -x "dist" -x "res" -x "build" CleanFolder PatchedFolder > patchname.patch`
 | 
				
			||||||
 | 
					
 | 
				
			||||||
## Disclaimer about emojos
 | 
					## Disclaimer about emojos
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -6,6 +6,11 @@ import shutil
 | 
				
			||||||
extracted_discord_path = "/tmp/cutthecord/discord"
 | 
					extracted_discord_path = "/tmp/cutthecord/discord"
 | 
				
			||||||
extracted_mutstd_path = "/var/www/mutant/72x72"
 | 
					extracted_mutstd_path = "/var/www/mutant/72x72"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# Add your custom emojis here
 | 
				
			||||||
 | 
					# with "mutstd filename": "discord filename".
 | 
				
			||||||
 | 
					# You'll need to write a patch for `assets/data/emojis.json` too.
 | 
				
			||||||
 | 
					custom_emojis = {"101666.png": "emoji_101666.png"}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
def clean_emoji_name(name):
 | 
					def clean_emoji_name(name):
 | 
				
			||||||
    name = name.lower().replace("_", "-")\
 | 
					    name = name.lower().replace("_", "-")\
 | 
				
			||||||
| 
						 | 
					@ -42,4 +47,12 @@ for emoji in discord_emojis:
 | 
				
			||||||
        print("Replaced {} emoji.".format(emoji))
 | 
					        print("Replaced {} emoji.".format(emoji))
 | 
				
			||||||
        replace_counter += 1
 | 
					        replace_counter += 1
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					for custom_emoji in custom_emojis:
 | 
				
			||||||
 | 
					    discord_emoji_name = custom_emojis[custom_emoji]
 | 
				
			||||||
 | 
					    full_mutstd_path = os.path.join(extracted_mutstd_path, custom_emoji)
 | 
				
			||||||
 | 
					    full_discord_path = os.path.join(discord_emoji_path, discord_emoji_name)
 | 
				
			||||||
 | 
					    shutil.copyfile(full_mutstd_path, full_discord_path)
 | 
				
			||||||
 | 
					    print("Added custom {} emoji.".format(emoji))
 | 
				
			||||||
 | 
					    replace_counter += 1
 | 
				
			||||||
 | 
					
 | 
				
			||||||
print("Done, {} emojis replaced.".format(replace_counter))
 | 
					print("Done, {} emojis replaced.".format(replace_counter))
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
							
								
								
									
										19
									
								
								patches/mutant/831.patch
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										19
									
								
								patches/mutant/831.patch
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
					@ -0,0 +1,19 @@
 | 
				
			||||||
 | 
					diff -crB -x dist -x res -x build com.discord-831/assets/data/emojis.json com.discord-831-patched/assets/data/emojis.json
 | 
				
			||||||
 | 
					*** com.discord-831/assets/data/emojis.json     2019-01-18 23:05:36.726178666 +0300
 | 
				
			||||||
 | 
					--- com.discord-831-patched/assets/data/emojis.json     2019-01-18 23:05:53.066252466 +0300
 | 
				
			||||||
 | 
					***************
 | 
				
			||||||
 | 
					*** 8633,8638 ****
 | 
				
			||||||
 | 
					--- 8633,8644 ----
 | 
				
			||||||
 | 
					          "rainbow_flag"
 | 
				
			||||||
 | 
					        ],
 | 
				
			||||||
 | 
					        "surrogates": "🏳️🌈"
 | 
				
			||||||
 | 
					+     },
 | 
				
			||||||
 | 
					+     {
 | 
				
			||||||
 | 
					+       "names": [
 | 
				
			||||||
 | 
					+         "demon"
 | 
				
			||||||
 | 
					+       ],
 | 
				
			||||||
 | 
					+       "surrogates": ""
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
 | 
					    ]
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					\ No newline at end of file
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue