A python library allowing discord to be used unlimited cloud storage.
Project description
A python library allowing discord to be used unlimited cloud storage.
What's the purpose?
Cloud storage is expensive even if you have a 10 USD and 20 USD laying around. Social media platforms like Instagram, YouTube, Discord offers unlimited storage to upload attachments and files. Though being limited to certain file extensions in some instances.
With careful planning, we can take advantage of that and upload data from our local storage to those platforms and use them as cloud storages. In this library, I have implemented the required functions to achieve that.
Examples
How to split a file into small chunks
from woahdiscord import split_file
chunk_size_mb = 20 Â # Set your desired chunk size in megabytes
file_or_folder_path = 'woahdiscord\Wireshark-4.2.2-x64.exe'
if os.path.isfile(file_or_folder_path):
  split_file(file_or_folder_path, chunk_size_mb, add_metadata=True)
elif os.path.isdir(file_or_folder_path):
  split_files_in_folder(file_or_folder_path, chunk_size_mb, add_metadata=True)
else:
  print('Invalid file or folder path.')
How to merge the chunks
from woahdiscord import merge_files
folder_path = "Wireshark-4.2.2-x64_chunks"
merge_files(folder_path)
How to convert a file into jpg/jpeg
from woahdiscord import file_jpg
input_path = 'woahdiscord\Wireshark-4.2.2-x64.exe' Â # Can be a file or a directory
file_jpg(input_path)
Reconstructing jpg into original
from woahdiscord import osmosis
folder_path = 'CXh2bgPY' Â # Provide the folder path here
osmosis(folder_path)
Setting up discord bot to upload files automatically
from woahdiscord import auto_upload
auto_upload_files("your/folder/path", "<Your Bot Token>")
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file woahdiscord-0.1.2.tar.gz
.
File metadata
- Download URL: woahdiscord-0.1.2.tar.gz
- Upload date:
- Size: 4.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.8.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d7e90b2b6d6bc45888029e5ae1d6983c7de093b49a5fadcd137cbfcd161a1960 |
|
MD5 | 10b40108ebe76cdd859a14ca893ba4bc |
|
BLAKE2b-256 | c4e249e8a5930a97bcae578db8ac4eca24e9b623144b5ab2f5e18a7284404839 |
File details
Details for the file woahdiscord-0.1.2-py3-none-any.whl
.
File metadata
- Download URL: woahdiscord-0.1.2-py3-none-any.whl
- Upload date:
- Size: 6.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.8.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c6bd120f2f370022c5bac97b2241ef9ca550b8c7bae0bdbacb9596217bb4aebc |
|
MD5 | 94badf67a2a19ddecc7cde52ca902c0e |
|
BLAKE2b-256 | 16743d5fac8072eb17d32e2e575050b738a70af3483adc42e940abb67622f3e4 |