aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFuwn <[email protected]>2021-06-02 21:50:45 +0000
committerFuwn <[email protected]>2021-06-02 21:50:45 +0000
commit9be56dc75e33bc4e134e4729b9567f88cede7ad2 (patch)
tree89243cc275b2dd8fdb3d8bf0bdef92359741e416
parentdocs(readme): installation instructions (diff)
downloadnitrous-9be56dc75e33bc4e134e4729b9567f88cede7ad2.tar.xz
nitrous-9be56dc75e33bc4e134e4729b9567f88cede7ad2.zip
refactor(process): nitrous as hidden directory
-rw-r--r--README.rst2
-rw-r--r--src/cli.rs6
-rw-r--r--src/nitrous.rs10
3 files changed, 9 insertions, 9 deletions
diff --git a/README.rst b/README.rst
index 954c287..a27b8a1 100644
--- a/README.rst
+++ b/README.rst
@@ -60,7 +60,7 @@ of the other supported proxy types, -- :code:`http`, :code:`socks4`, or
$ nitrous check socks5 ./socks5_proxies.txt
The previous command (without any specified codes file) will run the check
-routine on a default file value of :code:`./nitrous/codes.txt`. If you would
+routine on a default file value of :code:`./.nitrous/codes.txt`. If you would
like to override this behaviour, specify your file after the proxy type with the
:code:`file` flag;
diff --git a/src/cli.rs b/src/cli.rs
index f5cc080..3b1046d 100644
--- a/src/cli.rs
+++ b/src/cli.rs
@@ -58,10 +58,10 @@ impl Cli {
.value_of("file");
if argument.is_some() {
argument.unwrap()
- } else if std::fs::File::open("nitrous/codes.txt").is_err() {
+ } else if std::fs::File::open(".nitrous/codes.txt").is_err() {
panic!("cannot open nitrous generated codes.txt");
} else {
- "nitrous/codes.txt"
+ ".nitrous/codes.txt"
}
},
debug,
@@ -104,7 +104,7 @@ impl Cli {
.long_about(
"Check a file of Discord Nitro codes for valid/ invalid codes.\n\nIf a codes file is \
not explicitly specified, the check routine will run on a default file value of \
- `./nitrous/codes.txt`. If you would like to override this behaviour, specify your \
+ `./.nitrous/codes.txt`. If you would like to override this behaviour, specify your \
file after the subcommand.",
)
.arg(
diff --git a/src/nitrous.rs b/src/nitrous.rs
index 3c2be32..a13d98a 100644
--- a/src/nitrous.rs
+++ b/src/nitrous.rs
@@ -25,12 +25,12 @@ impl Nitrous {
}
#[allow(clippy::let_underscore_drop)]
- fn initialize() { let _ = create_dir("nitrous"); }
+ fn initialize() { let _ = create_dir(".nitrous"); }
pub fn generate(amount: usize, debug: bool) {
Self::initialize();
- let mut codes = File::create("nitrous/codes.txt").unwrap();
+ let mut codes = File::create(".nitrous/codes.txt").unwrap();
for _ in 0..amount {
let code = rand::thread_rng()
@@ -55,10 +55,10 @@ impl Nitrous {
Self::initialize();
#[allow(clippy::let_underscore_drop)]
- let _ = create_dir("nitrous/check/");
+ let _ = create_dir(".nitrous/check/");
let codes = File::open(codes_file_name).unwrap();
- let mut invalid = File::create("nitrous/check/invalid.txt").unwrap();
- let mut valid = File::create("nitrous/check/valid.txt").unwrap();
+ let mut invalid = File::create(".nitrous/check/invalid.txt").unwrap();
+ let mut valid = File::create(".nitrous/check/valid.txt").unwrap();
for code in std::io::BufReader::new(codes).lines() {
let proxy_addr = if matches!(&proxy_type, ProxyType::Tor) {