Open simonw opened 2 years ago
Not clear if I can construct a ?q=
query that gets everything where the ID is x or y or z - or if I need to make a separate API call for each provided file ID.
id = '10BOHGDUYa7lBjUSo26YFCHTpgEmtXabdVFaopCTh1vU'
does not work as a valid q=
expression.
how to sort by "untrashed" files in--nl
view
!google-drive-to-sqlite files --folder xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx --nl -q '"trashed": false'
<<<<<???
β β β ππ»ππ»ππ»ππ»π₯³π₯³π₯³π₯³π₯³π₯³π₯³
import json
file=[]
file=!google-drive-to-sqlite files --folder 1ph2v7i3Qm8U6KVPh1DEJ1UCXRKVMYEY0 --nl
#print(type(file))
print(len(file))
count=0
k=1 #k = 1 is taken as <class 'IPython.utils.text.SList'> variable file first row is the describtion of the folder itself
while k!=len(file):
b = json.loads(file[k]) #converts <class 'IPython.utils.text.SList'> first row to dictionary
#print(b)
#print(type(file[0]))
#print(b["trashed"])
if(b["trashed"]==0): #checking if the file is trashed or not i.e. (trashed = 1 , untrashed = 0)
count+=1 #difined above so that it can count the number of undeleted files as remaining would be equals to the available files `` k+=1
print(count) #now we can use the count value confidently to keep track of files uploaded and available so that we can start processing the next file i.e.
successfully working as expected ππ»ππ»thank you very much here implemented >>> [https://github.com/1kaiser/blender-colab/blob/master/BlenderColab.ipynb]
i was using [gshell](https://github.com/wkentaro/gshell)
by @wkentaro previously but the command !gshell --id xxxxxxxxxxxxxxxxxxxxxxxxx ls
lists only 100 datas from the folder-id , hence switched to implement yours SQL folder access its kind of NUMA
to quickly get the folder+file structure yet gshell is useful for uploading/downloading large files...thats what i learnt ! ππ
I want to be able to fetch only specific files that I list into the database.