Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

woahdiscord-0.1.2.tar.gz (4.5 kB view hashes)

Uploaded Source

Built Distribution

woahdiscord-0.1.2-py3-none-any.whl (6.3 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page