A bot discord that can create directories, file, rename, move, navigate throw directories etc....

Overview

File Manager Discord

What is the purpose of this program ?

This program is made for a Discord bot. Its purpose is to organize the messages sent in a clear and structured way, thanks to files and directories. The whole database is made in XML. However, people do not interact directly with this database, but write commands on a channel, which are processed by the bot to interact with the XML file. The commands are simple and inspired by bash.

The commands

ls

As in bash, this command allows to see the files that are in the directory.

Syntax: ls

cd

As in bash, this command allows you to change of directory

Syntax: cd

cd..

cd.. is the equivalent of "cd .." in Bash

Syntax: cd..

mkdir

As in bash, this command allows you to make a new directory

Syntax: mkdir {name_of_the_dir}

mkdir

As in bash, this command allows you to make a new directory

Syntax: mkdir {name_of_the_dir}

home

This command allow user to come to the root of all the database. It's kind of a big cd..

Syntax: home

pwd

As in bash, this command allows you to get your current location. You can also see it with ls at the bottom

Syntax: pwd

touch

This command isn't the same as in Bash. This command creates a "file" (which is just a tag for the XML), and maps the ID of a discord message to it. If you don't understand the utility of that, you'll understand it with the next command c

Syntax: touch {name_of_the_file} {id_of_the_message}

c

The command c (see) allows user to see the "content" of a file. Because we created a file with the ID of a message in it, this command, will show the message that correspond to the ID

Syntax: c {name_of_the_file}

mdid

It is possible that the ID you entered is wrong. To change this id you can use the command mdid

Syntax: mdid {name_of_the_file} {new_id_of_the_message}

rm

You want to delete a file or a directory? No problem, the rm command allows you to do that

Syntax: mdid {type (dir or file)} {name}

rn

If you are mistaken about the name of a file and want to rename it you can use the command rn

Syntax: rn {type (dir or file)} {actual_name} > {new_name}

mv

You want to move a file or even a directory to another location? Use mv

Syntax: mv {type (dir or file)} {name_of_the_file_or_dir_you_want_to_mv} > {dir}

mv..

This command is the same as cd.. for cd but for mv. If you want to move a file or a directory to the directory before the one you are in, use mv.

Syntax: mv.. {type (dir or file)} {name_of_the_file_or_dir_you_want_to_mv}

help

This is the final command. This command can be used if you don't know what to do or if you don't know the use of a command and can be used in two ways

Just help

If you only write "help". You'll see the list of commands. (I added a (- ADMIN) for this example, but didnt implemented it)

Syntax: help

help + cmd

However, if you want to have more information about a command, you can write help + the command

Syntax : help {cmd}

Extensions I used

ETREE

The xml.etree.ElementTree module implements a simple and efficient API for parsing and creating XML data. This is normally already installed with Python. More information here: https://docs.python.org/3/library/xml.etree.elementtree.html

Discord

Since the bot is on Discord, we logically use Discord.py if you want to install it:

https://pypi.org/project/discord.py/

Documentation:

https://discordpy.readthedocs.io/en/latest/

You might also like...
A python script to convert an ucompressed Gnucash XML file to a text file for Ledger and hledger.

README 1 gnucash2ledger gnucash2ledger is a Python script based on the Github Gist by nonducor (nonducor/gcash2ledger.py). This Python script will tak

Python package to read and display segregated file names present in a directory based on type of the file

tpyfilestructure Python package to read and display segregated file names present in a directory based on type of the file. Installation You can insta

Search for files under the specified directory. Extract the file name and file path and import them as data.

Search for files under the specified directory. Extract the file name and file path and import them as data. Based on that, search for the file, select it and open it.

Small-File-Explorer - I coded a small file explorer with several options
Small-File-Explorer - I coded a small file explorer with several options

Petit explorateur de fichier / Small file explorer Pour la première option (création de répertoire) / For the first option (creation of a directory) e

Pti-file-format - Reverse engineering the Polyend Tracker instrument file format

pti-file-format Reverse engineering the Polyend Tracker instrument file format.

Generates a clean .txt file of contents of a 3 lined csv file

Generates a clean .txt file of contents of a 3 lined csv file. File contents is the .gml file of some function which stores the contents of the csv as a map.

Extract longest transcript or longest CDS transcript from GTF annotation file or gencode transcripts fasta file.

Extract longest transcript or longest CDS transcript from GTF annotation file or gencode transcripts fasta file.

File-manager - A basic file manager, written in Python

File Manager A basic file manager, written in Python. Installation Install Pytho

Two scripts help you to convert csv file to md file by template

Two scripts help you to convert csv file to md file by template. One help you generate multiple md files with different filenames from the first colume of csv file. Another can generate one md file with several blocks.

Owner
Main: Python3 Also: HTML/CSS/JS C# C++
null
Creates folders into a directory to categorize files in that directory by file extensions and move all things from sub-directories to current directory.

Categorize and Uncategorize Your Folders Table of Content TL;DR just take me to how to install. What are Extension Categorizer and Folder Dumper Insta

Furkan Baytekin 1 Oct 17, 2021
This is a file deletion program that asks you for an extension of a file (.mp3, .pdf, .docx, etc.) to delete all of the files in a dir that have that extension.

FileBulk This is a file deletion program that asks you for an extension of a file (.mp3, .pdf, .docx, etc.) to delete all of the files in a dir that h

Enoc Mena 1 Jun 26, 2022
🧹 Create symlinks for .m2ts files and classify them into directories in yyyy-mm format.

?? Create symlinks for .m2ts files and classify them into directories in yyyy-mm format.

Nep 2 Feb 7, 2022
Extract an archive file (zip file or tar file) stored on AWS S3

S3 Extract Extract an archive file (zip file or tar file) stored on AWS S3. Details Downloads archive from S3 into memory, then extract and re-upload

Evan 1 Dec 14, 2021
PaddingZip - a tool that you can craft a zip file that contains the padding characters between the file content.

PaddingZip - a tool that you can craft a zip file that contains the padding characters between the file content.

phithon 53 Nov 7, 2022
Python Fstab Generator is a small Python script to write and generate /etc/fstab files based on yaml file on Unix-like systems.

PyFstab Generator PyFstab Generator is a small Python script to write and generate /etc/fstab files based on yaml file on Unix-like systems. NOTE : Th

Mahdi 2 Nov 9, 2021
A JupyterLab extension that allows opening files and directories with external desktop applications.

A JupyterLab extension that allows opening files and directories with external desktop applications.

martinRenou 0 Oct 14, 2021
CredSweeper is a tool to detect credentials in any directories or files.

CredSweeper is a tool to detect credentials in any directories or files. CredSweeper could help users to detect unwanted exposure of credentials (such as personal information, token, passwords, api keys and etc) in advance. By scanning lines, filtering, and using AI model as option, CredSweeper reports lines with possible credentials, where the line is, and expected type of the credential as a result.

Samsung 54 Dec 13, 2022
This project is a set of programs that I use to create a README.md file.

?? codex-readme ?? codex-readme What is it? This project is a set of programs that I use to create a README.md file. How does it work? It reads progra

Tom Dörr 224 Jan 7, 2023
gitfs is a FUSE file system that fully integrates with git - Version controlled file system

gitfs is a FUSE file system that fully integrates with git. You can mount a remote repository's branch locally, and any subsequent changes made to the files will be automatically committed to the remote.

Presslabs 2.3k Jan 8, 2023