Merge lp:~clicompanion-devs/clicompanion/fix-819038 into lp:clicompanion
- fix-819038
- Merge into trunk
Proposed by
Marek Bardoński
Status: | Merged |
---|---|
Merge reported by: | Marek Bardoński |
Merged at revision: | not available |
Proposed branch: | lp:~clicompanion-devs/clicompanion/fix-819038 |
Merge into: | lp:clicompanion |
Diff against target: |
283 lines (+138/-103) 4 files modified
.clicompanion (+48/-48) clicompanionlib/controller.py (+2/-2) clicompanionlib/view.py (+38/-3) data/clicompanion2.config (+50/-50) |
To merge this branch: | bzr merge lp:~clicompanion-devs/clicompanion/fix-819038 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
stlsaint | Approve | ||
Review via email: mp+82822@code.launchpad.net |
Commit message
Description of the change
To post a comment you must log in.
Revision history for this message
stlsaint (stlsaint) : | # |
review:
Approve
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === modified file '.clicompanion' | |||
2 | --- .clicompanion 2010-09-20 01:15:23 +0000 | |||
3 | +++ .clicompanion 2011-11-20 16:57:23 +0000 | |||
4 | @@ -1,48 +1,48 @@ | |||
53 | 1 | dpkg -l @: package : Find version of a package | 1 | dpkg -l @ package Find version of a package |
54 | 2 | df -h: : file system disk space usage | 2 | df -h file system disk space usage |
55 | 3 | free -m: : show RAM usage | 3 | free -m show RAM usage |
56 | 4 | ps auxww | grep @: process : displays information about the active process | 4 | ps auxww | grep @ process displays information about the active process |
57 | 5 | iwconfig: : Display wireless network information | 5 | iwconfig Display wireless network information |
58 | 6 | ifconfig -a: : displays the status of the currently active interfaces | 6 | ifconfig -a displays the status of the currently active interfaces |
59 | 7 | sudo iwlist: : scan Scan Wireless networks | 7 | sudo iwlist scan Scan Wireless networks |
60 | 8 | sudo /etc/init.d/networking restart: : Reset the Network | 8 | sudo /etc/init.d/networking restart Reset the Network |
61 | 9 | lsb_release -a: : What version of Ubuntu do I have? | 9 | lsb_release -a What version of Ubuntu do I have? |
62 | 10 | uname -a: : What kernel am I running | 10 | uname -a What kernel am I running |
63 | 11 | sudo apt-get update && sudo apt-get upgrade: : Refresh update info and update all packages | 11 | sudo apt-get update && sudo apt-get upgrade Refresh update info and update all packages |
64 | 12 | sudo apt-get clean: : clear out all packages in /var/cache/apt/archives | 12 | sudo apt-get clean clear out all packages in /var/cache/apt/archives |
65 | 13 | sudo apt-get autoclean : : clear out obsolete packages(packages with a newer release) | 13 | sudo apt-get autoclean clear out obsolete packages(packages with a newer release) |
66 | 14 | apt-cache search @ :package : Find information on a package (not installed) | 14 | apt-cache search @ package Find information on a package (not installed) |
67 | 15 | sudo lshw : : List hardware | 15 | sudo lshw List hardware |
68 | 16 | lspci : : list all PCI devices | 16 | lspci list all PCI devices |
69 | 17 | aplay -l : : List all soundcards and digital audio devices | 17 | aplay -l List all soundcards and digital audio devices |
70 | 18 | cat @ :path: Read File & Print to Standard Output | 18 | cat @ path Read File & Print to Standard Output |
71 | 19 | ls @ :path : List Folders Contents | 19 | ls @ path List Folders Contents |
72 | 20 | ls -lSr @ :path : Show files by size, biggest last | 20 | ls -lSr @ path Show files by size, biggest last |
73 | 21 | mv @ :path : Move (Rename) Files | 21 | mv @ path Move (Rename) Files |
74 | 22 | cp @ :path : Copy Files | 22 | cp @ path Copy Files |
75 | 23 | sudo lspci : : attached PCI devices | 23 | sudo lspci attached PCI devices |
76 | 24 | chmod @ @ : permissions, file : Change access permissions, change mode | 24 | chmod @ @ permissions, file Change access permissions, change mode |
77 | 25 | chown @ @: owner:group, file : Change the owner and/or group of each given file | 25 | chown @ @ owner group, file Change the owner and/or group of each given file |
78 | 26 | dmesg : : Print kernel & driver messages | 26 | dmesg Print kernel & driver messages |
79 | 27 | history : : Command History | 27 | history Command History |
80 | 28 | locate @ : file : Find files (updatedb to update DB) | 28 | locate @ file Find files (updatedb to update DB) |
81 | 29 | sudo updatedb : : update the database for locate | 29 | sudo updatedb update the database for locate |
82 | 30 | which @ :command : Show full path name of command | 30 | which @ command Show full path name of command |
83 | 31 | find -maxdepth 1 -type f | xargs grep -F @ :string : Search all regular files for 'string' in this dir | 31 | find -maxdepth 1 -type f | xargs grep -F @ string Search all regular files for 'string' in this dir |
84 | 32 | gpg -c @ :file : Encypt a file | 32 | gpg -c @ file Encypt a file |
85 | 33 | gpg @ :file.gpg : Decrypt a file | 33 | gpg @ file.gpg Decrypt a file |
86 | 34 | tar -xjf @ :archive.tar : Extract all files from archive.tar | 34 | tar -xjf @ archive.tar Extract all files from archive.tar |
87 | 35 | tar -czf @ :Destination.tar.gz Source : Create Destination from Source | 35 | tar -czf @ Destination.tar.gz Source Create Destination from Source |
88 | 36 | iostat : : cpu and I/O statistics | 36 | iostat cpu and I/O statistics |
89 | 37 | netstat : : Print network connections and interface statistics | 37 | netstat Print network connections and interface statistics |
90 | 38 | sudo fdisk -l @ :disk : List partition tables for specified devices | 38 | sudo fdisk -l @ disk List partition tables for specified devices |
91 | 39 | sudo ufw enable : : Enable netfilter firewall | 39 | sudo ufw enable Enable netfilter firewall |
92 | 40 | sudo ufw allow @ :port : Open a port in netfilter firewall | 40 | sudo ufw allow @ port Open a port in netfilter firewall |
93 | 41 | sudo ufw deny @ :port : Close a port in netfilter firewall | 41 | sudo ufw deny @ port Close a port in netfilter firewall |
94 | 42 | sudo ufw disable : : Disable netfilter firewall | 42 | sudo ufw disable Disable netfilter firewall |
95 | 43 | cat @ @ | sort | uniq > @ : file1, file2, file3 : combine, sort and remove duplicates from 2 files | 43 | cat @ @ | sort | uniq > @ file1, file2, file3 combine, sort and remove duplicates from 2 files |
96 | 44 | mkisofs -V LABEL -r dir | gzip > @ :isoname.iso.gz : Create cdrom image from contents of directory | 44 | mkisofs -V LABEL -r dir | gzip > @ isoname.iso.gz Create cdrom image from contents of directory |
97 | 45 | cdrecord -v dev=/dev/cdrom -audio -pad *.wav : : Make audio CD from all wavs in current dir | 45 | cdrecord -v dev=/dev/cdrom -audio -pad *.wav Make audio CD from all wavs in current dir |
98 | 46 | dpkg-query -W -f='${Installed-Size;10}\t${Package}\n' | sort -k1,1n : : List all installed packages by size | 46 | dpkg-query -W -f='${Installed-Size;10}\t${Package}\n' | sort -k1,1n List all installed packages by size |
99 | 47 | tail -f /var/log/messages : : Monitor messages log file | 47 | tail -f /var/log/messages Monitor messages log file |
100 | 48 | apropos @ :command/package : search the manual page names and descriptions | 48 | apropos @ command/package search the manual page names and descriptions |
101 | 49 | 49 | ||
102 | === modified file 'clicompanionlib/controller.py' | |||
103 | --- clicompanionlib/controller.py 2011-11-16 10:48:50 +0000 | |||
104 | +++ clicompanionlib/controller.py 2011-11-20 16:57:23 +0000 | |||
105 | @@ -160,12 +160,12 @@ | |||
106 | 160 | if text1 != "": | 160 | if text1 != "": |
107 | 161 | with open(CHEATSHEET, "r") as cheatfile: | 161 | with open(CHEATSHEET, "r") as cheatfile: |
108 | 162 | cheatlines = cheatfile.readlines() | 162 | cheatlines = cheatfile.readlines() |
110 | 163 | cheatlines.append(text1+":"+text2+":"+text3+'\n') | 163 | cheatlines.append(text1+"\t"+text2+"\t"+text3+'\n') |
111 | 164 | cheatfile.close() | 164 | cheatfile.close() |
112 | 165 | with open(CHEATSHEET, "w") as cheatfile2: | 165 | with open(CHEATSHEET, "w") as cheatfile2: |
113 | 166 | cheatfile2.writelines(cheatlines) | 166 | cheatfile2.writelines(cheatlines) |
114 | 167 | cheatfile2.close() | 167 | cheatfile2.close() |
116 | 168 | l = str(text1+":"+text2+":"+text3) | 168 | l = str(text1+"\t"+text2+"\t"+text3) |
117 | 169 | #ls = l.split(':',2) | 169 | #ls = l.split(':',2) |
118 | 170 | ## update view.CMNDS variable | 170 | ## update view.CMNDS variable |
119 | 171 | filteredcommandplus = text1, text2, text3 | 171 | filteredcommandplus = text1, text2, text3 |
120 | 172 | 172 | ||
121 | === modified file 'clicompanionlib/view.py' | |||
122 | --- clicompanionlib/view.py 2011-11-11 11:40:07 +0000 | |||
123 | +++ clicompanionlib/view.py 2011-11-20 16:57:23 +0000 | |||
124 | @@ -103,8 +103,16 @@ | |||
125 | 103 | self.update(self.liststore) | 103 | self.update(self.liststore) |
126 | 104 | 104 | ||
127 | 105 | ## add bug data from .clicompanion --> bugdata --> to the liststore | 105 | ## add bug data from .clicompanion --> bugdata --> to the liststore |
130 | 106 | for line in bugdata.splitlines(): | 106 | for line in bugdata.splitlines(): |
131 | 107 | l = line.split(':',2) | 107 | l = line.split('\t',2) |
132 | 108 | if len(l) < 2: | ||
133 | 109 | """ | ||
134 | 110 | If for any reason we have a old file, we must | ||
135 | 111 | replace it by new one | ||
136 | 112 | """ | ||
137 | 113 | print "PLEASE RESTART APPLICATION TO FINISH UPDATE" | ||
138 | 114 | self.setup() | ||
139 | 115 | return | ||
140 | 108 | commandplus = l[0], l[1], l[2] | 116 | commandplus = l[0], l[1], l[2] |
141 | 109 | CMNDS.append(commandplus) | 117 | CMNDS.append(commandplus) |
142 | 110 | self.liststore.append([l[0],l[1],l[2]]) | 118 | self.liststore.append([l[0],l[1],l[2]]) |
143 | @@ -125,7 +133,34 @@ | |||
144 | 125 | # Oops! Looks like there's no cheatsheet in CHEATSHEET. | 133 | # Oops! Looks like there's no cheatsheet in CHEATSHEET. |
145 | 126 | # Then, create an empty cheatsheet. | 134 | # Then, create an empty cheatsheet. |
146 | 127 | open(CHEATSHEET, 'w').close() | 135 | open(CHEATSHEET, 'w').close() |
148 | 128 | 136 | """ | |
149 | 137 | If we have old file, we must replace it by fresh list | ||
150 | 138 | """ | ||
151 | 139 | cheatlines = [] | ||
152 | 140 | try: | ||
153 | 141 | with open(CHEATSHEET, "r") as cheatfile: | ||
154 | 142 | bugdata=cheatfile.read() | ||
155 | 143 | cheatfile.close() | ||
156 | 144 | for line in bugdata.splitlines(): | ||
157 | 145 | l = line.split('\t', 2) | ||
158 | 146 | if len(l) < 2: | ||
159 | 147 | l = line.split(':', 2) | ||
160 | 148 | p = str(l[0] + "\t"+ l[1] +"\t"+ l[2] + "\n") | ||
161 | 149 | cheatlines.append(p) | ||
162 | 150 | else: | ||
163 | 151 | cheatlines.append(str(l[0] + "\t"+ l[1] +"\t"+ l[2] + "\n")) | ||
164 | 152 | |||
165 | 153 | with open(CHEATSHEET, "w") as cheatfile2: | ||
166 | 154 | cheatfile2.writelines(cheatlines) | ||
167 | 155 | cheatfile2.close() | ||
168 | 156 | |||
169 | 157 | except IOError: | ||
170 | 158 | ## CHEATSHEET is not there. Oh, no! | ||
171 | 159 | ## So, run self.setup() again. | ||
172 | 160 | self.setup() | ||
173 | 161 | ## Then, run me again. | ||
174 | 162 | self.update(self.liststore) | ||
175 | 163 | |||
176 | 129 | 164 | ||
177 | 130 | #liststore in a scrolled window in an expander | 165 | #liststore in a scrolled window in an expander |
178 | 131 | def expanded_cb(self, expander, params, window, search_box): | 166 | def expanded_cb(self, expander, params, window, search_box): |
179 | 132 | 167 | ||
180 | === modified file 'data/clicompanion2.config' | |||
181 | --- data/clicompanion2.config 2011-11-19 17:36:13 +0000 | |||
182 | +++ data/clicompanion2.config 2011-11-20 16:57:23 +0000 | |||
183 | @@ -1,50 +1,50 @@ | |||
234 | 1 | dpkg -l ?:package:Find version of a package | 1 | dpkg -l ? package Find version of a package |
235 | 2 | df -h::File system disk space usage | 2 | df -h File system disk space usage |
236 | 3 | free -m::Show RAM usage | 3 | free -m Show RAM usage |
237 | 4 | ps aux | grep ?:search string:Search active processes for search string | 4 | ps aux | grep ? search string Search active processes for search string |
238 | 5 | iwconfig::Display wireless network information | 5 | iwconfig Display wireless network information |
239 | 6 | ifconfig -a::Displays the status of the currently active interfaces | 6 | ifconfig -a Displays the status of the currently active interfaces |
240 | 7 | lsb_release -a::What version of Ubuntu do I have? | 7 | lsb_release -a What version of Ubuntu do I have? |
241 | 8 | uname -a::What kernel am I running | 8 | uname -a What kernel am I running |
242 | 9 | sudo apt-get update && sudo apt-get upgrade::Refresh update info and update all packages | 9 | sudo apt-get update && sudo apt-get upgrade Refresh update info and update all packages |
243 | 10 | sudo apt-get clean::Clear out all packages in /var/cache/apt/archives | 10 | sudo apt-get clean Clear out all packages in /var/cache/apt/archives |
244 | 11 | sudo apt-get autoclean::Clear out obsolete packages(packages with a newer release) | 11 | sudo apt-get autoclean Clear out obsolete packages(packages with a newer release) |
245 | 12 | apt-cache search ?:package:Find information on a package (not installed) | 12 | apt-cache search ? package Find information on a package (not installed) |
246 | 13 | sudo lshw::List hardware | 13 | sudo lshw List hardware |
247 | 14 | lspci::List all PCI devices | 14 | lspci List all PCI devices |
248 | 15 | aplay -l::List all soundcards and digital audio devices | 15 | aplay -l List all soundcards and digital audio devices |
249 | 16 | cat ?:path:Read File & Print to Standard Output | 16 | cat ? path Read File & Print to Standard Output |
250 | 17 | ls ? :path:List Folders Contents | 17 | ls ? path List Folders Contents |
251 | 18 | ls -lSr ?:path:Show files by size, biggest last | 18 | ls -lSr ? path Show files by size, biggest last |
252 | 19 | mv ? ?:sourcePath, destinationPath:Move (Rename) Files | 19 | mv ? ? sourcePath, destinationPath Move (Rename) Files |
253 | 20 | cp ? ?:sourcePath, destinationPath:Copy File from sourcePath to destinationPath | 20 | cp ? ? sourcePath, destinationPath Copy File from sourcePath to destinationPath |
254 | 21 | sudo lspci::attached PCI devices | 21 | sudo lspci attached PCI devices |
255 | 22 | chmod ? ?:permissions, file:Change access permissions, change mode | 22 | chmod ? ? permissions, file Change access permissions, change mode |
256 | 23 | chown ? ?:owner:group, file:Change the owner and/or group of each given file | 23 | chown ? ? owner group, file Change the owner and/or group of each given file |
257 | 24 | dmesg::Print kernel & driver messages | 24 | dmesg Print kernel & driver messages |
258 | 25 | history::Command History | 25 | history Command History |
259 | 26 | history | grep -i ?:command:search history for a command | 26 | history | grep -i ? command search history for a command |
260 | 27 | locate ?:file:Find files (updatedb to update DB) | 27 | locate ? file Find files (updatedb to update DB) |
261 | 28 | sudo updatedb::update the database for locate | 28 | sudo updatedb update the database for locate |
262 | 29 | which ?:command:Show full path name of command | 29 | which ? command Show full path name of command |
263 | 30 | find -maxdepth 1 -type f | xargs grep -F ?:string:Search all regular files for 'string' in this dir | 30 | find -maxdepth 1 -type f | xargs grep -F ? string Search all regular files for 'string' in this dir |
264 | 31 | gpg -c ?:file:Encypt a file | 31 | gpg -c ? file Encypt a file |
265 | 32 | gpg ?:file.gpg:Decrypt a file | 32 | gpg ? file.gpg Decrypt a file |
266 | 33 | tar -cvf ? ?:Destination.tar Source:Compress(tar) Source into Destination | 33 | tar -cvf ? ? Destination.tar Source Compress(tar) Source into Destination |
267 | 34 | tar -cvzf ? ?:Destination.tar.gz Source:Compress(tar.gz) Source into Destination | 34 | tar -cvzf ? ? Destination.tar.gz Source Compress(tar.gz) Source into Destination |
268 | 35 | tar -cjvf ? ?:Destination.tar.bz2 Source:Compress(tar.bz2) Source into Destination | 35 | tar -cjvf ? ? Destination.tar.bz2 Source Compress(tar.bz2) Source into Destination |
269 | 36 | tar xvf ?:file:decompress/extract .tar | 36 | tar xvf ? file decompress/extract .tar |
270 | 37 | tar xvzf ?:file:decompress/extract tar.gz | 37 | tar xvzf ? file decompress/extract tar.gz |
271 | 38 | tar xjvf ?:file:decompress/extract a tar.bz2 | 38 | tar xjvf ? file decompress/extract a tar.bz2 |
272 | 39 | sudo dpkg --configure -a::help fix broken packages | 39 | sudo dpkg --configure -a help fix broken packages |
273 | 40 | sudo apt-get -f install::help fix broken packages | 40 | sudo apt-get -f install help fix broken packages |
274 | 41 | top::display Linux tasks | 41 | top display Linux tasks |
275 | 42 | netstat::Print network connections and interface statistics | 42 | netstat Print network connections and interface statistics |
276 | 43 | sudo fdisk -l ?:disk(usually /dev/sda):List partition tables for specified devices | 43 | sudo fdisk -l ? disk(usually /dev/sda) List partition tables for specified devices |
277 | 44 | sudo ufw enable::Enable netfilter firewall | 44 | sudo ufw enable Enable netfilter firewall |
278 | 45 | sudo ufw allow ?:port:Open a port in netfilter firewall | 45 | sudo ufw allow ? port Open a port in netfilter firewall |
279 | 46 | sudo ufw deny ?:port:Close a port in netfilter firewall | 46 | sudo ufw deny ? port Close a port in netfilter firewall |
280 | 47 | sudo ufw disable::Disable netfilter firewall | 47 | sudo ufw disable Disable netfilter firewall |
281 | 48 | cat ? ? | sort | uniq > ? :file1, file2, file3:combine, sort and remove duplicates from 2 files | 48 | cat ? ? | sort | uniq > ? file1, file2, file3 combine, sort and remove duplicates from 2 files |
282 | 49 | dpkg-query -W -f='${Installed-Size;10}\t${Package}\n' | sort -k1,1n::List all installed packages by size | 49 | dpkg-query -W -f='${Installed-Size;10}\t${Package}\n' | sort -k1,1n List all installed packages by size |
283 | 50 | apropos ?:command or package:search the manual page names and descriptions | 50 | apropos ? command or package search the manual page names and descriptions |