Name | woahdiscord JSON |
Version |
0.1.2
JSON |
| download |
home_page | |
Summary | A python library allowing discord to be used unlimited cloud storage. |
upload_time | 2024-02-17 08:56:05 |
maintainer | |
docs_url | None |
author | TAWSIF AHMED |
requires_python | |
license | |
keywords |
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
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**
```Python
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**
```Python
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**
```Python
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
```Python
from woahdiscord import osmosis
folder_path = 'CXh2bgPY' Â # Provide the folder path here
osmosis(folder_path)
```
**Setting up discord bot to upload files automatically**
```Python
from woahdiscord import auto_upload
auto_upload_files("your/folder/path", "<Your Bot Token>")
```
Raw data
{
"_id": null,
"home_page": "",
"name": "woahdiscord",
"maintainer": "",
"docs_url": null,
"requires_python": "",
"maintainer_email": "",
"keywords": "",
"author": "TAWSIF AHMED",
"author_email": "sleeping4cat@outlook.com",
"download_url": "https://files.pythonhosted.org/packages/c4/e2/49e8a5930a97bcae578db8ac4eca24e9b623144b5ab2f5e18a7284404839/woahdiscord-0.1.2.tar.gz",
"platform": null,
"description": "A python library allowing discord to be used unlimited cloud storage. \r\n\r\n## What's the purpose?\r\n\r\nCloud 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. \r\n\r\nWith 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.\r\n\r\n### Examples\r\n\r\n**How to split a file into small chunks**\r\n\r\n```Python\r\nfrom woahdiscord import split_file\r\n\r\nchunk_size_mb = 20 \u00c2\u00a0# Set your desired chunk size in megabytes\r\n\r\nfile_or_folder_path = 'woahdiscord\\Wireshark-4.2.2-x64.exe'\r\n\r\nif os.path.isfile(file_or_folder_path):\r\n\r\n\u00c2\u00a0 \u00c2\u00a0 split_file(file_or_folder_path, chunk_size_mb, add_metadata=True)\r\n\r\nelif os.path.isdir(file_or_folder_path):\r\n\r\n\u00c2\u00a0 \u00c2\u00a0 split_files_in_folder(file_or_folder_path, chunk_size_mb, add_metadata=True)\r\n\r\nelse:\r\n\r\n\u00c2\u00a0 \u00c2\u00a0 print('Invalid file or folder path.')\r\n```\r\n\r\n**How to merge the chunks**\r\n\r\n```Python\r\nfrom woahdiscord import merge_files\r\nfolder_path = \"Wireshark-4.2.2-x64_chunks\"\r\n\r\nmerge_files(folder_path)\r\n```\r\n\r\n**How to convert a file into jpg/jpeg**\r\n\r\n```Python\r\nfrom woahdiscord import file_jpg\r\n\r\ninput_path = 'woahdiscord\\Wireshark-4.2.2-x64.exe' \u00c2\u00a0# Can be a file or a directory\r\n\r\nfile_jpg(input_path)\r\n```\r\n\r\nReconstructing jpg into original\r\n\r\n```Python\r\nfrom woahdiscord import osmosis\r\n\r\nfolder_path = 'CXh2bgPY' \u00c2\u00a0# Provide the folder path here\r\n\r\nosmosis(folder_path)\r\n```\r\n\r\n**Setting up discord bot to upload files automatically**\r\n\r\n```Python\r\nfrom woahdiscord import auto_upload\r\n\r\nauto_upload_files(\"your/folder/path\", \"<Your Bot Token>\")\r\n```\r\n",
"bugtrack_url": null,
"license": "",
"summary": "A python library allowing discord to be used unlimited cloud storage.",
"version": "0.1.2",
"project_urls": null,
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "16743d5fac8072eb17d32e2e575050b738a70af3483adc42e940abb67622f3e4",
"md5": "94badf67a2a19ddecc7cde52ca902c0e",
"sha256": "c6bd120f2f370022c5bac97b2241ef9ca550b8c7bae0bdbacb9596217bb4aebc"
},
"downloads": -1,
"filename": "woahdiscord-0.1.2-py3-none-any.whl",
"has_sig": false,
"md5_digest": "94badf67a2a19ddecc7cde52ca902c0e",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 6254,
"upload_time": "2024-02-17T08:56:03",
"upload_time_iso_8601": "2024-02-17T08:56:03.054191Z",
"url": "https://files.pythonhosted.org/packages/16/74/3d5fac8072eb17d32e2e575050b738a70af3483adc42e940abb67622f3e4/woahdiscord-0.1.2-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "c4e249e8a5930a97bcae578db8ac4eca24e9b623144b5ab2f5e18a7284404839",
"md5": "10b40108ebe76cdd859a14ca893ba4bc",
"sha256": "d7e90b2b6d6bc45888029e5ae1d6983c7de093b49a5fadcd137cbfcd161a1960"
},
"downloads": -1,
"filename": "woahdiscord-0.1.2.tar.gz",
"has_sig": false,
"md5_digest": "10b40108ebe76cdd859a14ca893ba4bc",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 4477,
"upload_time": "2024-02-17T08:56:05",
"upload_time_iso_8601": "2024-02-17T08:56:05.580716Z",
"url": "https://files.pythonhosted.org/packages/c4/e2/49e8a5930a97bcae578db8ac4eca24e9b623144b5ab2f5e18a7284404839/woahdiscord-0.1.2.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-02-17 08:56:05",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "woahdiscord"
}