import re, datetime info = r""" BuildMachineOSBuild 19B88 CFBundleDevelopmentRegion English CFBundleExecutable love CFBundleIconFile iconfile CFBundleIdentifier org.love2d.MrZ.Techmino CFBundleInfoDictionaryVersion 6.0 CFBundleName Techmino CFBundlePackageType APPL CFBundleShortVersionString %s CFBundleSignature LoVe CFBundleSupportedPlatforms MacOSX DTCompiler com.apple.compilers.llvm.clang.1_0 DTPlatformBuild 11C504 DTPlatformVersion GM DTSDKBuild 19B90 DTSDKName macosx10.15 DTXcode 1130 DTXcodeBuild 11C504 LSApplicationCategoryType public.app-category.games LSMinimumSystemVersion 10.7 NSHighResolutionCapable NSHumanReadableCopyright ©2020-%d 26F Studio, GNU LGPLv3.0 NSPrincipalClass NSApplication NSSupportsAutomaticGraphicsSwitching """ with open("conf.lua", "r") as file: data = file.read() versionCode = re.search("build=(\\d+)", data).group(1) # versionName = re.search('short="([^"]+)', data).group(1) print(versionCode) with open("Techmino.app/Contents/info.plist", "w") as file: file.write(info % (versionCode, datetime.datetime.today().year))