lith 4 жил өмнө
parent
commit
d305a5e6c2

+ 0 - 64
FileZip/Doc/FileZip_Readme.txt

@@ -1,64 +0,0 @@
- FileZip
-
-
-为net core2.1开发的文件夹工具,包括 文件夹合并、加压(zip) 和 解压(unzip、un7z、unrar)工具
-
-运行环境 dotnet core 2.1
-
------------------------------------
-dotnet FileZip.dll
-
-程序会显示使用文档
-
------------------
-
-dotnet FileZip.dll marge -i "E:\t 2" -o "E:\t 2.7z"
-
-dotnet FileZip.dll un7z -i "E:\t\m.7z" -o "E:\t\t2"
-
-
-
-
-命令帮助文档:
----------------
-help
-帮助文档:
--c[--command] 要查询的命令。若不指定则返回所有命令的文档。如 help
-示例: help -c help
----------------
-zip
-压缩为gzip文件。参数说明:
--i[--input] 待压缩目录 例如 "/data/a"
--o[--output] 压缩后文件名(若不指定,加压到压缩文件夹所在目录),例如 "/data/a.zip"
-示例: zip -i "/data/a" -o "/data/a.zip"
----------------
-marge
-合并文件。参数说明:
--i[--input] 待合并的文件夹 或 文件查询字符串。 如 /data/a/1.7z.*
--o[--output] 合并后文件
-示例: marge -i "/data/a" -o /data/a.7z
----------------
-un7z
-解压7z文件。参数说明:
--i[--input] 待解压文件 例如 "/data/a.7z.001"
--o[--output] 输出目录,(若不指定,则解压到压缩文件所在目录)
--m[--mute] 若指定,则不输出解压的文件(夹)信息
--mf[--mutefile] 若指定,则不输出解压的文件信息
-示例: un7z -i "/data/a.7z" -o "/data/out" --mute
----------------
-unrar
-解压rar文件。参数说明:
--i[--input] 待解压文件 例如 "/data/a.rar.001"
--o[--output] 输出目录,(若不指定,则解压到压缩文件所在目录)
--m[--mute] 若指定,则不输出解压的文件(夹)信息
--mf[--mutefile] 若指定,则不输出解压的文件信息
-示例: unrar -i "/data/a.rar" -o "/data/out" --mute
----------------
-unzip
-解压zip文件。参数说明:
--i[--input] 待解压文件 例如 "/data/a.zip.001"
--o[--output] 输出目录,(若不指定,则解压到压缩文件所在目录)
--m[--mute] 若指定,则不输出解压的文件(夹)信息
--mf[--mutefile] 若指定,则不输出解压的文件信息
-示例: unzip -i "/data/a.zip" -o "/data/out" --mute
----------------

+ 2 - 2
FileZip/FileZip.csproj

@@ -3,9 +3,9 @@
   <PropertyGroup>
   <PropertyGroup>
     <OutputType>Exe</OutputType>
     <OutputType>Exe</OutputType>
     <TargetFramework>netcoreapp2.1</TargetFramework>
     <TargetFramework>netcoreapp2.1</TargetFramework>
-    <Version>1.2</Version>
+    <Version>1.3.346</Version>
     <Authors>Lith</Authors>
     <Authors>Lith</Authors>
-    <Description>sersms@163.com</Description>
+    <Description>https://github.com/sersset/FileZip</Description>
   </PropertyGroup>
   </PropertyGroup>
 
 
   
   

+ 0 - 0
FileZip/Doc/dotnet_start.bat → Publish/04.服务站点/Start FileZip.bat


+ 4 - 0
Publish/06.Docker/制作镜像/filezip/Dockerfile

@@ -0,0 +1,4 @@
+FROM serset/dotnet:2.1
+COPY app /root/app
+WORKDIR /root/app/filezip
+CMD ["dotnet","FileZip.dll"]

+ 33 - 0
Publish/06.Docker/制作镜像/制作镜像.txt

@@ -0,0 +1,33 @@
+#构建镜像
+
+# docker login -u serset -p xxxxxxxxx
+
+#把本文件所在目录下的文件夹拷贝到 /root/image 
+
+cd /root/image 
+
+
+#构建镜像并推送到 镜像仓库
+
+cd filezip
+docker build -t serset/filezip:1.3.346 -t serset/filezip . 
+
+
+docker push serset/filezip:1.3.346
+docker push serset/filezip
+ 
+
+
+
+
+#强制删除镜像名称中包含filezip的镜像
+# docker rmi --force $(docker images | grep filezip | awk '{print $3}')
+
+
+
+
+
+
+
+
+ 

+ 59 - 0
Publish/06.Docker/制作镜像/制作镜像Sers.txt

@@ -0,0 +1,59 @@
+#构建多架构镜像
+
+#docker login -u serset -p xxxxxxxxx
+
+#---------------------------------------------------------------------
+#(x.1)初始化构建器
+
+#启用 buildx 插件
+export DOCKER_CLI_EXPERIMENTAL=enabled
+
+#验证是否开启
+docker buildx version
+
+#启用 binfmt_misc
+docker run --rm --privileged docker/binfmt:66f9012c56a8316f9244ffd7622d7c21c1f6f28d
+
+#验证是 binfmt_misc 否开启
+ls -al /proc/sys/fs/binfmt_misc/
+
+
+#创建一个新的构建器
+docker buildx create --use --name mybuilder
+
+#启动构建器
+docker buildx inspect mybuilder --bootstrap
+
+#查看当前使用的构建器及构建器支持的 CPU 架构,可以看到支持很多 CPU 架构:
+docker buildx ls
+
+
+
+#---------------------------------------------------------------------
+#(x.2)构建多架构镜像( arm、arm64 和 amd64 )并推送到 Docker Hub
+
+#把本文件所在目录下的cgateway文件夹拷贝到 image 
+cd /root/image
+
+#构建镜像并推送到 Docker Hub
+
+cd filezip
+docker buildx build . -t serset/filezip:1.3.346 -t serset/filezip:latest --platform=linux/amd64,linux/arm64,linux/arm/v7 --push
+  
+
+
+#强制删除镜像名称中包含sers的镜像
+# docker rmi --force $(docker images | grep filezip | awk '{print $3}')
+
+
+
+
+
+
+
+
+
+
+
+
+ 

+ 22 - 0
Publish/20.一键发布.bat

@@ -0,0 +1,22 @@
+:: @echo off
+
+cd /d 脚本\发布脚本 
+
+:: 并行发布
+:: for /R %%s in (发布-*) do (   
+::  start "发布" "%%s"
+:: )  
+
+:: 串行发布
+for /R %%s in (发布-*) do (   
+ call "%%s"
+)  
+
+cd /d ..\制作docker镜像
+call "docker镜像-1.复制文件.bat"
+
+echo 发布完成
+echo 发布完成
+echo 发布完成
+
+:: pause

+ 8 - 0
Publish/21.一键删除发布文件.bat

@@ -0,0 +1,8 @@
+ 
+rd /s/q "04.服务站点/FileZip"
+
+
+cd /d 脚本/制作docker镜像
+call "docker镜像-2.删除文件.bat"
+cd /d ../..
+ 

+ 6 - 0
Publish/脚本/制作docker镜像/docker镜像-1.复制文件.bat

@@ -0,0 +1,6 @@
+echo '复制文件'
+
+::制作镜像
+xcopy "..\..\04.服务站点\FileZip"  "..\..\06.Docker\制作镜像\filezip\app\filezip"  /e /i /r /y
+
+

+ 4 - 0
Publish/脚本/制作docker镜像/docker镜像-2.删除文件.bat

@@ -0,0 +1,4 @@
+echo 'ɾ³ıÎļş'
+ 
+
+rd /s/q "..\..\06.Docker\ÖÆ×÷¾µÏñ\filezip\app\filezip"

+ 8 - 0
Publish/脚本/发布脚本/发布-02.FileZip.bat

@@ -0,0 +1,8 @@
+ 
+cd /d ..\..\..\FileZip
+dotnet build --configuration Release
+dotnet publish --configuration Release --output ..\Publish\04.·þÎñÕ¾µã\FileZip
+cd /d ..\Publish\½Å±¾\·¢²¼½Å±¾
+
+ 
+

+ 76 - 0
readme.md

@@ -0,0 +1,76 @@
+# FileZip
+> FileZip为net core2.1开发的文件加解压工具,包括 文件合并、加压(zip) 和 解压(unzip、un7z、unrar)等功能  
+> 运行环境 dotnet core 2.1
+
+## 1. demo
+``` bash
+# 查看帮助
+dotnet FileZip.dll
+
+# 合并文件
+dotnet FileZip.dll marge -i "E:\t 2" -o "E:\t 2.7z"
+
+# 解压7z文件到文件夹"E:\t\t2"
+dotnet FileZip.dll un7z -i "E:\t\m.7z" -o "E:\t\t2"
+```
+
+## 2. docker运行
+``` bash
+# 查看帮助
+docker run --rm -it serset/filezip
+
+
+# 解压7z文件m.7zd到文件夹 /root/docker/file/a
+cd /root/docker/file
+docker run --rm -it \
+-v $PWD:/root/app/file  \
+serset/filezip  \
+dotnet FileZip.dll un7z \
+"-i" "/root/app/file/m.7z" \
+"-o" "/root/app/file/a"
+
+```
+
+## 3. 命令说明:
+---------------
+help  
+帮助文档:  
+-c[--command] 要查询的命令。若不指定则返回所有命令的文档。如 help  
+示例: help -c help  
+---------------
+zip  
+压缩为gzip文件。参数说明:  
+-i[--input] 待压缩目录 例如 "/data/a"  
+-o[--output] 压缩后文件名(若不指定,加压到压缩文件夹所在目录),例如 "/data/a.zip"  
+示例: zip -i "/data/a" -o "/data/a.zip"  
+---------------
+marge  
+合并文件。参数说明:  
+-i[--input] 待合并的文件夹 或 文件查询字符串。 如 /data/a/1.7z.\*    
+-o[--output] 合并后文件  
+示例: marge -i "/data/a" -o /data/a.7z  
+---------------
+un7z  
+解压7z文件。参数说明:  
+-i[--input] 待解压文件 例如 "/data/a.7z.001"  
+-o[--output] 输出目录,(若不指定,则解压到压缩文件所在目录)  
+-m[--mute] 若指定,则不输出解压的文件(夹)信息  
+-mf[--mutefile] 若指定,则不输出解压的文件信息  
+示例: un7z -i "/data/a.7z" -o "/data/out" --mute  
+---------------
+unrar  
+解压rar文件。参数说明:  
+-i[--input] 待解压文件 例如 "/data/a.rar.001"  
+-o[--output] 输出目录,(若不指定,则解压到压缩文件所在目录)  
+-m[--mute] 若指定,则不输出解压的文件(夹)信息  
+-mf[--mutefile] 若指定,则不输出解压的文件信息  
+示例: unrar -i "/data/a.rar" -o "/data/out" --mute  
+---------------
+unzip  
+解压zip文件。参数说明:  
+-i[--input] 待解压文件 例如 "/data/a.zip.001"  
+-o[--output] 输出目录,(若不指定,则解压到压缩文件所在目录)  
+-m[--mute] 若指定,则不输出解压的文件(夹)信息  
+-mf[--mutefile] 若指定,则不输出解压的文件信息  
+示例: unzip -i "/data/a.zip" -o "/data/out" --mute  
+---------------