ffetch 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -1,7 +1,30 @@
1
- Ffetch is a graphical user interface to search for files names by Regex on Windows platform.
1
+ Description:
2
+ =======
3
+ Ffetch is a Graphical user interface which allows search for files based on regex pattern of their names.
4
+ files containing in this lib are ["lib/data.rb", "lib/ffetch.rb", "lib/gui.rb"].
2
5
 
3
6
  The Gui searches a default directory you specify in the data.rb file. The menu allows you to choose any directory on the system which will be searched for a match.
4
7
 
5
8
  Once a list of fetched files is displayed in the text window, you can open any one of these files by selecting it (clicked) and then double clicking the selection. The file will be opened in the associated editor such as Windows Notepad.
6
9
 
10
+ Installation:
11
+ ========
12
+ Add this line to your application's Gemfile:
13
+
14
+ gem "ffetch"
15
+
16
+ And then execute:
17
+
18
+ $ bundle
19
+
20
+ Or install it yourself as:
21
+
22
+ $ gem install "ffetch
23
+
24
+ Usage
25
+ ====
26
+ require 'ffetch'
27
+ ffetch
28
+
29
+ add those two lines to a file saved as "fetch.rb". If Ruby is installed on your system and is in the environment path, it will run the application.
7
30
 
@@ -1,4 +1,5 @@
1
- #MAIN FILE
1
+ #!/usr/bin/env ruby
2
+
2
3
  require 'tk'
3
4
  require 'find'
4
5
  require_relative 'gui'
@@ -0,0 +1,28 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'tk'
4
+ require 'find'
5
+ require_relative 'gui'
6
+ require_relative 'data'
7
+
8
+ Gui.root{title "#$title"}
9
+ Gui.header("#$header_text", 0, 0, 1, 4)
10
+ Gui.label("Enter Search term", 1, 0, 1, 1)
11
+ Gui.entry($var1, 1, 1, 1, 1)
12
+ Gui.button("OK", "m(*$folder)", 1, 2, 1, 1)
13
+ Gui.textfield("Enter Search Term and Click OK", 3, 0, 1, 4)
14
+ Gui.menu
15
+ def m(folder = $default)
16
+ pat = "#$var1"
17
+ files = []
18
+ Find.find(folder) do |path|
19
+ files << path if path =~ /#{pat}.*\.txt$/i
20
+ list = files.join("\n")
21
+ $text.delete('1.0', 'end')
22
+ $text.insert('1.0', "#{list}")
23
+ end
24
+ end
25
+ $text.tag_bind('sel', '1', proc{system "start #{$text.get('sel.first', 'sel.last')}"})
26
+ Gui.show
27
+
28
+
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ffetch
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -11,19 +11,23 @@ bindir: bin
11
11
  cert_chain: []
12
12
  date: 2015-03-31 00:00:00.000000000 Z
13
13
  dependencies: []
14
- description: Ffetch is a graphical user interface to search a chosen directory for
15
- files matching a Regex pattern and then opening a selected file of the list when
16
- double clicked.
14
+ description: The Gui searches a default directory you specify in the data.rb file.
15
+ The menu allows you to choose any directory on the system which will be searched
16
+ for a match. Once a list of fetched files is displayed in the text window, you can
17
+ open any one of these files by selecting it (clicked) and then double clicking the
18
+ selection. The file will be opened in the associated editor such as Windows Notepad.
17
19
  email: sabryabdelfattah@gmail.com
18
- executables: []
20
+ executables:
21
+ - ffetch.rb
19
22
  extensions: []
20
23
  extra_rdoc_files:
21
24
  - README.md
22
25
  files:
23
26
  - lib/data.rb
27
+ - lib/ffetch.rb
24
28
  - lib/gui.rb
25
- - lib/fetch.rbw
26
29
  - README.md
30
+ - bin/ffetch.rb
27
31
  homepage: http://sabryfattah.com
28
32
  licenses:
29
33
  - MIT
@@ -50,10 +54,6 @@ rubyforge_project:
50
54
  rubygems_version: 1.8.29
51
55
  signing_key:
52
56
  specification_version: 3
53
- summary: Ffetch is a graphical user interface to search for files names by Regex on
54
- Windows platform. The Gui searches a default directory you specify in the data.rb
55
- file. The menu allows you to choose any directory on the system which will be searched
56
- for a match. Once a list of fetched files is displayed in the text window, you can
57
- open any one of these files by selecting it (clicked) and then double clicking the
58
- selection. The file will be opened in the associated editor such as Windows Notepad.
57
+ summary: Ffetch is a Graphical user interface which allows search for files based
58
+ on regex pattern of their names.
59
59
  test_files: []