Merge lp:~clicompanion-devs/clicompanion/fix-819038 into lp:clicompanion

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
Reviewer Review Type Date Requested Status
stlsaint Approve
Review via email: mp+82822@code.launchpad.net
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
=== modified file '.clicompanion'
--- .clicompanion 2010-09-20 01:15:23 +0000
+++ .clicompanion 2011-11-20 16:57:23 +0000
@@ -1,48 +1,48 @@
1dpkg -l @: package : Find version of a package1dpkg -l @ package Find version of a package
2df -h: : file system disk space usage2df -h file system disk space usage
3free -m: : show RAM usage3free -m show RAM usage
4ps auxww | grep @: process : displays information about the active process4ps auxww | grep @ process displays information about the active process
5iwconfig: : Display wireless network information5iwconfig Display wireless network information
6ifconfig -a: : displays the status of the currently active interfaces6ifconfig -a displays the status of the currently active interfaces
7sudo iwlist: : scan Scan Wireless networks7sudo iwlist scan Scan Wireless networks
8sudo /etc/init.d/networking restart: : Reset the Network8sudo /etc/init.d/networking restart Reset the Network
9lsb_release -a: : What version of Ubuntu do I have?9lsb_release -a What version of Ubuntu do I have?
10uname -a: : What kernel am I running10uname -a What kernel am I running
11sudo apt-get update && sudo apt-get upgrade: : Refresh update info and update all packages 11sudo apt-get update && sudo apt-get upgrade Refresh update info and update all packages
12sudo apt-get clean: : clear out all packages in /var/cache/apt/archives12sudo apt-get clean clear out all packages in /var/cache/apt/archives
13sudo apt-get autoclean : : clear out obsolete packages(packages with a newer release)13sudo apt-get autoclean clear out obsolete packages(packages with a newer release)
14apt-cache search @ :package : Find information on a package (not installed)14apt-cache search @ package Find information on a package (not installed)
15sudo lshw : : List hardware 15sudo lshw List hardware
16lspci : : list all PCI devices16lspci list all PCI devices
17aplay -l : : List all soundcards and digital audio devices17aplay -l List all soundcards and digital audio devices
18cat @ :path: Read File & Print to Standard Output18cat @ path Read File & Print to Standard Output
19ls @ :path : List Folders Contents19ls @ path List Folders Contents
20ls -lSr @ :path : Show files by size, biggest last20ls -lSr @ path Show files by size, biggest last
21mv @ :path : Move (Rename) Files21mv @ path Move (Rename) Files
22cp @ :path : Copy Files22cp @ path Copy Files
23sudo lspci : : attached PCI devices23sudo lspci attached PCI devices
24chmod @ @ : permissions, file : Change access permissions, change mode24chmod @ @ permissions, file Change access permissions, change mode
25chown @ @: owner:group, file : Change the owner and/or group of each given file25chown @ @ owner group, file Change the owner and/or group of each given file
26dmesg : : Print kernel & driver messages26dmesg Print kernel & driver messages
27history : : Command History27history Command History
28locate @ : file : Find files (updatedb to update DB)28locate @ file Find files (updatedb to update DB)
29sudo updatedb : : update the database for locate29sudo updatedb update the database for locate
30which @ :command : Show full path name of command30which @ command Show full path name of command
31find -maxdepth 1 -type f | xargs grep -F @ :string : Search all regular files for 'string' in this dir31find -maxdepth 1 -type f | xargs grep -F @ string Search all regular files for 'string' in this dir
32gpg -c @ :file : Encypt a file32gpg -c @ file Encypt a file
33gpg @ :file.gpg : Decrypt a file33gpg @ file.gpg Decrypt a file
34tar -xjf @ :archive.tar : Extract all files from archive.tar34tar -xjf @ archive.tar Extract all files from archive.tar
35tar -czf @ :Destination.tar.gz Source : Create Destination from Source35tar -czf @ Destination.tar.gz Source Create Destination from Source
36iostat : : cpu and I/O statistics36iostat cpu and I/O statistics
37netstat : : Print network connections and interface statistics37netstat Print network connections and interface statistics
38sudo fdisk -l @ :disk : List partition tables for specified devices38sudo fdisk -l @ disk List partition tables for specified devices
39sudo ufw enable : : Enable netfilter firewall39sudo ufw enable Enable netfilter firewall
40sudo ufw allow @ :port : Open a port in netfilter firewall40sudo ufw allow @ port Open a port in netfilter firewall
41sudo ufw deny @ :port : Close a port in netfilter firewall41sudo ufw deny @ port Close a port in netfilter firewall
42sudo ufw disable : : Disable netfilter firewall42sudo ufw disable Disable netfilter firewall
43cat @ @ | sort | uniq > @ : file1, file2, file3 : combine, sort and remove duplicates from 2 files43cat @ @ | sort | uniq > @ file1, file2, file3 combine, sort and remove duplicates from 2 files
44mkisofs -V LABEL -r dir | gzip > @ :isoname.iso.gz : Create cdrom image from contents of directory44mkisofs -V LABEL -r dir | gzip > @ isoname.iso.gz Create cdrom image from contents of directory
45cdrecord -v dev=/dev/cdrom -audio -pad *.wav : : Make audio CD from all wavs in current dir45cdrecord -v dev=/dev/cdrom -audio -pad *.wav Make audio CD from all wavs in current dir
46dpkg-query -W -f='${Installed-Size;10}\t${Package}\n' | sort -k1,1n : : List all installed packages by size46dpkg-query -W -f='${Installed-Size;10}\t${Package}\n' | sort -k1,1n List all installed packages by size
47tail -f /var/log/messages : : Monitor messages log file47tail -f /var/log/messages Monitor messages log file
48apropos @ :command/package : search the manual page names and descriptions48apropos @ command/package search the manual page names and descriptions
4949
=== modified file 'clicompanionlib/controller.py'
--- clicompanionlib/controller.py 2011-11-16 10:48:50 +0000
+++ clicompanionlib/controller.py 2011-11-20 16:57:23 +0000
@@ -160,12 +160,12 @@
160 if text1 != "":160 if text1 != "":
161 with open(CHEATSHEET, "r") as cheatfile:161 with open(CHEATSHEET, "r") as cheatfile:
162 cheatlines = cheatfile.readlines()162 cheatlines = cheatfile.readlines()
163 cheatlines.append(text1+":"+text2+":"+text3+'\n')163 cheatlines.append(text1+"\t"+text2+"\t"+text3+'\n')
164 cheatfile.close()164 cheatfile.close()
165 with open(CHEATSHEET, "w") as cheatfile2:165 with open(CHEATSHEET, "w") as cheatfile2:
166 cheatfile2.writelines(cheatlines)166 cheatfile2.writelines(cheatlines)
167 cheatfile2.close()167 cheatfile2.close()
168 l = str(text1+":"+text2+":"+text3)168 l = str(text1+"\t"+text2+"\t"+text3)
169 #ls = l.split(':',2)169 #ls = l.split(':',2)
170 ## update view.CMNDS variable170 ## update view.CMNDS variable
171 filteredcommandplus = text1, text2, text3171 filteredcommandplus = text1, text2, text3
172172
=== modified file 'clicompanionlib/view.py'
--- clicompanionlib/view.py 2011-11-11 11:40:07 +0000
+++ clicompanionlib/view.py 2011-11-20 16:57:23 +0000
@@ -103,8 +103,16 @@
103 self.update(self.liststore)103 self.update(self.liststore)
104104
105 ## add bug data from .clicompanion --> bugdata --> to the liststore105 ## add bug data from .clicompanion --> bugdata --> to the liststore
106 for line in bugdata.splitlines():106 for line in bugdata.splitlines():
107 l = line.split(':',2)107 l = line.split('\t',2)
108 if len(l) < 2:
109 """
110 If for any reason we have a old file, we must
111 replace it by new one
112 """
113 print "PLEASE RESTART APPLICATION TO FINISH UPDATE"
114 self.setup()
115 return
108 commandplus = l[0], l[1], l[2]116 commandplus = l[0], l[1], l[2]
109 CMNDS.append(commandplus)117 CMNDS.append(commandplus)
110 self.liststore.append([l[0],l[1],l[2]])118 self.liststore.append([l[0],l[1],l[2]])
@@ -125,7 +133,34 @@
125 # Oops! Looks like there's no cheatsheet in CHEATSHEET.133 # Oops! Looks like there's no cheatsheet in CHEATSHEET.
126 # Then, create an empty cheatsheet.134 # Then, create an empty cheatsheet.
127 open(CHEATSHEET, 'w').close()135 open(CHEATSHEET, 'w').close()
128 136 """
137 If we have old file, we must replace it by fresh list
138 """
139 cheatlines = []
140 try:
141 with open(CHEATSHEET, "r") as cheatfile:
142 bugdata=cheatfile.read()
143 cheatfile.close()
144 for line in bugdata.splitlines():
145 l = line.split('\t', 2)
146 if len(l) < 2:
147 l = line.split(':', 2)
148 p = str(l[0] + "\t"+ l[1] +"\t"+ l[2] + "\n")
149 cheatlines.append(p)
150 else:
151 cheatlines.append(str(l[0] + "\t"+ l[1] +"\t"+ l[2] + "\n"))
152
153 with open(CHEATSHEET, "w") as cheatfile2:
154 cheatfile2.writelines(cheatlines)
155 cheatfile2.close()
156
157 except IOError:
158 ## CHEATSHEET is not there. Oh, no!
159 ## So, run self.setup() again.
160 self.setup()
161 ## Then, run me again.
162 self.update(self.liststore)
163
129 164
130 #liststore in a scrolled window in an expander165 #liststore in a scrolled window in an expander
131 def expanded_cb(self, expander, params, window, search_box):166 def expanded_cb(self, expander, params, window, search_box):
132167
=== modified file 'data/clicompanion2.config'
--- data/clicompanion2.config 2011-11-19 17:36:13 +0000
+++ data/clicompanion2.config 2011-11-20 16:57:23 +0000
@@ -1,50 +1,50 @@
1dpkg -l ?:package:Find version of a package1dpkg -l ? package Find version of a package
2df -h::File system disk space usage2df -h File system disk space usage
3free -m::Show RAM usage3free -m Show RAM usage
4ps aux | grep ?:search string:Search active processes for search string4ps aux | grep ? search string Search active processes for search string
5iwconfig::Display wireless network information5iwconfig Display wireless network information
6ifconfig -a::Displays the status of the currently active interfaces6ifconfig -a Displays the status of the currently active interfaces
7lsb_release -a::What version of Ubuntu do I have?7lsb_release -a What version of Ubuntu do I have?
8uname -a::What kernel am I running8uname -a What kernel am I running
9sudo apt-get update && sudo apt-get upgrade::Refresh update info and update all packages 9sudo apt-get update && sudo apt-get upgrade Refresh update info and update all packages
10sudo apt-get clean::Clear out all packages in /var/cache/apt/archives10sudo apt-get clean Clear out all packages in /var/cache/apt/archives
11sudo apt-get autoclean::Clear out obsolete packages(packages with a newer release)11sudo apt-get autoclean Clear out obsolete packages(packages with a newer release)
12apt-cache search ?:package:Find information on a package (not installed)12apt-cache search ? package Find information on a package (not installed)
13sudo lshw::List hardware 13sudo lshw List hardware
14lspci::List all PCI devices14lspci List all PCI devices
15aplay -l::List all soundcards and digital audio devices15aplay -l List all soundcards and digital audio devices
16cat ?:path:Read File & Print to Standard Output16cat ? path Read File & Print to Standard Output
17ls ? :path:List Folders Contents17ls ? path List Folders Contents
18ls -lSr ?:path:Show files by size, biggest last18ls -lSr ? path Show files by size, biggest last
19mv ? ?:sourcePath, destinationPath:Move (Rename) Files19mv ? ? sourcePath, destinationPath Move (Rename) Files
20cp ? ?:sourcePath, destinationPath:Copy File from sourcePath to destinationPath20cp ? ? sourcePath, destinationPath Copy File from sourcePath to destinationPath
21sudo lspci::attached PCI devices21sudo lspci attached PCI devices
22chmod ? ?:permissions, file:Change access permissions, change mode22chmod ? ? permissions, file Change access permissions, change mode
23chown ? ?:owner:group, file:Change the owner and/or group of each given file23chown ? ? owner group, file Change the owner and/or group of each given file
24dmesg::Print kernel & driver messages24dmesg Print kernel & driver messages
25history::Command History25history Command History
26history | grep -i ?:command:search history for a command26history | grep -i ? command search history for a command
27locate ?:file:Find files (updatedb to update DB)27locate ? file Find files (updatedb to update DB)
28sudo updatedb::update the database for locate28sudo updatedb update the database for locate
29which ?:command:Show full path name of command29which ? command Show full path name of command
30find -maxdepth 1 -type f | xargs grep -F ?:string:Search all regular files for 'string' in this dir30find -maxdepth 1 -type f | xargs grep -F ? string Search all regular files for 'string' in this dir
31gpg -c ?:file:Encypt a file31gpg -c ? file Encypt a file
32gpg ?:file.gpg:Decrypt a file32gpg ? file.gpg Decrypt a file
33tar -cvf ? ?:Destination.tar Source:Compress(tar) Source into Destination33tar -cvf ? ? Destination.tar Source Compress(tar) Source into Destination
34tar -cvzf ? ?:Destination.tar.gz Source:Compress(tar.gz) Source into Destination34tar -cvzf ? ? Destination.tar.gz Source Compress(tar.gz) Source into Destination
35tar -cjvf ? ?:Destination.tar.bz2 Source:Compress(tar.bz2) Source into Destination35tar -cjvf ? ? Destination.tar.bz2 Source Compress(tar.bz2) Source into Destination
36tar xvf ?:file:decompress/extract .tar36tar xvf ? file decompress/extract .tar
37tar xvzf ?:file:decompress/extract tar.gz37tar xvzf ? file decompress/extract tar.gz
38tar xjvf ?:file:decompress/extract a tar.bz238tar xjvf ? file decompress/extract a tar.bz2
39sudo dpkg --configure -a::help fix broken packages39sudo dpkg --configure -a help fix broken packages
40sudo apt-get -f install::help fix broken packages40sudo apt-get -f install help fix broken packages
41top::display Linux tasks41top display Linux tasks
42netstat::Print network connections and interface statistics42netstat Print network connections and interface statistics
43sudo fdisk -l ?:disk(usually /dev/sda):List partition tables for specified devices43sudo fdisk -l ? disk(usually /dev/sda) List partition tables for specified devices
44sudo ufw enable::Enable netfilter firewall44sudo ufw enable Enable netfilter firewall
45sudo ufw allow ?:port:Open a port in netfilter firewall45sudo ufw allow ? port Open a port in netfilter firewall
46sudo ufw deny ?:port:Close a port in netfilter firewall46sudo ufw deny ? port Close a port in netfilter firewall
47sudo ufw disable::Disable netfilter firewall47sudo ufw disable Disable netfilter firewall
48cat ? ? | sort | uniq > ? :file1, file2, file3:combine, sort and remove duplicates from 2 files48cat ? ? | sort | uniq > ? file1, file2, file3 combine, sort and remove duplicates from 2 files
49dpkg-query -W -f='${Installed-Size;10}\t${Package}\n' | sort -k1,1n::List all installed packages by size49dpkg-query -W -f='${Installed-Size;10}\t${Package}\n' | sort -k1,1n List all installed packages by size
50apropos ?:command or package:search the manual page names and descriptions50apropos ? command or package search the manual page names and descriptions

Subscribers

People subscribed via source and target branches