Skip to content

1Nu55et1/WikiPaper-API

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

WikiPaper-API

[WIP] Paused Project | Proyecto Pausado

Roadmap para la siguiente actualización.

  • Añadir soporte para multiples lenguajes (Español e Ingles por ahora) *
  • Implementar logs ***
  • interfaz de usuario grafica ****
  • interfaz de usuario de linea de comandos **
  • Mejorar mensajes de errores *
  • crear un panel para el servidor (tambien requiere recrear toda la API) *****

Roadmap for the next update

  • Add support for multiple languages (Spanish and English for now) *
  • Implement logs ***
  • Graphical user interface ****
  • Command-line user interface **
  • Improve error messages *
  • Create an interface for the server control panel (which also requires rebuilding the API) *****

Acerca de las actualizaciones or About Updates

#17/01/2024 | 03:43 AM

At the moment it is still in work in progress but the server is close to 90% ready for now it is quite simple and still in development but I saw the need to make use of a client because I am having some bugs but I am working on it for now it works quite well but the latest bugs are solved I am going to add version 1.0 and I will try to prepare the public servant.

#17/01/2024 | 03:43 AM

Por el momento todavía está en trabajo en progreso pero el servidor está cerca del 90% listo por ahora es bastante simple y aún en desarrollo pero vi la necesidad de hacer uso de un cliente porque estoy teniendo algunos errores pero estoy trabajando en ello por ahora funciona bastante bien pero los últimos errores están solucionados voy a agregar la versión 1.0 y trataré de Preparar al servidor público.

#18/01/2024 | 08:56 AM

Some changes were made and errors were fixed. It should be usable with curl and the client would not be required. I am working on resolving a final error with file upload and after that, file lists would be available. The request of file content and file upload are already done, but there are some security issues that are being worked on. They are actually done, but there are some errors that are being resolved. It may be ready in a week, at most in one day.

#18/01/2024 | 08:56 AM

Se realizaron algunos cambios y se corrigieron errores. Debería ser utilizable con curl y el cliente no sería necesario. Estoy trabajando para resolver un error final con la carga de archivos y después de eso, las listas de archivos estarían disponibles. La solicitud de contenido de archivos y la carga de archivos ya están realizadas, pero hay algunos problemas de seguridad en los que se está trabajando. En realidad están hechos, pero hay algunos errores que se están resolviendo. Puede estar listo en una semana, como mucho en un día.

#19/01/2024 | 02:25 AM

The basic logic of the server is 100% complete. The public server will be ready from tomorrow at around 5pm. I will start working on creating documentation now, so you can learn how to implement it in your code if you want. You must give credit if you do. The main functions will be revealed. Binaries will be made for both Windows and Linux, but it will take a little longer for Linux because I don't know how to compile for Linux yet. I'm going to try to learn. After finishing the documentation, I will work on a graphical client. I plan to try to learn Flutter or something similar to bring an app to Android as well. That's all the update for now. I plan to add a roadmap soon. It's quite possible that it will also be when the public server opens at around 1am. I will post a place where you can share your ideas for adding to the API. Please keep in mind that this is my first major project and I am also a high school junior. Please be patient. I would like to inform you that this is Argentina time. I plan to create a Discord server where you can interact with me. Thank you for your time.

#19/01/2024 | 02:25 AM

¡Buenas noticias! El núcleo del servidor está 100% completo y ¡la versión pública estará disponible mañana a las 5pm! Mientras tanto, me dedicaré a crear la documentación para que puedas implementarlo en tu código si lo deseas. Eso sí, ¡recuerda darme crédito! Te explicaré las funciones principales. También prepararé binarios para Windows y Linux, aunque tardaré un poco más con Linux porque aún no sé compilar para ese sistema. ¡Pero lo intentaré! Luego de la documentación, me enfocaré en un cliente gráfico. También quiero aprender Flutter o algo similar para crear una app para Android. De momento, ¡eso es todo! Pronto subiré un roadmap, quizás a la 1am junto con la apertura del servidor público. Y abriré un espacio para que compartas tus ideas para ampliar la API. Ten en cuenta que este es mi primer proyecto grande y que aún estoy en la secundaria, así que ¡sé paciente! Por cierto, todo esto está basado en el horario de Argentina. También planeo crear un servidor de Discord para que podamos interactuar. ¡Gracias por tu tiempo!

#19/01/2024 | 5:05 PM

Here are some security limitations I'll implement: file size limit, only .txt and .md files can be uploaded, and only to the unofficial folder. I'll also release the server code in the future, within a week or two. By the time the public server is up, I'll have already tried to attack it to test its security. So, there will be a minimum of security. I'm also working on a graphics client with Flutter.

#19/01/2024 | 5:05 PM

Implementé algunas limitaciones de seguridad, como un límite de tamaño de archivo, solo se permiten archivos .txt y .md, y solo se pueden subir a la carpeta "unofficial". Igualmente, en el futuro, dentro de una semana o dos, posiblemente liberaré el código del servidor también. Para cuando el servidor público esté disponible, ya habré intentado hacer ataques informáticos al mismo para probar su seguridad. Por lo tanto, habrá un mínimo de seguridad. Estoy trabajando tambien en un cliente grafico con flutter exactamente con el modulo flet de python.

#22/01/2024 | 12:12 AM

I'm really sorry about the server outage last weekend. As you know, I had to change the operating system of the server from ArchLinux to Ubuntu Server. This caused some problems, but the documentation is now corrected and the instance that appears in the examples is now the new public instance. The interface is progressing well. I wanted to make it with Flet, but Flet has been giving me some headaches. It's possible that I can resolve them, but it's also possible that the first interface will be released with Tkinter. I'm also starting to work on the Discord server. I hope it will be ready by next week. Thanks for your patience and understanding. I forgot one thing now all the errors are in english.

#22/01/2024 | 12:12 AM

Lamento mucho la caída del servidor ayer. Como saben o no, tuve que cambiar el sistema operativo del servidor de ArchLinux a Ubuntu Server. Esto se debe a que ArchLinux me causó algunos problemas, pero la documentación ya está corregida y la instancia que aparece en los ejemplos ahora es la nueva instancia pública. La interfaz está avanzando bien. Quería hacerla con Flet, pero he tenido algunos problemas. Es posible que pueda resolverlos, pero también es posible que la primera interfaz se lance con Tkinter. También estoy empezando a trabajar en el servidor de Discord. Espero que esté listo para la próxima semana y me olvide una cosa que es que ahora todos los errores estan en ingles. Gracias por su paciencia y comprensión.

#27/01/2024 | 03:41 PM

The roadmap has been added; for now, it is not global and only shows what is planned to be added for the next update. Additionally, it has a star system indicating the difficulty. For now, the roadmap will look something like this. If for any reason it's not possible to add a feature that was planned and it wasn't too difficult, it will be prioritized for the next update. Furthermore, I had to pause working on the Discord server for now to focus on incorporating these features.

#27/01/2024 | 03:41 PM

El roadmap ha sido añadido; por ahora, no es global y solo muestra lo que se planea añadir para la próxima actualización. Además, cuenta con un sistema de estrellas que indica la dificultad. Por ahora, el roadmap se verá algo así. Si por alguna razón al final no es posible añadir alguna de las características que se planeaba incluir y no era muy difícil, se priorizará para ser añadida en la próxima actualización. Además, ahora mismo tuve que detenerme de trabajar en el servidor de Discord para concentrarme en la incorporación de estas características.

#29/01/2024 | 01:58 PM

Now, the server script versions are available, but unfortunately, I just realized that the server had been turned off. I apologize for any inconvenience this may cause. The latest version is currently implemented, as mentioned in the roadmap, and I plan to create a separate version for a control panel possibly using Flask-FastAPI. However, due to the difficulty involved, I cannot promise anything at this point, but I will try my best to make it happen. Currently, only the latest version is implemented, and there are plans to add additional features such as disabling certain functions, choosing whether to put the server into maintenance mode, modifying ports and IP addresses, etc., but these will not be available yet. As for the client, I am still working on implementing essential features and creating a graphical interface, but it is not ready yet. In the future, once people begin uploading files, I will upload them to a cloud and provide a link to access the same. You can ask me in Discord for the link to download the files, but for now, I am focusing mainly on implementing necessary functions and improving the client. Eventually, I hope to create a guide explaining how servers work and how to implement them in various languages, but for now, I will try my best to resolve the server issue as soon as possible and ensure that it doesn't happen again.

#29/01/2024 | 01:58 PM

¡Ya están disponibles las nuevas versiones del script del servidor! Desafortunadamente, el servidor se apagó sin que me diera cuenta. Me disculpo por cualquier inconveniente que esto haya causado. Por ahora, solo la versión "latest" tiene las funciones que están en el roadmap. Planeo hacer una versión aparte para un dashboard del servidor, probablemente con Flet-FastAPI. No prometo nada, ya que es un proyecto complicado, pero si sale, puede que esté un poco desactualizada con respecto a la versión de terminal. También planeo hacer que se puedan desactivar o activar algunas funciones, como poner el servidor en modo mantenimiento, usar túneles de cloudflared, cambiar el puerto o la IP, etc. El cliente gráfico está en desarrollo. Cuando la gente pueda subir archivos, los subiré a una nube. Podéis preguntarme en Discord por un enlace a la nube para acceder a los archivos. Por ahora, estoy trabajando principalmente en las funciones necesarias y en el cliente. En el futuro, igual hago una guía sobre cómo crear servidores. Voy a arreglar el problema del servidor lo antes posible e implementar algunas medidas de seguridad para que no vuelva a pasar.

#05/02/2024 | 11:38 AM

Logré implementar una interfaz gráfica con PyQt5 y también solucioné un error que surgió al añadir soporte multi-idiomas. Además, mejoré un poco los comentarios y añadí docstrings. Voy a subirlo poco después de esto a la interfaz. Por ahora, estoy trabajando en la compilación; al menos para Windows estará listo en breve. Linux posiblemente me tarde un poco más. Además, después de eso, estaré temporalmente un poco inactivo por aquí, ya que voy a trabajar en la interfaz del dashboard y reinventar la API. También me pondré a trabajar en el servidor de Discord cuando pueda.

#05/02/2024 | 11:38 AM

I managed to implement a graphical interface with PyQt5 and also resolved an error that occurred when adding multi-language support. Additionally, I improved the comments a bit and added docstrings. I'll upload it shortly after this to the interface. For now, I'm working on the compilation; at least for Windows, it'll be ready soon. Linux might take a bit longer. Furthermore, after that, I'll be temporarily less active here as I'll be working on the dashboard interface and reinventing the API. I'll also start working on the Discord server when I can.

###DOCS EN ESPAÑOL

Funciones principales

El sistema cuenta con tres funciones principales:

  • List: Esta función genera una lista de los archivos contenidos en la carpeta seleccionada. La carpeta puede ser official o unofficial. El método utilizado es GET.
  • Upload: Esta función permite subir archivos a la carpeta seleccionada. Las limitaciones actuales son: tamaño máximo de 10 MB y extensiones permitidas: .txt y .md. Si los usuarios sugieren extensiones adicionales o un tamaño máximo mayor, se considerarán las solicitudes. El método utilizado es POST.
  • File: Esta función permite obtener el contenido de un archivo determinado. Para ello, es necesario haber utilizado previamente la función List para obtener el nombre y el tipo del archivo. El método utilizado es POST.

El lanzamiento del servidor Discord está previsto para dentro de una semana aproximadamente.

Listar archivos

Para listar los archivos en la carpeta "official":

curl -X GET https://long-right-analyzed-diameter.trycloudflare.com/list?path=official&language={lenguaje por ahora solo soporta ingles o español y se usan "es" y "en" respectivamente}

Para listar los archivos en la carpeta "unofficial":

curl -X GET https://long-right-analyzed-diameter.trycloudflare.com/list?path=unofficial&language={lenguaje por ahora solo soporta ingles o español y se usan "es" y "en" respectivamente}

Subir un archivo

Para subir un archivo llamado "example.txt" a la carpeta "unofficial":

curl -F file=@example.txt -F "language={lenguaje}" https://long-right-analyzed-diameter.trycloudflare.com/upload

Leer el contenido de un archivo

Para leer el contenido del archivo "example.md" en la carpeta "official":

curl -X POST https://long-right-analyzed-diameter.trycloudflare.com/file/official/example.md?lenguage={lenguaje}

Para leer el contenido del archivo "example.txt" en la carpeta "unofficial":

curl -X POST https://long-right-analyzed-diameter.trycloudflare.com/file/unofficial/example.txt?lenguage={lenguaje}

Ejemplos de parámetros

El parámetro path es opcional y puede establecerse en "official" o "unofficial" para especificar la carpeta que se desea consultar.

El parámetro file es obligatorio y debe especificar el archivo que se desea subir o leer. Puede ser un archivo local o una URL.

Ejemplo de error

Si se intenta subir un archivo de un tipo no permitido, se recibirá un error HTTP 400:

curl -F file=@example.exe -F "language=es" https://long-right-analyzed-diameter.trycloudflare.com/upload
< HTTP/1.1 400 Bad Request
< Content-Type: application/json

{
  "detail": "File type not allowed. Only .md or .txt files are allowed."
}

###DOCS IN ENGLISH

Main Functions

The system has three main functions:

  • List: This function generates a list of the files contained in the selected folder. The folder can be official or unofficial. The method used is GET.
  • Upload: This function allows you to upload files to the selected folder. The current limitations are: maximum size of 10 MB and allowed extensions: .txt and .md. If users suggest additional extensions or a larger maximum size, the requests will be considered. The method used is POST.
  • File: This function allows you to get the content of a specific file. To do this, you must have previously used the List function to obtain the name and type of the file. The method used is POST.

The launch of the Discord server is scheduled for within a week approximately.

Listing files

To list the files in the "official" folder, run the following command:

curl -X GET https://long-right-analyzed-diameter.trycloudflare.com/list?path=official&lenguage={here you write the lenguage but for now only support "es" or "en"}

To list the files in the "unofficial" folder, run the following command:

curl -X GET https://long-right-analyzed-diameter.trycloudflare.com/list?path=unofficial&lenguage={here you write the lenguage but for now only support "es" or "en"}

Uploading a file

To upload the file "example.txt" to the "unofficial" folder, run the following command:

curl -F file=@example.txt -F "language=en" https://long-right-analyzed-diameter.trycloudflare.com/upload

Reading the contents of a file

To read the contents of the file "example.md" in the "official" folder, run the following command:

curl -X POST https://long-right-analyzed-diameter.trycloudflare.com/file/official/example.md?lenguage={lenguage}

To read the contents of the file "example.txt" in the "unofficial" folder, run the following command:

curl -X POST https://long-right-analyzed-diameter.trycloudflare.com/file/unofficial/example.txt?lenguage={lenguage}

Parameter examples

The path parameter is optional. If it is not specified, the default folder is "official".

The file parameter is required. It must specify the path to the file to be uploaded or read. The path can be a local file or a URL.

Error example

If an attempt is made to upload a file of an unsupported type, an HTTP 400 error will be returned. The error response will include the following JSON object:

{
 "detail": "File type not allowed. Only .md or .txt files are allowed."
}

Alt

About

[WIP]

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages