-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
179 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# setup.py | ||
from distutils.core import setup | ||
import py2exe | ||
|
||
setup(windows=['ListGen.pyw']) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2018 Parry Pardun | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
; Script generated by the Inno Setup Script Wizard. | ||
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES! | ||
|
||
[Setup] | ||
; NOTE: The value of AppId uniquely identifies this application. | ||
; Do not use the same AppId value in installers for other applications. | ||
; (To generate a new GUID, click Tools | Generate GUID inside the IDE.) | ||
AppId={{EA7EA0EA-3792-45AF-BC1A-636C44900442} | ||
AppName=ListGen | ||
AppVersion=1.0 | ||
;AppVerName=ListGen 1.0 | ||
AppPublisher=Parry Pardun | ||
AppPublisherURL=https://github.com/pjpardun/listgen | ||
AppSupportURL=https://github.com/pjpardun/listgen | ||
AppUpdatesURL=https://github.com/pjpardun/listgen | ||
DefaultDirName={pf}\ListGen | ||
DisableProgramGroupPage=yes | ||
LicenseFile=C:\Python projects\ListGen\Releases\LICENSE | ||
OutputBaseFilename=ListGen 1.0 Setup | ||
SetupIconFile=C:\Python projects\ListGen\Releases\list.ico | ||
Compression=lzma | ||
SolidCompression=yes | ||
|
||
[Languages] | ||
Name: "english"; MessagesFile: "compiler:Default.isl" | ||
|
||
[Tasks] | ||
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked | ||
|
||
[Files] | ||
Source: "C:\Python projects\ListGen\Source\EXE\dist\ListGen 1.0.exe"; DestDir: "{app}"; Flags: ignoreversion | ||
Source: "C:\Python projects\ListGen\Source\EXE\dist\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs | ||
; NOTE: Don't use "Flags: ignoreversion" on any shared system files | ||
|
||
[Icons] | ||
Name: "{commonprograms}\ListGen"; Filename: "{app}\ListGen 1.0.exe"; IconFilename: "{app}\list.ico" | ||
Name: "{commondesktop}\ListGen"; Filename: "{app}\ListGen 1.0.exe"; Tasks: desktopicon; IconFilename: "{app}\list.ico" | ||
|
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,115 @@ | ||
# Python 3.6.4 | ||
import tkinter as tk | ||
from tkinter import ttk | ||
import os | ||
|
||
|
||
window = tk.Tk() | ||
window.iconbitmap(os.path.abspath('./list.ico')) | ||
window.title('ListGen 1.0') | ||
window.resizable(0,0) | ||
|
||
|
||
#functions | ||
def convert_delim(): | ||
text2.delete('1.0',tk.END) | ||
varget1 = combovar1.get() | ||
|
||
if varget1 == ',': | ||
rtext = ',' | ||
elif varget1 == ';': | ||
rtext = ';' | ||
elif varget1 == '|': | ||
rtext = ';' | ||
|
||
input = text1.get('1.0',tk.END) | ||
output = input.replace('\n',rtext) | ||
output = output[:-1] | ||
if output.endswith(rtext): | ||
output = output[:-1] | ||
text2.insert(tk.END,output) | ||
|
||
|
||
def convert_line(): | ||
text1.delete('1.0',tk.END) | ||
varget1 = combovar1.get() | ||
|
||
if varget1 == ',': | ||
rtext = ',' | ||
elif varget1 == ';': | ||
rtext = ';' | ||
elif varget1 == '|': | ||
rtext = ';' | ||
|
||
|
||
input = text2.get('1.0',tk.END) | ||
output = input.replace(rtext,'\n') | ||
output = output[:-1] | ||
if output.endswith('\n'): | ||
output = output[:-1] | ||
text1.insert(tk.END,output) | ||
|
||
|
||
def clearall(): | ||
text1.delete('1.0',tk.END) | ||
text2.delete('1.0',tk.END) | ||
|
||
|
||
def copy_text1(): | ||
input = text1.get('1.0',tk.END) | ||
window.clipboard_clear() | ||
window.clipboard_append(input) | ||
|
||
|
||
def copy_text2(): | ||
input = text2.get('1.0',tk.END) | ||
window.clipboard_clear() | ||
window.clipboard_append(input) | ||
|
||
# input dropdown and label | ||
label1 = tk.Label(text='Column Data:',font=("Arial",10)).grid(column=0,row=0,sticky='W',padx=10,pady=10) | ||
text1 = tk.Text(window,height=20,width=20) | ||
text1.grid(column=0,row=1,rowspan=20,padx=10,pady=10) | ||
scrollbar1 = tk.Scrollbar(window, orient='vertical') | ||
scrollbar1.grid(column=0,row=1,rowspan=20,sticky='N'+'S'+'E',padx=10,pady=10) | ||
scrollbar1.config( command = text1.yview ) | ||
text1.configure(yscrollcommand=scrollbar1.set) | ||
|
||
combovar1 = tk.StringVar() | ||
combovar1.set(',') | ||
comboval1 = [',', ';', '|'] | ||
combo1 = ttk.Combobox(window,textvariable=combovar1,values=comboval1,state='readonly',font=('Arial','10'), justify='center',width=7).grid(column=1,row=9,padx=10,pady=10,sticky='W'+'E') | ||
|
||
right = tk.PhotoImage(file=os.path.abspath('./right.png')) | ||
button1 = tk.Button(window, image=right, border=0, cursor='hand2',command=convert_delim).grid(column=1,row=10,sticky='W'+'E',pady=10,padx=10) | ||
|
||
left = tk.PhotoImage(file=os.path.abspath('./left.png')) | ||
button2 = tk.Button(window, image=left, border=0, cursor='hand2',command=convert_line).grid(column=1,row=11,sticky='W'+'E',pady=10,padx=10) | ||
|
||
clear = tk.PhotoImage(file=os.path.abspath('./clear.png')) | ||
button3 = tk.Button(window, image=clear, border=0, cursor='hand2',command=clearall).grid(column=1,row=12,sticky='W'+'E',pady=10,padx=10) | ||
|
||
|
||
|
||
label2 = tk.Label(text='Delimited Data:',font=('Arial',10)).grid(column=2,row=0,sticky='W',padx=10,pady=10) | ||
text2 = tk.Text(window,height=20) | ||
text2.grid(column=2,row=1,rowspan=20,padx=10,pady=10) | ||
scrollbar2 = tk.Scrollbar(window, orient='vertical') | ||
scrollbar2.grid(column=2,row=1,rowspan=20,sticky='N'+'S'+'E',padx=10,pady=10) | ||
scrollbar2.config( command = text2.yview ) | ||
text2.configure(yscrollcommand=scrollbar2.set) | ||
|
||
|
||
clip = tk.PhotoImage(file=os.path.abspath('./clipboard.png')) | ||
button4 = tk.Button(window, image=clip, border=0, cursor='hand2',command=copy_text1).grid(column=0,row=21,sticky='E',padx=10) | ||
button5 = tk.Button(window, image=clip, border=0, cursor='hand2',command=copy_text2).grid(column=2,row=21,sticky='E',padx=10) | ||
|
||
|
||
|
||
label8 = tk.Label(text="© 2018 Parry Pardun",font=("Arial",8)).grid(column=0,row=22,sticky='W'+'S') | ||
|
||
window.update_idletasks() | ||
window.deiconify() | ||
window.mainloop() | ||
|
||
|
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.