Initial commit

This commit is contained in:
2024-08-15 22:35:48 +02:00
commit 4c80d69b49
7 changed files with 94 additions and 0 deletions

86
README.md Normal file
View File

@@ -0,0 +1,86 @@
# My personal tools
## cln
**Create symbolic links given a custom set of commands**
Mainly created out of frustration of windows ""symbolic"" links
This tool creates real symbolic links on any platform following the syntax of:
`source,destination,force?`
It respects existing files (be them real files or symbolic links)
Unless force is set to *t* in which case only existing symbolic links are deleted (overwriten)
Real files will never be deleted by this tool
The commands can be given by:
- stdin
- a file
- command line arguments
- a directory
Example:
- stdin
- `echo "this,that" | cln`
- command line arguments
- `sync this,that foo,bar "path containing spaces",baz`
- files
- `cln -f <file>`
- directory
- `cln -r <directory>`
- This mode looks for "sync" files recursively within the given directory and executes commands in those sync files
Given its ability to read files for commands it can be used to manage a "standard" set of symbolic links
## fiter
**Iterate over files and rename them incrementally**
Example:
Given
```
video1.mp4
video2.mp4
video3.mp4
image1.png
image2.png
executable.exe
```
Running `fiter *` would result in:
```
00001.mp4
00002.mp4
00003.mp4
00005.png
00006.png
00007.exe
```
The order is **not guranteed**
Running `fiter *.mp4` on the same folder would give:
```
00001.mp4
00002.mp4
00003.mp4
image1.png
image2.png
executable.exe
```
The tool will not delete any files by overwriting existing ones
And thanks to that it will fail when running on files that have already been renamed by it
For such scenarios use `fiter -f <glob>`
*-f* renames all files to \<file\>.bak before renaming them back to their new iterative name
This means that it can run on files that already have iterative names because none are being overwriten
**It also means that, on failure, files are left as .bak**
## fmoditer
**Iterate over files and rename them to their mod time**
Works pretty much the same way as *iter* with the exception of *-f* which is not supported by *fmoditer*
## vsclean
**"clean" vscode recent projects by deleting non existing entries and adding new folders**
Reads given directories and adds all folders in directories to vscode's recent projects
The idea is that all projects in a "projects" folder should be accessible to vscode
Doing this manually requires opening every folder one by one
It also removes non existent entries from recent projects and recent files
##

1
cln.exe Symbolic link
View File

@@ -0,0 +1 @@
C:/Users/Administrator/Seafile/Projects-Go/GoProjects/synclib/main.exe

1
fiter.exe Symbolic link
View File

@@ -0,0 +1 @@
C:/Users/Administrator/Seafile/Projects-Go/GoProjects/fiter/main.exe

1
fmoditer.exe Symbolic link
View File

@@ -0,0 +1 @@
C:/Users/Administrator/Seafile/Projects-Go/GoProjects/fmoditer/main.exe

4
sync Normal file
View File

@@ -0,0 +1,4 @@
"C:\Users\Administrator\Seafile\Projects-Go\GoProjects\fiter\main.exe",fiter.exe
"C:\Users\Administrator\Seafile\Projects-Go\GoProjects\fmoditer\main.exe",fmoditer.exe
"C:\Users\Administrator\Seafile\Projects-Go\GoProjects\project-scanner\main.exe",vsclean.exe
"C:\Users\Administrator\Seafile\Projects-Go\GoProjects\synclib\main.exe",cln.exe

0
sync2bin Normal file
View File

1
vsclean.exe Symbolic link
View File

@@ -0,0 +1 @@
C:/Users/Administrator/Seafile/Projects-Go/GoProjects/project-scanner/main.exe