hed 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +15 -0
- data/bin/hed +42 -0
- metadata +45 -0
checksums.yaml
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
---
|
2
|
+
!binary "U0hBMQ==":
|
3
|
+
metadata.gz: !binary |-
|
4
|
+
YjJhYmQ1MmY0MWJkODEwYjYzMTMyN2UxOWNlMTFiNDI4OTZkYTEyOA==
|
5
|
+
data.tar.gz: !binary |-
|
6
|
+
NDdlM2IzNDYzMzMzZjFiMTUyYmExNjNkOWE2MWFjMDllYWU1OGFlZg==
|
7
|
+
!binary "U0hBNTEy":
|
8
|
+
metadata.gz: !binary |-
|
9
|
+
NzE4OTg2MTUyODg1NjI3YTMyNTQ4MjExNjA5OWViMmIzMzRhNDlhNjFhZmQ1
|
10
|
+
YjVkZjViNDhhNGFkOTBhMTRmYzRiYTE5MTY2MDhjOWFhM2NjODcxYTU2N2M4
|
11
|
+
YmY4NjYxN2YxYTIzMzE5NjM1OTFlOWNjMTY3OGI4OTJjNjczZmI=
|
12
|
+
data.tar.gz: !binary |-
|
13
|
+
OWM4NTFlODliODAyN2QyZGVkNmM0NGRmM2VhNjZjYThlNWM0OTgyOWI3ZGZm
|
14
|
+
MzU1YTE2NmVlMDExN2ZiNDIzZmM1NDBiYWMzYzU5YmVlODQ1ZGYyMzkwNDY4
|
15
|
+
OWMzNzQxNzc1MmI3ODkyMzRjMzA4MDI5YzgzNWM4OGY1ZGQwNjI=
|
data/bin/hed
ADDED
@@ -0,0 +1,42 @@
|
|
1
|
+
#!/usr/bin/ruby19
|
2
|
+
# encoding: UTF-8
|
3
|
+
|
4
|
+
require 'curses'
|
5
|
+
|
6
|
+
buf = IO.binread 'hed'
|
7
|
+
|
8
|
+
Curses.init_screen
|
9
|
+
|
10
|
+
win = Curses::Window.new Curses.lines, Curses.cols, 0, 0
|
11
|
+
|
12
|
+
addrwin = win.subwin Curses.lines, 8, 0, 0
|
13
|
+
binwin = win.subwin Curses.lines, 16*3+1, 0, 8+2
|
14
|
+
textwin = win.subwin Curses.lines, 16, 0, 8+2 + 16*3+1+2
|
15
|
+
|
16
|
+
Curses.lines.times do |y|
|
17
|
+
addrwin.setpos y, 0
|
18
|
+
addrwin << "%08x" % y*16
|
19
|
+
end
|
20
|
+
|
21
|
+
Curses.lines.times do |y|
|
22
|
+
binwin.setpos y, 0
|
23
|
+
|
24
|
+
16.times do |x|
|
25
|
+
binwin << "%02x " % buf[y*16+x].unpack("C")[0]
|
26
|
+
binwin << ' ' if x == 16/2 - 1
|
27
|
+
end
|
28
|
+
end
|
29
|
+
|
30
|
+
Curses.lines.times do |y|
|
31
|
+
textwin.setpos y, 0
|
32
|
+
textwin << buf[y*16..(y+1)*16].gsub(/[^[:print:]]/, '⌘')
|
33
|
+
end
|
34
|
+
|
35
|
+
win.setpos 0, 10
|
36
|
+
|
37
|
+
win.refresh
|
38
|
+
|
39
|
+
sleep 10
|
40
|
+
|
41
|
+
# vim: sw=2 sts=2 ts=8:
|
42
|
+
|
metadata
ADDED
@@ -0,0 +1,45 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: hed
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Levenkov Artem
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2014-10-04 00:00:00.000000000 Z
|
12
|
+
dependencies: []
|
13
|
+
description: Vim-like hex editor
|
14
|
+
email: artem@levenkov.org
|
15
|
+
executables:
|
16
|
+
- hed
|
17
|
+
extensions: []
|
18
|
+
extra_rdoc_files: []
|
19
|
+
files:
|
20
|
+
- bin/hed
|
21
|
+
homepage: http://www.unixcmd.org/
|
22
|
+
licenses:
|
23
|
+
- MIT
|
24
|
+
metadata: {}
|
25
|
+
post_install_message:
|
26
|
+
rdoc_options: []
|
27
|
+
require_paths:
|
28
|
+
- lib
|
29
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ! '>='
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
35
|
+
requirements:
|
36
|
+
- - ! '>='
|
37
|
+
- !ruby/object:Gem::Version
|
38
|
+
version: '0'
|
39
|
+
requirements: []
|
40
|
+
rubyforge_project:
|
41
|
+
rubygems_version: 2.0.14
|
42
|
+
signing_key:
|
43
|
+
specification_version: 4
|
44
|
+
summary: Hex EDitor
|
45
|
+
test_files: []
|