IA Uploading is a Discord bot that allows users to upload files directly to Archive.org (using the internetarchive python library) via a slash command in Discord, It handles file attachments, generates unique identifiers for uploads, and also creates metadata for each uploaded file with support for custom metadata fields
- Uploads files to Archive.org with a
/uploadcommand - Supports 10 file attachments in a single command
- Supports adding your own metadata to uploads
- Automatically makes metadata for each upload, including:
- A unique identifier
- Descriptions based on the uploader's username and file names
- User custom metadata fields
- Cleans up uploaded files after uploads
Windows:
- Download the Git installer from git-scm.com
- Run the installer and follow the prompts
- Note: make sure to install it in PATH
macOS:
- Install using Homebrew:
brew install git
- Or download the installer from git-scm.com
Linux (Ubuntu/Debian):
sudo apt update
sudo apt install git
Windows:
- Download the latest Python installer from python.org
- Run the installer
- Note: make sure to install it in PATH
macOS:
- Install using Homebrew:
brew install python
- Or download from python.org
Linux (Ubuntu/Debian):
sudo apt update
sudo apt install python3 python3-pip
- Clone this repo:
git clone https://github.com/Andres9890/ia-Uploading-Discord-Bot.git cd ia-Uploading-Discord-Bot - Install the required packages (
pip install -r requirements.txt) - Configure your IA account:
- Run
ia configurein your terminal - It will prompt you to enter your Archive.org email and password
- Run
- Set up your Discord bot token:
- Create a
.envfile in the same directory as the bot.py file - Add your Discord bot token to the file like this:
DISCORD_BOT_TOKEN=discord token here - Make sure to keep your
.envfile private and don't share it
- Create a
- Run the bot with
python bot.py
Make sure you have the following installed before running the bot:
- An IA account
- Python 3.8 and up
- Required python packages (
requirements.txt)
/upload <file(s)>- Upload up to 10 files to IA/ping- Test the bot's response time
You can add custom metadata to your uploads using the custom_metadata parameter in the /upload command, Metadata should be provided in meta=data format, with multiple fields separated by commas
Format:
meta=data,meta2=data2,meta3=data3
Example:
/upload file:myfile.pdf custom_metadata:creator=Someone,subject=Images,collection=somecollection
This project is licensed under the MIT License, see the LICENSE file for more details