bombay 0.1.0 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/bombay +21 -0
- data/bombay.gemspec +6 -7
- data/lib/bombay/version.rb +1 -1
- metadata +8 -7
- data/README.md +0 -53
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a7ae8397473ea1785d327c58f45bfd862f63a90940c1ad4de3c5b4efcf9fd86f
|
4
|
+
data.tar.gz: 482d01646e9e341d54e99600a893ab23bff68b6e1b60b8acc80163139b23303e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c7e4f03d73d1982f1540a924745c4c32a33b539a8b95222b501a16ccc86af6295cf675c8a12063b07565d40efa3e8abbd077c3cb56b6fd392ce33fcc2174ef90
|
7
|
+
data.tar.gz: 48b9e570acb8fdfeef930b4da57e647c6d856183a48a83ee065922295619e2d3acf80f3f3e9b08c5e31a64ee3d3eb821d4c472b4505f69a0f765400bd29b23fb
|
data/bin/bombay
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require "bombay"
|
4
|
+
|
5
|
+
include Bombay
|
6
|
+
|
7
|
+
# Parse and process user directories
|
8
|
+
directories = Directories.new
|
9
|
+
|
10
|
+
# Initialize filetypes
|
11
|
+
filetypes = Filetypes.new
|
12
|
+
|
13
|
+
# Group files by filetype
|
14
|
+
pictures = filter_files(filetypes.pictures)
|
15
|
+
videos = filter_files(filetypes.videos)
|
16
|
+
documents = filter_files(filetypes.documents)
|
17
|
+
|
18
|
+
# Stack files into their appropriate directory
|
19
|
+
stack(pictures, directories.pictures)
|
20
|
+
stack(videos, directories.videos)
|
21
|
+
stack(documents, directories.documents)
|
data/bombay.gemspec
CHANGED
@@ -8,22 +8,21 @@ Gem::Specification.new do |spec|
|
|
8
8
|
spec.authors = ["grtcdr"]
|
9
9
|
spec.email = ["ba.tahaaziz@gmail.com"]
|
10
10
|
|
11
|
-
spec.summary = "Organize your $(pwd)"
|
12
|
-
spec.homepage = "https://
|
11
|
+
spec.summary = "Organize your $(pwd)."
|
12
|
+
spec.homepage = "https://rubygems.org/gems/bombay"
|
13
13
|
spec.license = "MIT"
|
14
14
|
spec.required_ruby_version = ">= 2.6.0"
|
15
15
|
|
16
16
|
spec.metadata["homepage_uri"] = spec.homepage
|
17
|
-
spec.metadata["source_code_uri"] =
|
17
|
+
spec.metadata["source_code_uri"] = "https://github.com/grtcdr/bombay"
|
18
18
|
|
19
|
-
# Specify which files should be added to the gem when it is released.
|
20
|
-
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
21
19
|
spec.files = Dir.chdir(__dir__) do
|
22
20
|
`git ls-files -z`.split("\x0").reject do |f|
|
23
21
|
(f == __FILE__) || f.match(%r{\A(?:(?:bin|test|spec|features)/|\.(?:git|travis|circleci)|appveyor)})
|
24
22
|
end
|
25
23
|
end
|
26
|
-
|
27
|
-
spec.
|
24
|
+
|
25
|
+
spec.bindir = "bin"
|
26
|
+
spec.executables = ["bombay"]
|
28
27
|
spec.require_paths = ["lib"]
|
29
28
|
end
|
data/lib/bombay/version.rb
CHANGED
metadata
CHANGED
@@ -1,36 +1,37 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bombay
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- grtcdr
|
8
8
|
autorequire:
|
9
|
-
bindir:
|
9
|
+
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
date: 2022-05-21 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description:
|
14
14
|
email:
|
15
15
|
- ba.tahaaziz@gmail.com
|
16
|
-
executables:
|
16
|
+
executables:
|
17
|
+
- bombay
|
17
18
|
extensions: []
|
18
19
|
extra_rdoc_files: []
|
19
20
|
files:
|
20
21
|
- ".rubocop.yml"
|
21
22
|
- Gemfile
|
22
23
|
- Gemfile.lock
|
23
|
-
- README.md
|
24
24
|
- Rakefile
|
25
|
+
- bin/bombay
|
25
26
|
- bombay.gemspec
|
26
27
|
- lib/bombay.rb
|
27
28
|
- lib/bombay/version.rb
|
28
29
|
- sig/bombay.rbs
|
29
|
-
homepage: https://
|
30
|
+
homepage: https://rubygems.org/gems/bombay
|
30
31
|
licenses:
|
31
32
|
- MIT
|
32
33
|
metadata:
|
33
|
-
homepage_uri: https://
|
34
|
+
homepage_uri: https://rubygems.org/gems/bombay
|
34
35
|
source_code_uri: https://github.com/grtcdr/bombay
|
35
36
|
post_install_message:
|
36
37
|
rdoc_options: []
|
@@ -50,5 +51,5 @@ requirements: []
|
|
50
51
|
rubygems_version: 3.3.8
|
51
52
|
signing_key:
|
52
53
|
specification_version: 4
|
53
|
-
summary: Organize your $(pwd)
|
54
|
+
summary: Organize your $(pwd).
|
54
55
|
test_files: []
|
data/README.md
DELETED
@@ -1,53 +0,0 @@
|
|
1
|
-
# bombay
|
2
|
-
|
3
|
-
`bombay` sorts the files in your working directory by filetype, and
|
4
|
-
sends them to their appropriate `$XDG_*_DIR`.
|
5
|
-
|
6
|
-
## Usage
|
7
|
-
|
8
|
-
Imagine you had this mess in your `~/Downloads`:
|
9
|
-
|
10
|
-
```bash
|
11
|
-
$ ls -al ~/Downloads
|
12
|
-
.
|
13
|
-
..
|
14
|
-
badger-sock.pdf
|
15
|
-
parallel-muffin.png
|
16
|
-
virtual-monkey.webp
|
17
|
-
student-steak.svg
|
18
|
-
kind-vulture.epub
|
19
|
-
funny-dialect.mp4
|
20
|
-
summer-dance.gif
|
21
|
-
[redacted]
|
22
|
-
```
|
23
|
-
|
24
|
-
Let's tell `bombay` to clean it up:
|
25
|
-
|
26
|
-
```bash
|
27
|
-
~ $ cd Downloads
|
28
|
-
|
29
|
-
~/Downloads $ bombay
|
30
|
-
|
31
|
-
~ $ ls ~/Pictures
|
32
|
-
parallel-muffin.png student-steak.svg virtual-monkey.webp
|
33
|
-
|
34
|
-
~ $ ls ~/Documents
|
35
|
-
badger-sock.pdf kind-vulture.epub
|
36
|
-
|
37
|
-
~ $ ls ~/Videos
|
38
|
-
summer-dance.gif funny-dialect.mp4
|
39
|
-
```
|
40
|
-
|
41
|
-
`bombay` will parse your `$XDG_CONFIG_HOME/user-dirs.dirs` to locate
|
42
|
-
the directories inside of which the files will be organized. Because
|
43
|
-
of this, it is limited to *Linux* for the moment.
|
44
|
-
|
45
|
-
## Installation
|
46
|
-
|
47
|
-
```
|
48
|
-
gem install bombay
|
49
|
-
```
|
50
|
-
|
51
|
-
## Copying
|
52
|
-
|
53
|
-
This software is licensed under the MIT license.
|