Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Numbered files are uploaded in weird order #113

Closed
tissole opened this issue May 2, 2021 · 5 comments
Closed

Numbered files are uploaded in weird order #113

tissole opened this issue May 2, 2021 · 5 comments
Assignees
Milestone

Comments

@tissole
Copy link

tissole commented May 2, 2021

Hello and thank you for developing this app. My config:

  • telegram-upload version: 0.4.0
  • Python version: 3.9.2
  • Operating System: Windows 10
  • Dependencies list (run pip freeze):
    cffi==1.14.5
    click==7.1.2
    cryptg==0.2.post4
    hachoir==3.1.2
    pyaes==1.6.1
    pyasn1==0.4.8
    pycparser==2.20
    rsa==4.7.2
    telegram-upload==0.4.0
    Telethon==1.21.1

Description

When files are numbered 1, 2, 3...10, 11, 12, etc, the app uploads them in a weird manner 1, 10, 11, 12...2, 3, 4, etc

What I Did

telegram-upload --directories recursive -a 'D:\Docs'

I wish that the files are uploaded like this: 1, 2, 3, 4... 10, 11, 12, etc

@Nekmo Nekmo self-assigned this Jun 1, 2021
@Nekmo
Copy link
Owner

Nekmo commented Jun 1, 2021

It will be added in a future version (the files will be sorted alphabetically). Thanks!

@tissole
Copy link
Author

tissole commented Jun 3, 2021

Great! Thank you!

@ElektroStudios
Copy link

ElektroStudios commented Jun 29, 2021

It will be added in a future version (the files will be sorted alphabetically). Thanks!

Just if it helps:

In order to upload the files in the order that the user requests, you would mean the files will be sorted by Natural Sort Order (Windows Explorer sorting). Which is exact the opposite of the current alphabetical sort of telegram-upload:

Alphabetical sorting:
z11
z2

Natural sorting:
z2
z11

https://en.wikipedia.org/wiki/Natural_sort_order

@tissole
Copy link
Author

tissole commented Aug 8, 2021

@ElektroStudios Yes, this is what I want, but I didn't know the correct name for this feature, Thank you for the info!

@Nekmo Nekmo added this to the v0.6.0 milestone Sep 16, 2021
@Nekmo
Copy link
Owner

Nekmo commented Jun 14, 2023

Fixed in v0.6.0. Use the --sort parameter. The natsort Python package must be installed for natural ordering.

pip install natsort

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants