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>")
Release files for woahdiscord 0.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| woahdiscord-0.1.2.tar.gz | 4.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| woahdiscord-0.1.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 10.7 kB
Release files / woahdiscord-0.1.2.tar.gz
| Download URL | woahdiscord-0.1.2.tar.gz |
|---|---|
| Size | 4.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d7e90b2b6d6bc45888029e5ae1d6983c7de093b49a5fadcd137cbfcd161a1960
|
|
BLAKE2b-256 checksum How to use checksums |
c4e249e8a5930a97bcae578db8ac4eca24e9b623144b5ab2f5e18a7284404839
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.8.10
|
Release files / woahdiscord-0.1.2-py3-none-any.whl
| Download URL | woahdiscord-0.1.2-py3-none-any.whl |
|---|---|
| Size | 6.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c6bd120f2f370022c5bac97b2241ef9ca550b8c7bae0bdbacb9596217bb4aebc
|
|
BLAKE2b-256 checksum How to use checksums |
16743d5fac8072eb17d32e2e575050b738a70af3483adc42e940abb67622f3e4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.8.10
|