From ea03c87a44ef5c23bcfdb9bab8d2054e1bacb332 Mon Sep 17 00:00:00 2001 From: Exodia <67595890+DonRP@users.noreply.github.com> Date: Tue, 26 Jul 2022 22:41:44 +0200 Subject: [PATCH] clear --- .github/FUNDING.yml | 13 - .github/workflows/devskim.yml | 34 --- .vscode/extensions.json | 10 - .vscode/launch.json | 56 ---- .vscode/settings.json | 475 ------------------------------- SECURITY.md | 21 -- bin/renpy | 5 - bin/renpy.ps1 | 8 - console/debug.rpy | 29 -- crowdin.yml | 5 - translation_convertor_rpytopo.py | 114 -------- 11 files changed, 770 deletions(-) delete mode 100644 .github/FUNDING.yml delete mode 100644 .github/workflows/devskim.yml delete mode 100644 .vscode/extensions.json delete mode 100644 .vscode/launch.json delete mode 100644 .vscode/settings.json delete mode 100644 SECURITY.md delete mode 100755 bin/renpy delete mode 100755 bin/renpy.ps1 delete mode 100644 console/debug.rpy delete mode 100644 crowdin.yml delete mode 100644 translation_convertor_rpytopo.py diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml deleted file mode 100644 index f845b4e..0000000 --- a/.github/FUNDING.yml +++ /dev/null @@ -1,13 +0,0 @@ -# These are supported funding model platforms - -github: DonRP # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2] -patreon: DRincs # Replace with a single Patreon username -open_collective: # Replace with a single Open Collective username -ko_fi: # Replace with a single Ko-fi username -tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel -community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry -liberapay: # Replace with a single Liberapay username -issuehunt: # Replace with a single IssueHunt username -otechie: # Replace with a single Otechie username -lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry -custom: ['https://www.buymeacoffee.com/DRincs'] # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] diff --git a/.github/workflows/devskim.yml b/.github/workflows/devskim.yml deleted file mode 100644 index 07cb510..0000000 --- a/.github/workflows/devskim.yml +++ /dev/null @@ -1,34 +0,0 @@ -# This workflow uses actions that are not certified by GitHub. -# They are provided by a third-party and are governed by -# separate terms of service, privacy policy, and support -# documentation. - -name: DevSkim - -on: - push: - branches: [ "main" ] - pull_request: - branches: [ "main" ] - schedule: - - cron: '23 14 * * 5' - -jobs: - lint: - name: DevSkim - runs-on: ubuntu-20.04 - permissions: - actions: read - contents: read - security-events: write - steps: - - name: Checkout code - uses: actions/checkout@v3 - - - name: Run DevSkim scanner - uses: microsoft/DevSkim-Action@v1 - - - name: Upload DevSkim scan results to GitHub Security tab - uses: github/codeql-action/upload-sarif@v2 - with: - sarif_file: devskim-results.sarif diff --git a/.vscode/extensions.json b/.vscode/extensions.json deleted file mode 100644 index 6ba2e21..0000000 --- a/.vscode/extensions.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - // See https://go.microsoft.com/fwlink/?LinkId=827846 - // for the documentation about the extensions.json format - "recommendations": [ - "luquedaniel.languague-renpy", - "ms-python.python", - "ms-vscode.powershell", - "mrorz.language-gettext" - ] -} diff --git a/.vscode/launch.json b/.vscode/launch.json deleted file mode 100644 index 0d6800d..0000000 --- a/.vscode/launch.json +++ /dev/null @@ -1,56 +0,0 @@ -{ - // Usare IntelliSense per informazioni sui possibili attributi. - // Al passaggio del mouse vengono visualizzate le descrizioni degli attributi esistenti. - // Per altre informazioni, visitare: https://go.microsoft.com/fwlink/?linkid=830387 - "version": "0.2.0", - "configurations": [ - { - "name": "Ren'Py: Setup", - "type": "PowerShell", - "request": "launch", - "script": "echo \"${input:RenPySdk}\" > .renpy-sdk", - }, - { - "name": "Ren'Py: Run", - "type": "PowerShell", - "request": "launch", - "script": "bin/renpy run", - "cwd": "${workspaceFolder}" - }, - { - "name": "Ren'Py: Recompile & Run", - "type": "PowerShell", - "request": "launch", - "script": "bin/renpy compile; bin/renpy run", - "cwd": "${workspaceFolder}" - }, - { - "name": "Ren'Py: Delete Persistent", - "type": "PowerShell", - "request": "launch", - "script": "bin/renpy rmpersistent", - "cwd": "${workspaceFolder}" - }, - { - "name": "Ren'Py: Lint", - "type": "PowerShell", - "request": "launch", - "script": "bin/renpy lint", - "cwd": "${workspaceFolder}" - }, - { - "name": "Ren'Py: Distribute", - "type": "PowerShell", - "request": "launch", - "script": "bin/renpy distribute", - "cwd": "${workspaceFolder}" - }, - ], - "inputs": [ - { - "id": "RenPySdk", - "description": "Paste the path to your Ren'Py SDK folder", - "type": "promptString", - } - ] -} \ No newline at end of file diff --git a/.vscode/settings.json b/.vscode/settings.json deleted file mode 100644 index ea88a0e..0000000 --- a/.vscode/settings.json +++ /dev/null @@ -1,475 +0,0 @@ -{ - "[renpy]": { - "editor.defaultFormatter": "ms-python.python", - }, - "editor.formatOnSave": true, - "files.exclude": { - "**/*.rpyc": true, - "**/*.rpa": true, - "**/*.rpymc": true, - "**/cache/": true - }, - "editor.tokenColorCustomizations": { - "textMateRules": [ - { - "scope": "renpy.meta.plain", - "settings": { - "fontStyle": "" - } - }, - { - "scope": "renpy.meta.i", - "settings": { - "fontStyle": "italic" - } - }, - { - "scope": "renpy.meta.b", - "settings": { - "fontStyle": "bold" - } - }, - { - "scope": [ - "renpy.meta.u", - "renpy.meta.a" - ], - "settings": { - "fontStyle": "underline" - } - }, - { - "scope": "renpy.meta.s", - "settings": { - "fontStyle": "strikethrough" - } - }, - { - "scope": "renpy.meta.i renpy.meta.b", - "settings": { - "fontStyle": "italic bold" - } - }, - { - "scope": "renpy.meta.i renpy.meta.u", - "settings": { - "fontStyle": "italic underline" - } - }, - { - "scope": "renpy.meta.i renpy.meta.s", - "settings": { - "fontStyle": "italic strikethrough" - } - }, - { - "scope": "renpy.meta.b renpy.meta.u", - "settings": { - "fontStyle": "bold underline" - } - }, - { - "scope": "renpy.meta.b renpy.meta.s", - "settings": { - "fontStyle": "bold strikethrough" - } - }, - { - "scope": "renpy.meta.u renpy.meta.s", - "settings": { - "fontStyle": "underline strikethrough" - } - }, - { - "scope": "renpy.meta.i renpy.meta.b renpy.meta.u", - "settings": { - "fontStyle": "italic bold underline" - } - }, - { - "scope": "renpy.meta.i renpy.meta.b renpy.meta.s", - "settings": { - "fontStyle": "italic bold strikethrough" - } - }, - { - "scope": "renpy.meta.i renpy.meta.u renpy.meta.s", - "settings": { - "fontStyle": "italic underline strikethrough" - } - }, - { - "scope": "renpy.meta.b renpy.meta.u renpy.meta.s", - "settings": { - "fontStyle": "bold underline strikethrough" - } - }, - { - "scope": "renpy.meta.i renpy.meta.b renpy.meta.u renpy.meta.s", - "settings": { - "fontStyle": "italic bold underline strikethrough" - } - }, - { - "scope": "renpy.meta.color.text", - "settings": { - "foreground": "#ffffff" - } - }, - { - "scope": "renpy.meta.color.#570058", - "settings": { - "foreground": "#570058" - } - }, - { - "scope": "renpy.meta.color.#570058", - "settings": { - "foreground": "#570058" - } - }, - { - "scope": "renpy.meta.color.#cc5dcd", - "settings": { - "foreground": "#cc5dcd" - } - }, - { - "scope": "renpy.meta.color.#570058", - "settings": { - "foreground": "#570058" - } - }, - { - "scope": "renpy.meta.color.#570058", - "settings": { - "foreground": "#570058" - } - }, - { - "scope": "renpy.meta.color.#cc5dcd", - "settings": { - "foreground": "#cc5dcd" - } - }, - { - "scope": "renpy.meta.color.#ff0000", - "settings": { - "foreground": "#ff0000" - } - }, - { - "scope": "renpy.meta.color.#cfc", - "settings": { - "foreground": "#cfc" - } - }, - { - "scope": "renpy.meta.color.#fcc", - "settings": { - "foreground": "#fcc" - } - }, - { - "scope": "renpy.meta.color.#fff", - "settings": { - "foreground": "#fff" - } - }, - { - "scope": "renpy.meta.color.#f00", - "settings": { - "foreground": "#f00" - } - }, - { - "scope": "renpy.meta.color.#00ff00", - "settings": { - "foreground": "#00ff00" - } - }, - { - "scope": "renpy.meta.color.#00ff00", - "settings": { - "foreground": "#00ff00" - } - }, - { - "scope": "renpy.meta.color.#00ff00", - "settings": { - "foreground": "#00ff00" - } - }, - { - "scope": "renpy.meta.color.#00ff00", - "settings": { - "foreground": "#00ff00" - } - }, - { - "scope": "renpy.meta.color.#00ff00", - "settings": { - "foreground": "#00ff00" - } - }, - { - "scope": "renpy.meta.color.#00ff00", - "settings": { - "foreground": "#00ff00" - } - }, - { - "scope": "renpy.meta.color.#00ff00", - "settings": { - "foreground": "#00ff00" - } - }, - { - "scope": "renpy.meta.color.#00ff00", - "settings": { - "foreground": "#00ff00" - } - }, - { - "scope": "renpy.meta.color.#00ff00", - "settings": { - "foreground": "#00ff00" - } - }, - { - "scope": "renpy.meta.color.#00ff00", - "settings": { - "foreground": "#00ff00" - } - }, - { - "scope": "renpy.meta.color.#00ff00", - "settings": { - "foreground": "#00ff00" - } - }, - { - "scope": "renpy.meta.color.#00ff00", - "settings": { - "foreground": "#00ff00" - } - }, - { - "scope": "renpy.meta.color.#00ff00", - "settings": { - "foreground": "#00ff00" - } - }, - { - "scope": "renpy.meta.color.#00ff00", - "settings": { - "foreground": "#00ff00" - } - }, - { - "scope": "renpy.meta.color.#00ff00", - "settings": { - "foreground": "#00ff00" - } - }, - { - "scope": "renpy.meta.color.#00ff00", - "settings": { - "foreground": "#00ff00" - } - }, - { - "scope": "renpy.meta.color.#00ff00", - "settings": { - "foreground": "#00ff00" - } - }, - { - "scope": "renpy.meta.color.#00ff00", - "settings": { - "foreground": "#00ff00" - } - }, - { - "scope": "renpy.meta.color.#00ff00", - "settings": { - "foreground": "#00ff00" - } - }, - { - "scope": "renpy.meta.color.#00ff00", - "settings": { - "foreground": "#00ff00" - } - }, - { - "scope": "renpy.meta.color.#e59400", - "settings": { - "foreground": "#e59400" - } - }, - { - "scope": "renpy.meta.color.#e59400", - "settings": { - "foreground": "#e59400" - } - }, - { - "scope": "renpy.meta.color.#e59400", - "settings": { - "foreground": "#e59400" - } - }, - { - "scope": "renpy.meta.color.#e59400", - "settings": { - "foreground": "#e59400" - } - }, - { - "scope": "renpy.meta.color.#e59400", - "settings": { - "foreground": "#e59400" - } - }, - { - "scope": "renpy.meta.color.#e59400", - "settings": { - "foreground": "#e59400" - } - }, - { - "scope": "renpy.meta.color.#e59400", - "settings": { - "foreground": "#e59400" - } - }, - { - "scope": "renpy.meta.color.#e59400", - "settings": { - "foreground": "#e59400" - } - }, - { - "scope": "renpy.meta.color.#e59400", - "settings": { - "foreground": "#e59400" - } - }, - { - "scope": "renpy.meta.color.#e59400", - "settings": { - "foreground": "#e59400" - } - }, - { - "scope": "renpy.meta.color.#e59400", - "settings": { - "foreground": "#e59400" - } - }, - { - "scope": "renpy.meta.color.#e59400", - "settings": { - "foreground": "#e59400" - } - }, - { - "scope": "renpy.meta.color.#e59400", - "settings": { - "foreground": "#e59400" - } - }, - { - "scope": "renpy.meta.color.#e59400", - "settings": { - "foreground": "#e59400" - } - }, - { - "scope": "renpy.meta.color.#e59400", - "settings": { - "foreground": "#e59400" - } - }, - { - "scope": "renpy.meta.color.#e59400", - "settings": { - "foreground": "#e59400" - } - }, - { - "scope": "renpy.meta.color.#e59400", - "settings": { - "foreground": "#e59400" - } - }, - { - "scope": "renpy.meta.color.#e59400", - "settings": { - "foreground": "#e59400" - } - }, - { - "scope": "renpy.meta.color.#e59400", - "settings": { - "foreground": "#e59400" - } - }, - { - "scope": "renpy.meta.color.#e59400", - "settings": { - "foreground": "#e59400" - } - }, - { - "scope": "renpy.meta.color.#ffbe00", - "settings": { - "foreground": "#ffbe00" - } - }, - { - "scope": "renpy.meta.color.#ffbe00", - "settings": { - "foreground": "#ffbe00" - } - }, - { - "scope": "renpy.meta.color.#e59400", - "settings": { - "foreground": "#e59400" - } - }, - { - "scope": "renpy.meta.color.#e59400", - "settings": { - "foreground": "#e59400" - } - }, - { - "scope": "renpy.meta.color.#00ff00", - "settings": { - "foreground": "#00ff00" - } - }, - { - "scope": "renpy.meta.color.#00ff00", - "settings": { - "foreground": "#00ff00" - } - }, - { - "scope": "renpy.meta.color.#e59400", - "settings": { - "foreground": "#e59400" - } - }, - { - "scope": "renpy.meta.color.#e59400", - "settings": { - "foreground": "#e59400" - } - } - ] - } -} diff --git a/SECURITY.md b/SECURITY.md deleted file mode 100644 index 034e848..0000000 --- a/SECURITY.md +++ /dev/null @@ -1,21 +0,0 @@ -# Security Policy - -## Supported Versions - -Use this section to tell people about which versions of your project are -currently being supported with security updates. - -| Version | Supported | -| ------- | ------------------ | -| 5.1.x | :white_check_mark: | -| 5.0.x | :x: | -| 4.0.x | :white_check_mark: | -| < 4.0 | :x: | - -## Reporting a Vulnerability - -Use this section to tell people how to report a vulnerability. - -Tell them where to go, how often they can expect to get an update on a -reported vulnerability, what to expect if the vulnerability is accepted or -declined, etc. diff --git a/bin/renpy b/bin/renpy deleted file mode 100755 index 4b829cf..0000000 --- a/bin/renpy +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash - -RENPY="$(<.renpy-sdk)" -echo "Using Ren'Py SDK: $RENPY" -"$RENPY/renpy.sh" . "${@:1}" diff --git a/bin/renpy.ps1 b/bin/renpy.ps1 deleted file mode 100755 index c43de18..0000000 --- a/bin/renpy.ps1 +++ /dev/null @@ -1,8 +0,0 @@ -param( - [string] $Command = "run" -) -$RenPy = Get-Content (Resolve-Path ".renpy-sdk") -$RenPy = [string]::join("", ($RenPy.Split("`n"))) - -Write-Output "Using Ren'Py SDK: $RenPy" -Start-Process -FilePath "$RenPy\renpy.exe" -ArgumentList ". $Command" diff --git a/console/debug.rpy b/console/debug.rpy deleted file mode 100644 index e6a0a25..0000000 --- a/console/debug.rpy +++ /dev/null @@ -1,29 +0,0 @@ -init python: - from inspect import getargspec - config.debug = True - config.developer = True - - def scan_(s, *types): - for k, v in globals().items(): - if ( - s.lower() in k.lower() - # and (not exclude or not isinstance(v, exclude)) - and (not types or isinstance(v, types)) - ): - yield k, v - - def l_(s, *types): - results = list(scan_(s, *types)) - width = max(map(lambda (k, v): len(k), results or [('', None)])) - print "-", s, types, "found", len(results), "----------------" - for k, v in results: - print k.ljust(width), v_(v) - print "Done." - - def v_(v): - if callable(v): - try: - return getargspec(v) - except Exception as e: - return repr(v) + " -- Exception: " + repr(e) - return repr(v) diff --git a/crowdin.yml b/crowdin.yml deleted file mode 100644 index 51444f3..0000000 --- a/crowdin.yml +++ /dev/null @@ -1,5 +0,0 @@ -files: - - source: /game/tl/crowdin/**/*.po - ignore: - - /game/tl/crowdin/common.rpy - translation: /game/tl/%language%/%original_file_name% diff --git a/translation_convertor_rpytopo.py b/translation_convertor_rpytopo.py deleted file mode 100644 index f3c4617..0000000 --- a/translation_convertor_rpytopo.py +++ /dev/null @@ -1,114 +0,0 @@ -from fileinput import FileInput -from glob import glob -import os -import shutil -import re - -# ATTENTION: there must not be 2 equal key or value -# regex: https://www.w3schools.com/python/python_regex.asp -dict = { - # search_text : replace_text - # start - r'\\'+'"': r'§§§§§§§§', - # Effect - r'" nointeract': r' [nointeract]"', - r'" with fade': r' [withfade]"', - r'" with dissolve': r' [withdissolve]"', - r'" with slowdissolve': r' [withslowdissolve]"', - r'" with hpunch': r' [withhpunch]"', - r'" with flash': r' [withflash]"', - r'" with vpunch': r' [withvpunch]"', - r'" with Dissolve(2.0)': r' [withDissolve20]"', - r' # nvl clear': r'msgid "[nvl_clear]"', - r' nvl clear': r'msgstr "[nvl_clear]"', - # first - r' # "(.*?)" "(.*?)"': r'msgid "\1 [special_delimiter] \2"', - r' "(.*?)" "(.*?)"': r'msgstr "\1 [special_delimiter] \2"', - r' #': r'#', - r' old "(.*?)"': r'msgid "\1"', - r' new "(.*?)"': r'msgstr "\1"', - # find: # (.*?) "(.*?)" - # replace:msgid "[$1] $2" - r'# (.*?) "(.*?)"': r'msgid "[_\1_] \2"', - # after - # find: (.*?) "(.*?)" - # replace:msgstr "[$1] $2" - r' (.*?) "(.*?)"': r'msgstr "[_\1_] \2"', - r'# "(.*?)"': r'msgid "\1"', - r' "(.*?)"': r'msgstr "\1"', - # Comment - r':\n\nmsgid': r':\nmsgid', - r'rpy:(.*?)\ntranslate': r'rpy:\1 #-#-# translate', - r'strings:\n\n# ': r'strings: #|#|# # ', - r'\ntranslate': r'\n#§translate', - r'updated at (.*?)-(.*?)-(.*?) (.*?):(.*?)\n\n# ': r'updated at \1-\2-\3 \4:\5 #|#|# # ', - # end - r'§§§§§§§§': r'\\'+'"', -} - - -# Creating a function to replace the text -def replacetext(search_text, replace_text, pathFile): - - # Read in the file - with open(pathFile, "r+", encoding="utf8") as file: - filedata = file.read() - - # c = re.compile(search_text) - - # Replace the target string - # filedata = filedata.replace(search_text, replace_text) - filedata = re.sub(search_text, replace_text, filedata) - # TODO: to improve - filedata = re.sub(r'\[_(.*?)\b (.*?)_\]', r'[_\1_s_\2_]', filedata) - filedata = re.sub(r'\[_(.*?)\b (.*?)_\]', r'[_\1_s_\2_]', filedata) - filedata = re.sub(r'\[_(.*?)\b (.*?)_\]', r'[_\1_s_\2_]', filedata) - filedata = re.sub(r'\[_(.*?)\b (.*?)_\]', r'[_\1_s_\2_]', filedata) - filedata = re.sub(r'\[_(.*?)\b (.*?)_\]', r'[_\1_s_\2_]', filedata) - filedata = re.sub(r'\[_(.*?)\b (.*?)_\]', r'[_\1_s_\2_]', filedata) - filedata = re.sub(r'\[_(.*?)\b (.*?)_\]', r'[_\1_s_\2_]', filedata) - filedata = re.sub(r'\[_(.*?)\b (.*?)_\]', r'[_\1_s_\2_]', filedata) - - # Write the file out again - with open(pathFile, 'w', encoding="utf8") as file: - file.write(filedata) - return True - - -def replaceDictionary(pathFile, dict={}, reverse=False): - newpathFile = fileRename(pathFile, extension=".po") - print(pathFile) - if(reverse): - for item in reversed(list(dict.items())): - replacetext(pathFile=newpathFile, - search_text=item[1], replace_text=item[0]) - else: - for search_text in dict.keys(): - replacetext(pathFile=newpathFile, search_text=search_text, - replace_text=dict[search_text]) - - -def getListFiles(extension=".po"): - # Get the list of all files and directories - path = "game/tl/" - dir_list = glob(path + "/**/*"+extension, recursive=True) - return dir_list - - -def rpytopo(): - for path in getListFiles(extension=".rpy"): - replaceDictionary(path, dict=dict) - - -def potorpy(): - for path in getListFiles(): - replaceDictionary(path, dict=dict, reverse=True) - - -def fileRename(pathFile, extension=".rpy"): - pre, ext = os.path.splitext(pathFile) - shutil.copyfile(pathFile, pre + extension) - return pre + extension - - -rpytopo()