bumped: (0.1.4) moved strings to an heade file
This commit is contained in:
parent
ad2d685360
commit
532e3e408f
4 changed files with 28 additions and 25 deletions
2
PKGBUILD
2
PKGBUILD
|
@ -1,6 +1,6 @@
|
|||
pkgname=stc-git
|
||||
_gitname=stc
|
||||
pkgver=0.1.3
|
||||
pkgver=0.1.4
|
||||
pkgrel=1
|
||||
pkgdesc="Easily download collections and mods from steam."
|
||||
url="https://github.com/DRAGONTOS/stc"
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
{
|
||||
"version": "0.1.3"
|
||||
"version": "0.1.4"
|
||||
}
|
||||
|
|
22
src/includes/Strings.hpp
Normal file
22
src/includes/Strings.hpp
Normal file
|
@ -0,0 +1,22 @@
|
|||
#pragma once
|
||||
#include <string_view>
|
||||
|
||||
const std::string_view USAGE = R"#(usage: Steam Collector [flags] [<command> [args]]
|
||||
LISTING FLAGS:
|
||||
-c: Install a collection.
|
||||
-m: Install a specific mod.
|
||||
-h: For the entire help msg.
|
||||
)#";
|
||||
|
||||
const std::string_view HELP = R"#(usage: Steam Collector [flags] [<command> [args]]
|
||||
LISTING FLAGS:
|
||||
-c: Install a collection.
|
||||
-m: Install a specific mod.
|
||||
-h: For the entire help msg.
|
||||
|
||||
LISTING ARGS:
|
||||
1: Should be the collectionid/modid.
|
||||
2: Could be the username if required.
|
||||
3: Could be the password if required.
|
||||
4: The dir to where you want to download the mods.
|
||||
)#";
|
27
src/main.cpp
27
src/main.cpp
|
@ -10,6 +10,7 @@
|
|||
#include <ostream>
|
||||
#include <string>
|
||||
#include "includes/getHttp.h"
|
||||
#include "includes/Strings.hpp"
|
||||
#include "regex"
|
||||
|
||||
std::string woof(std::ifstream &meow) {
|
||||
|
@ -18,26 +19,6 @@ std::string woof(std::ifstream &meow) {
|
|||
return nya.str();
|
||||
}
|
||||
|
||||
const std::string USAGE = R"#(usage: Steam Collector [flags] [<command> [args]]
|
||||
LISTING FLAGS:
|
||||
-c: Install a collection.
|
||||
-m: Install a specific mod.
|
||||
-h: For the entire help msg.
|
||||
)#";
|
||||
|
||||
const std::string HELP = R"#(usage: Steam Collector [flags] [<command> [args]]
|
||||
LISTING FLAGS:
|
||||
-c: Install a collection.
|
||||
-m: Install a specific mod.
|
||||
-h: For the entire help msg.
|
||||
|
||||
LISTING ARGS:
|
||||
1: Should be the collectionid/modid.
|
||||
2: Could be the username if required.
|
||||
3: Could be the password if required.
|
||||
4: The dir to where you want to download the mods.
|
||||
)#";
|
||||
|
||||
int main(int argc, char **argv, char **envp) {
|
||||
|
||||
// need some cleaning in the future ata
|
||||
|
@ -85,7 +66,7 @@ int main(int argc, char **argv, char **envp) {
|
|||
// help msg
|
||||
if (ARGS[i] == "-h") {
|
||||
if (argc < 3 || argv[2][0] == '-') {
|
||||
std::cerr << HELP.c_str();
|
||||
std::cerr << HELP;
|
||||
return 1;
|
||||
}
|
||||
std::cout << HELP;
|
||||
|
@ -95,7 +76,7 @@ int main(int argc, char **argv, char **envp) {
|
|||
// collectionid
|
||||
if (ARGS[i] == "-c") {
|
||||
if (argc < 3 || argv[2][0] == '-') {
|
||||
std::cerr << USAGE.c_str();
|
||||
std::cerr << USAGE;
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
@ -150,7 +131,7 @@ int main(int argc, char **argv, char **envp) {
|
|||
// modid
|
||||
if (ARGS[i] == "-m") {
|
||||
if (argc < 3 || argv[2][0] == '-') {
|
||||
std::cerr << USAGE.c_str();
|
||||
std::cerr << USAGE;
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue