Closed achoudh5 closed 4 years ago
I have prior experience in building GUI with Python. I would like to create and contribute to this task.
Can you assign it to me?
Logic code will be in zip.py, updated zip.py !
Thanks @achoudh5 for assigning this task.
Can you tell me what type of output you want? Do you just want to display the parsed excel sheet on the GUI? or Do you want to save the parsed excel sheet as soon as the user clicks the button?
Good Question @tanya3007 !
I am expecting a drag and drop GUI where user can drop their files
After parsing file using the zip.py code, the output gets displayed on the screen with a download file option . This file is the one that gets generated after parsing
Which web-framework you will be using for this @tanya3007 ? I have something in Django if you like.
Okay Sure. But, I'll be working with tkinter to make the GUI.
okay, yeah I got one with tkinter as well. Let me upload that for you @tanya3007
Just added one of the current tkinter code I am using, it's under GUI folder. Please eliminate errors, I cannot see the button primarily due to version of tkinter on mac. Let me know if you have any questions.
I went through the code. I was writing a code similar to the one you gave. I'll make a PR soon. You can then check it then.
Also, I am not able to add that drag and drop feature. Probably, tkinter currently doesn't provide such feature. Instead of that, I have added a Dialog Box, through which one can browse to the file directory and open it.
I will import the zip.py in my GUI code and will pass the filename received from the dialog box. From there, you can return the columns and rows which you need to display on the screen. So, can you tell me, to which function shall I pass the filename to? and also, in what format will you return the data? Knowing these I can write the code and connect with the zip.py file.
Update :- If the data to be displayed is the one in the last PR I made ( list of dictionaries ), I can display it in two columns and N rows. Will that work?
Fetch and Pull the latest changes, I have a decent sample input file covering couple of cases
Yes, dialog box as input sounds good!
Under zip.py script, ss_inp = input('Enter the path to excel sheet\n')
is where I am prompting user to enter input, maybe you can store the uploaded file name path there.
Once you run zip.py the input excel file will get parsed and all changes will be applied to the same input file. We want to return the same file as output. Can you make like a box with heading input and Output where under Input, you ask user to upload file and under output you throw that file?
Some more considerations:-
Also, will upload be multiple select or user can just uplaod a single file?
Once the script runs one time, when a new file is uploaded does the previous file gets clipped onto the GUI or what happens?
Okay. Sounds Good. I'll make some changes in the zip,py to make it accept the filepath as a parameter from the GUI.
I'll complete the code and that Input and Output Section.
The User can upload one file at once. As soon as the user selects a file, the script will run and the GUI will be updated. The user can then, again click the button to browse and upload another file. Again as soon as the user selects a file, the script will run and GUI will be updated.
Update 1:- There are two inputs in the zip.py . One is the filepath, another is the Sheet Number. Shall I hardcode the sheet number to be 1?
Update 2:- If the changes are to be made on the same file, is there a need for Download button?
No we have to take both input from user, based on sheet the output file changes. How about you make a box beneath where upload button/drag drop file will be present? In that box will be the input for the sheet.
After drag drop and entry of sheet number in the box, we will cover both cases and then zip.py won't prompt anython. Let me know if you have any question.
Note:- zip.py is constantly updated, make sure you fetch and pull the latest changes.
Update No harm in giving an extra button, imagine the person is noob. We need to cover our tracks and give them as much options as possible :D
I made a PR as per you said.
tkinter module must be installed. There has to be some changes in zip.py. I am mentioning them.
Line 331: def main( y, x=1): Line 341: inp = x Line 342: ss_inp = y
There are some changes in valid_ip.py as well.
Line 7 and Line 9 must be cut and pasted in main at Line 67
Rest, the GUI code is completed. I have tried to cover everything. Can you merge this PR? Issue #19
Update :- I was not able to change as I uploaded the file on browser. So, was having some issues. That's why mentioned the changes.
reviewing...
@tanya3007 I made some comment on your PR!
GUI should contain atleast:-
Upload button to upload an excel sheet as input
Parse the excel file using the code logic (leave the logic space blank for now) Logic code will be in python
After parsing the input excel file, the GUI should return an Output Excel File which will be the newly manipulated Excel File
GUI can be made using any web-framework of your choice
Documentation