sanjayseshan / spikeprime-tools

Tools for interacting with SPIKE PRIME Micropython environment
30 stars 9 forks source link

Print the decoded file name on the list command #3

Closed BertLindeman closed 3 years ago

BertLindeman commented 3 years ago

Currently the file name shown is the base64 coded file name.

Will create a pull request with these changes:

Feel free to comment.

Example output:

Slot Decoded Name                               Size Last Modified        Project_id   Type
   0 List hub files                             338b 2020-10-28 19:06:20  WhPJ4ufg-ORc python
   1 Maak kennis met Tricky!                   2543b 2020-10-30 10:29:38  hT0Ba_y4OZza scratch
   2 Basketbalheld                             4681b 2020-10-30 10:33:55  8rbqQmfGkA1v scratch
   3 Slamdunk!                                 5395b 2020-10-30 10:35:55  cR3EJBZ0mJPA scratch
   4 Tijd voor een feestje                     8224b 2020-10-25 09:48:51  lW88RR74hwJU scratch
   6 Charlie aanpassen                        10594b 2020-10-27 13:00:47  q0r-tX9GYZ8o scratch
   7 Kettingreactie 1                          4622b 2020-10-31 12:43:28  VBtyj0bpOt05 scratch
   8 Verlegen ventje                           7491b 2020-10-27 14:22:03  KRHztmiCi3jP scratch
   9 Drumsolo                                  7727b 2020-10-27 14:23:43  660YFcIjW1um scratch
  10 Wat een drummer!                          8651b 2020-10-27 14:26:05  a-CaJjwqQQyn scratch
  13 Tijd om te skiboarden 1                   4431b 2020-10-27 12:52:59  x2cOVNHrPOud scratch
  14 Multiplayer minigolf                      3765b 2020-10-27 14:27:35  kcKZsGPVGwjT scratch
Storage free 28424kb of total 31744kb
BertLindeman commented 3 years ago

The example above is from the Mindstorms Robot Inventor hub.

Another example. This one is from a Spike Prime hub:

Slot Decoded Name                               Size Last Modified        Project_id   Type
   0 availablemodules                           740b 2020-10-28 21:54:08  EePEg27-WCsk python
   1 try_modules                                357b 2020-09-18 10:39:11  JZGKRQp5EUqj python
   3 directory_list                            1725b 2020-07-27 19:54:17  AIKWkHYSy_Z9 python
   9 PrimeCuber-v1p1                           1662b 2020-07-26 18:02:38  3z6tt5wxuY6u python
  10 availablemodules                           494b 2020-07-26 22:51:58  EePEg27-WCsk python
  13 Motors and Sensors                         928b 2020-10-29 19:32:08  RHyxoO9ZeutF scratch
  17 hub/program_template.py                    306b 2020-10-29 13:19:26
  18 hub/program_template.py                    519b 2020-10-29 20:04:00  50uN1ZaRpHj2 python
  19 python_colorsensor                        1447b 2020-07-27 18:57:02  gQk2tmN-Bts4 python
Storage free 28472kb of total 31744kb
BertLindeman commented 3 years ago

Solved by merge of pull request #4