SpEcHiDe / UploadGram

https://pypi.org/project/uploadgram/
GNU Affero General Public License v3.0
102 stars 24 forks source link

Features request #4

Open tissole opened 2 years ago

tissole commented 2 years ago

I was thinking of these features:

  1. A solution for maintaining folder structure when uploading (that works for downloading too)
  2. A feature to prevent uploading duplicate files
  3. Add support for resuming, so the script does not upload from the beginning after the next use
  4. Increase speed by uploading files in parallel, useful for small files
  5. Add support for multiple pairs source-destination
  6. Add support for downloading too
  7. Make the script keep track of the volume uploaded, so the users can know the space required on their device when downloading
  8. Support for filtering the files uploaded

A big problem I have with TG is that I cannot replicate the folder structure when uploading files. For example when uploading courses that have multiple folders/subfolders, After the upload, I don't know when a module ends and another begins or when a course ends and another begins, or which video belongs to what course. All are mixed.

So I was thinking of some solutions to resolve this issue. Is possible to upload a text file with the name of the folder/subfolder before uploading the files contained in them?

Another fix is to caption the files with the name of the folders/subfolders like this:

https://github.com/khrj/teledrive https://teledrive.khushrajrathod.com

Unfortunately, the program is broken on Windows and the developer does not maintain the project anymore.

The solution implemented is to have files captioned with the file path + file name. This together with checksums of files is stored in a JSON file in Saved Messages. This solves important issues:

The program uses SHA-256 but this is CPU and storage-intensive. Maybe something lighter can be used, a fast non-cryptographic algorithm. This is used by TG too, is supporting hardware acceleration (AVX2), and has a python implementation:

https://github.com/Cyan4973/xxHash https://github.com/Cyan4973/xxHash/wiki/Performance-comparison

Currently, the upload speed is very good for bigger files but it slows down when uploading smaller files. Uploading files in parallel will be beneficial in this case. Can this be made for UploadGram?

https://gist.github.com/painor/7e74de80ae0c819d3e9abcf9989a8dd6

Now only one folder path can be used for upload. Please add an option for choosing multiple folder paths. This is useful if the folders are in different partitions and cannot be put in a single parent folder. Also, it will be helpful if the users could choose multiple pairs of folders-destination. For example folder A to be uploaded in channel B, folder C in channel D.

Another handy feature is to keep track of data volume uploaded, convenient if users choose later to download everything or only some folders, to have an idea of space needed on HDD. Of course, this will require adding an option to download files, currently missing from the script.

A filtering feature will be nice to have, working by whitelist or blacklist, so the users can upload only some files from the folders or preventing other types to be upload.

Thank you for your time!

tissole commented 2 years ago

A solution for issue 3, resuming after the FloowWaits is provided in https://github.com/SpEcHiDe/UploadGram/issues/1#issuecomment-983690475