fkalis / bash-onedrive-upload

Upload files to onedrive via linux command line
MIT License
308 stars 72 forks source link

Can you add a funcation? #36

Closed 0oVicero0 closed 7 years ago

0oVicero0 commented 8 years ago

Cloud you add a funcation to list file name for 'OneDrive for Business'? Thanks!

rootik commented 8 years ago

I have some progress. This is test run:

./onedriveb-ls
total 3 items
xxx yyy zzz           0      2016-08-23T05:51:41Z    Backup
xxx yyy zzz           0      2016-08-15T10:45:55Z    Protected
xxx yyy zzz      422340      2016-08-09T11:15:25Z    Office 365 Customer Security Considerations Preview.xlsx
0oVicero0 commented 8 years ago

Yes, This is what I want. Thanks~ It help me a lot. Where I can find it ?

and it could get the link funcation (the link not need auth)? sometimes, I will share some files to my classmates. I fell bother to action in web. It is sounds hard to implement this function.

rootik commented 8 years ago

@0oVicero0 finally you can test it. The script not production yet, so you need download it from my staging branch. Here is sample output. Folder contents:

./onedriveb-ls Protected/Test
Protected/Test folder contents
2016-11-02 10:50  d                0    Test1
2016-11-02 10:49  d                1    Test2
2016-11-02 10:50                  12    file1.txt
        total number of items 3
        total 12 bytes in 1 file(s)

And particular file details with the anonymous download link:

./onedriveb-ls /Protected/Test/Test2/file.txt
2016-11-02 10:49                  10    file.txt        https://staging.sharepoint.com/personal/rootik_staging_com/_layouts/15/download.aspx?guestaccesstoken=ZIOTPVeUYiVHDgvKEb8cMnn32c8As0XGbfm3KSrAe5A%3d&docid=1fee4507b518c42a4acd49e3dd3d25626&expiration=2016-11-02T15%3a12%3a37.000Z&userid=3&authurl=True&NeverAuth=True
0oVicero0 commented 8 years ago

You are awesome ! Thanks~

0oVicero0 commented 8 years ago

There is a problem : List some files name showed unicode.

How to fix it?

rootik commented 8 years ago

This was expected :) I have implemented unicode characters support. You can download modified onedriveb-base and onedriveb-ls files from my staging branch and test. Thanx for testing it!

rootik commented 8 years ago

Last item name in unicode:

./onedriveb-ls /Protected/Test
/Protected/Test folder contents
2016-11-02 10:50  d                0    Test1
2016-11-02 10:49  d                1    Test2
2016-11-02 10:50                  12    file1.txt
2016-11-02 21:53                   0    тест.txt
        total number of items 4
        total 12 bytes in 2 file(s)
0oVicero0 commented 8 years ago

fixed it! It works well !!! Thanks fix it~

rootik commented 8 years ago

Some news: better unicode characters support in the new commit.

0oVicero0 commented 8 years ago

Very good! It's OK~