Open jiahuahl opened 3 years ago
yikes
Why a command? Why not open files through UI???
Why a command? Why not open files through UI???
we'll have both, i wanna start w command lines first as it'll be easier hm idk, it might not be easier as parsing may be difficult? idk, probably not more difficult than dealing with all the different UI panels though...
do after #6 and #7
user should be able to type into the app a command to add images or sounds:
command:
add <filepath> [-a <aliases>] [-t <tags>] [-c]
arguments:
syntax notes:
now that i think about it it would probably be a good idea to implement some sort of generic / reusable 'parse arguments' function - basically find and separate each flag and their subsequent strings first, so it'll be easier.. up to you though.
we should automatically detect if the file is an image or a sound, then should call the appropriate function implemented in #6 or #7 to save media into database
if the filetype doesn't match our supported types just return an error message
if for any reason the command fails show usage instructions ^ basically paraphrase or copy the specs above
examples - these include (nasty) edge cases for parsing. feel free to use these as test cases :
add yeehaw.jpg -a yeehaw, cowboy, wild west -t yeehaw, cowboy, guns -c
add oof.wav hurt sound, roblox hurt sound
add clownnose.mp3 -t funny, silly -a clown nose, clown honk honk, honk clown, peepoClown
add unravel.mp3 -c
add birdup.png -c bird up, -t eric-andre, bird, funny,
add notlikethis.jpg -t aiyo, sad -a not-like-this
add thisisfine.jpg