You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
run: ##@run Run normally. Pass arguments like so: args="arg1 arg2 ...".
71
-
go run ./main.go $(args)
92
+
go run .$(args)
93
+
94
+
debug: ##@run Run with --test $(testargs).
95
+
go run .$(args) --test $(testargs)
72
96
73
-
wrun: ##@run Run and watch for file changes. Requires wgo: https://github.com/bokwoon95/wgo
74
-
wgo $(WGO_INCLUDE)go run ./main.go $(args)
97
+
test: ##@run go test $(args); for all packaged that contain at least 1 *_test.go script.
98
+
go test$(args)$$(go list -f '{{if len .TestGoFiles}}{{.ImportPath}}{{end}}' ./...)
75
99
76
-
debug: ##@run Run and watch with the --test flag. Requires wgo: https://github.com/bokwoon95/wgo
77
-
wgo $(WGO_INCLUDE) go run .$(args) --test
100
+
wrun: ##@run Run a make target and restart on file change. make wrun <wgoargs="args..."> target=[TARGET]. Requires wgo: https://github.com/bokwoon95/wgo
101
+
wgo $(WGO_INCLUDE)$(wgoargs)$(MAKE)$(target)
102
+
wrunstdin: ##@run Run a make wrun with wgoargs -stdin.
Copy file name to clipboardExpand all lines: README.md
+69-96Lines changed: 69 additions & 96 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -18,8 +18,9 @@ Current automated triggers:
18
18
### Reasons to use this instead
19
19
20
20
- The only thing you are required to install is [the latest release](https://github.com/CTNOriginals/BitburnerGoFilesync/releases) of this project.
21
-
- The only files that are required to be present on your system for this tool to work are: the executable and optionally a config file to change the default config fields.
22
-
- Because this is written in golang, the tool is way lighter for your system to run, and way faster than javascript could ever be executed. The speed at which this tool can operate is only limited to how fast bitburner is able to respond back to it.
21
+
- The only files that are required to be present on your system for this tool to work are: the executable and a config file.
22
+
- Because this is written in golang, the tool is way lighter for your system to run, and way faster than javascript could ever be executed.
23
+
The speed at which this tool can operate is only limited to how fast bitburner is able to respond back to it.
23
24
- The executable can be anywhere you like, as long as you can execute it from the commandline to start it.
24
25
25
26
@@ -42,9 +43,12 @@ you may also clone this repository and [run/build it yourself](#how-to-build).
42
43
43
44
## Usage
44
45
45
-
Once the executable is installed you are ready to get started with the game, the only thing you would still need to do is start the filesyncer via the commandline that you should have opened in step 3 of the installation guide.
46
+
Once the executable is installed you are ready to get started with the game.
47
+
The only thing you would still need to do is start the filesyncer via the commandline that you should have opened in step 3 of the installation guide.
46
48
47
-
Simply enter `BitburnerGoFilesync.exe` (or whatever the executable is called on your system) and pass in any arguments that you like to run it with.
49
+
Simply enter `BitburnerGoFilesync_<os>`
50
+
(replace `<os>` with your operating system: `win.exe`, `linux` or `mac`)
51
+
and optionally pass in any [Arguments](#arguments).
48
52
49
53
## Config
50
54
@@ -66,114 +70,83 @@ The config file by default will be named `config.toml` and the initial content w
66
70
| Directory | Specify the directory where this tool should watch for file changes to sync up with bitburner. |`"./"`|
67
71
| FileScanInterval | The amount of miliseconds the file scanner waits each loop. |`1000`|
68
72
|[FilePatterns]| Holds include and exclude file pattern matching fields which allow you to define which files to sync and which not to. |[Pattern matching rules](https://github.com/bmatcuk/doublestar?tab=readme-ov-file#patterns)|
69
-
| - Include | Which files should be included. |`["*.js", "*.ts"]`|
70
-
| - Exclude | Which files to ignore. This is checked before the include patterns. |`["*.d.ts"]`|
73
+
| - Include | Which files should be included. |`["**/*.js", "**/*.ts"]`|
74
+
| - Exclude | Which files to ignore. This is checked before the include patterns. |`["**/*.d.ts"]`|
75
+
|[Logging]| Control what is and isnt logged ||
76
+
| - NoColor | Prevent the logger from applying ansi color coding to the log prefix. |`false`|
71
77
72
78
## How to build
73
79
74
80
### Requirements
75
81
-[golang](https://go.dev/doc/install): To be able to run the project.
76
-
- (Optional) [wgo](https://github.com/bokwoon95/wgo): This is required for some Makefile targets.
77
-
<br>It is a tool that also watches the project for file changes and restarts it once anything is detected.
82
+
- (Optional) [make](https://en.wikipedia.org/wiki/Make_(software)): To be able to run the tool with preset macros made by me, it just *make*s it a lot easier.
83
+
- (Optional) [wgo](https://github.com/bokwoon95/wgo): This is used for some Makefile targets to automatically restart the target on file change.
78
84
79
85
Once you have a clone of this repository and you installed the "*long list*" of requirements you can run the project in one of two ways:
80
-
1.Use `make [target]`.
81
-
<br>To see all possible targets and their descriptions, run `make help`.
82
-
2.Manually type out what you want to run.
83
-
<br>This would be something along the lines of `go run . --arg1 param --arg2 ...`.
86
+
1.Manually type out what you want to run.
87
+
This would be something along the lines of `go run . --arg1 param --arg2 ...`.
88
+
2.Use `make [target]` (Requires `make`to be installed).
89
+
To see all possible targets and their descriptions, run `make help` or `make list`.
84
90
85
91
If you are looking to contribute, please read the [Contribution Guidelines](https://github.com/CTNOriginals/BitburnerGoFilesync?tab=readme-ov-file).
86
92
87
93
## Arguments
88
94
89
-
This is the text that will pop up if you enter `--full-help` in the commandline arguments
90
-
```
91
-
Formatting Rules:
92
-
Each new argument always has to start with a double dash '--'.
93
-
If the argument does not start with '--' it is considered a parameter
94
-
for the most recent argument that started with '--'.
95
-
96
-
Each argument may have any number of parameters,
97
-
to check what an argument may accept or require,
98
-
you can do --help followed by the name of the argument without the '--'.
99
-
100
-
Some arguments may accept a specific amount of parameters where others accept a range.
101
-
If an argument doesnt have its required parameters, it will say so in the console,
102
-
this argument will not execute anything after that and will be ignored.
103
-
If you pass in more parameters than an argument needs, it simply ignores the overflow.
104
-
105
-
--help, --wtf:
106
-
Prints a list of arguments and their descriptions.
107
-
Follow it up with another argument (without the -- before it)
108
-
to get a more detailed explanation about that argument.
109
-
Parameters:
110
-
command:
111
-
The name (without the -- before it) of a command.
112
-
Print a detailed explanation about a specific command.
113
-
114
-
--full-help, --fhelp:
115
-
The same as --help, but it also includes all of the extra information
116
-
as if you entered --help <command> for each argument.
117
-
118
-
--config:
119
-
Define the config.toml file path.
120
-
By default, the config file is located in the same directory as the binary.
121
-
If no config file exists at the specified location, one will be created.
0 commit comments