The definitive list of the best of (consumer facing) open source.
Refactored source/scripts into core/source
Lucasafbb4d135214
diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.mdindex bf28f73..4125b72 100644--- a/.github/CONTRIBUTING.md+++ b/.github/CONTRIBUTING.md@@ -19,7 +19,7 @@ To establish uniformity accross the project, please adhere to these conventions.- Use the project's official name, not the repository name. Repository names often use lowercase and place dashes in place of spaces. Fallback to **Title Casing** if capitalization is not clear.- For projects with multiple repositories (EX: one for IOS, Windows, etc) link the repository with the most stars.- Do not put in a description unless the repo description is inadequate or non-existent, in which case fall back to the organization, their website, or the repo's README. **Do not write your own description, only use text from official sources of the project, and do not modify (EX: shorten) their description.** If you use a custom description make sure to put in the `custom-description` flag so that the stat updator script doesn't overide it.-- For tags, do not use the emoji. Go to [tags.json](/source/data/static/tags.json) and find the id for the tag. Our script will generate it's corresponding emoji when it builds the README.+- For tags, do not use the emoji. Go to [tags.json](/core/data/static/tags.json) and find the id for the tag. Our script will generate it's corresponding emoji when it builds the README.## How To Contribute[How to create a pull request.](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request)diff --git a/.github/workflows/format-maintenance.yml b/.github/workflows/format-maintenance.ymlindex fb87424..4d5c567 100644--- a/.github/workflows/format-maintenance.yml+++ b/.github/workflows/format-maintenance.yml@@ -28,7 +28,7 @@ jobs:run: pip install -r requirements.txt || true- name: Run script to check for format errors- run: python ./source/scripts/maintenance/json_formatter.py+ run: python ./core/source/maintenance/json_formatter.py- name: Commit and push changesrun: |diff --git a/.github/workflows/generate-readme.yml b/.github/workflows/generate-readme.ymlindex 0109eba..bf9f786 100644--- a/.github/workflows/generate-readme.yml+++ b/.github/workflows/generate-readme.yml@@ -4,7 +4,7 @@ name: Generate READMEon:# push:# paths:- # - 'source/data/**'+ # - 'core/data/**'# - 'source/components/**'workflow_dispatch:schedule:@@ -32,7 +32,7 @@ jobs:run: pip install -r requirements.txt || true- name: Run script to generate README- run: python ./source/scripts/generation/readme_generator.py+ run: python ./core/source/generation/readme_generator.py- name: Commit and push changesrun: |diff --git a/.github/workflows/status-maintenance.yml b/.github/workflows/status-maintenance.ymlindex 976e41c..2449a64 100644--- a/.github/workflows/status-maintenance.yml+++ b/.github/workflows/status-maintenance.yml@@ -34,7 +34,7 @@ jobs:env:GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}run: |- python source/scripts/maintenance/status_checker.py+ python core/source/maintenance/status_checker.py- name: Commit changesrun: |diff --git a/.github/workflows/update-stats.yml b/.github/workflows/update-stats.ymlindex ab7e77c..ba5f1c6 100644--- a/.github/workflows/update-stats.yml+++ b/.github/workflows/update-stats.yml@@ -34,12 +34,12 @@ jobs:env:GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}run: |- python source/scripts/maintenance/stats_updator.py+ python core/source/maintenance/stats_updator.py- name: Commit changesrun: |git config user.name "github-actions[bot]"git config user.email "github-actions[bot]@users.noreply.github.com"- git add source/data/dynamic/applications.json+ git add core/data/dynamic/applications.jsongit commit -m "Auto-update GitHub metadata" || echo "No changes to commit"git pushdiff --git a/cli/new/add.go b/cli/new/add.goindex 378abf6..095bd49 100644--- a/cli/new/add.go+++ b/cli/new/add.go@@ -6,7 +6,7 @@ import ("os""strings"- "definitive-opensource/data"+ "definitive-opencore/data""definitive-opensource/models")diff --git a/cli/new/select_category.go b/cli/new/select_category.goindex b2e85ab..4bb3615 100644--- a/cli/new/select_category.go+++ b/cli/new/select_category.go@@ -5,7 +5,7 @@ import ("fmt""strings"- "definitive-opensource/data"+ "definitive-opencore/data")func selectCategory(scanner *bufio.Scanner) (string, error) {diff --git a/cli/new/select_platforms.go b/cli/new/select_platforms.goindex 06a6c02..575a6f2 100644--- a/cli/new/select_platforms.go+++ b/cli/new/select_platforms.go@@ -4,7 +4,7 @@ import ("bufio""fmt"- "definitive-opensource/data"+ "definitive-opencore/data")func selectPlatforms(scanner *bufio.Scanner) ([]string, error) {diff --git a/cli/new/select_tags.go b/cli/new/select_tags.goindex 198a5ad..c7b1dde 100644--- a/cli/new/select_tags.go+++ b/cli/new/select_tags.go@@ -4,7 +4,7 @@ import ("bufio""fmt"- "definitive-opensource/data"+ "definitive-opencore/data")func selectTags(scanner *bufio.Scanner) ([]string, error) {diff --git a/source/components/footer.md b/core/components/footer.mdsimilarity index 100%rename from source/components/footer.mdrename to core/components/footer.mddiff --git a/source/components/header.md b/core/components/header.mdsimilarity index 100%rename from source/components/header.mdrename to core/components/header.mddiff --git a/source/components/linuxheader.md b/core/components/linuxheader.mdsimilarity index 100%rename from source/components/linuxheader.mdrename to core/components/linuxheader.mddiff --git a/source/components/macosheader.md b/core/components/macosheader.mdsimilarity index 100%rename from source/components/macosheader.mdrename to core/components/macosheader.mddiff --git a/source/components/selfhostheader.md b/core/components/selfhostheader.mdsimilarity index 100%rename from source/components/selfhostheader.mdrename to core/components/selfhostheader.mddiff --git a/source/components/tags.md b/core/components/tags.mdsimilarity index 100%rename from source/components/tags.mdrename to core/components/tags.mddiff --git a/source/components/windowsheader.md b/core/components/windowsheader.mdsimilarity index 100%rename from source/components/windowsheader.mdrename to core/components/windowsheader.mddiff --git a/source/data/dynamic/applications.json b/core/data/dynamic/applications.jsonsimilarity index 100%rename from source/data/dynamic/applications.jsonrename to core/data/dynamic/applications.jsondiff --git a/source/data/dynamic/archive.json b/core/data/dynamic/archive.jsonsimilarity index 100%rename from source/data/dynamic/archive.jsonrename to core/data/dynamic/archive.jsondiff --git a/source/data/dynamic/backlog.json b/core/data/dynamic/backlog.jsonsimilarity index 100%rename from source/data/dynamic/backlog.jsonrename to core/data/dynamic/backlog.jsondiff --git a/source/data/static/categories.json b/core/data/static/categories.jsonsimilarity index 100%rename from source/data/static/categories.jsonrename to core/data/static/categories.jsondiff --git a/source/data/static/platforms.json b/core/data/static/platforms.jsonsimilarity index 100%rename from source/data/static/platforms.jsonrename to core/data/static/platforms.jsondiff --git a/source/data/static/project.json b/core/data/static/project.jsonsimilarity index 100%rename from source/data/static/project.jsonrename to core/data/static/project.jsondiff --git a/source/data/static/tags.json b/core/data/static/tags.jsonsimilarity index 100%rename from source/data/static/tags.jsonrename to core/data/static/tags.jsondiff --git a/source/requirements.txt b/core/requirements.txtsimilarity index 100%rename from source/requirements.txtrename to core/requirements.txtdiff --git a/source/scripts/generation/contents_generator.py b/core/source/generation/contents_generator.pysimilarity index 93%rename from source/scripts/generation/contents_generator.pyrename to core/source/generation/contents_generator.pyindex 14be96d..601359c 100644--- a/source/scripts/generation/contents_generator.py+++ b/core/source/generation/contents_generator.py@@ -41,13 +41,13 @@ def format_stars(n):def generate_contents(platform="all"):- with open("source/data/static/categories.json", "r", encoding="utf-8") as f:+ with open("core/data/static/categories.json", "r", encoding="utf-8") as f:cat_data = json.load(f)- with open("source/data/dynamic/applications.json", "r", encoding="utf-8") as f:+ with open("core/data/dynamic/applications.json", "r", encoding="utf-8") as f:app_data = json.load(f)- with open("source/data/static/tags.json", "r", encoding="utf-8") as f:+ with open("core/data/static/tags.json", "r", encoding="utf-8") as f:tags_data = json.load(f)- with open("source/data/static/platforms.json", "r", encoding="utf-8") as f:+ with open("core/data/static/platforms.json", "r", encoding="utf-8") as f:platforms_data = json.load(f)categories = cat_data.get("categories", [])diff --git a/source/scripts/generation/expanded_contents_generator.py b/core/source/generation/expanded_contents_generator.pysimilarity index 100%rename from source/scripts/generation/expanded_contents_generator.pyrename to core/source/generation/expanded_contents_generator.pydiff --git a/source/scripts/generation/mainheader_generator.py b/core/source/generation/mainheader_generator.pysimilarity index 87%rename from source/scripts/generation/mainheader_generator.pyrename to core/source/generation/mainheader_generator.pyindex 21b64aa..5d851c2 100644--- a/source/scripts/generation/mainheader_generator.py+++ b/core/source/generation/mainheader_generator.py@@ -2,7 +2,7 @@ import json# Generates mainheader with dynamic project countdef generate_mainheader():- with open("source/data/dynamic/applications.json", "r", encoding="utf-8") as f:+ with open("core/data/dynamic/applications.json", "r", encoding="utf-8") as f:data = json.load(f)project_count = len(data.get("applications", []))diff --git a/source/scripts/generation/readme_generator.py b/core/source/generation/readme_generator.pysimilarity index 100%rename from source/scripts/generation/readme_generator.pyrename to core/source/generation/readme_generator.pydiff --git a/source/scripts/generation/tableofcontents_generator.py b/core/source/generation/tableofcontents_generator.pysimilarity index 96%rename from source/scripts/generation/tableofcontents_generator.pyrename to core/source/generation/tableofcontents_generator.pyindex 0b6850c..59ef9c1 100644--- a/source/scripts/generation/tableofcontents_generator.py+++ b/core/source/generation/tableofcontents_generator.py@@ -6,7 +6,7 @@ def slugify(name):def generate_table_of_contents():# Load the categories JSON data- with open("source/data/static/categories.json", "r", encoding="utf-8") as f:+ with open("core/data/static/categories.json", "r", encoding="utf-8") as f:data = json.load(f)categories = data.get("categories", [])subcategories = data.get("subcategories", [])diff --git a/source/scripts/maintenance/json_formatter.py b/core/source/maintenance/json_formatter.pysimilarity index 91%rename from source/scripts/maintenance/json_formatter.pyrename to core/source/maintenance/json_formatter.pyindex 0c6a93d..d541da8 100644--- a/source/scripts/maintenance/json_formatter.py+++ b/core/source/maintenance/json_formatter.py@@ -1,13 +1,13 @@import json-with open("source/data/dynamic/applications.json") as f:+with open("core/data/dynamic/applications.json") as f:applications = json.load(f)["applications"]-with open("source/data/static/categories.json") as f:+with open("core/data/static/categories.json") as f:categories_data = json.load(f)["subcategories"]valid_categories = {c["id"].lower() for c in categories_data}-with open("source/data/static/platforms.json") as f:+with open("core/data/static/platforms.json") as f:platforms_data = json.load(f)["platforms"]valid_platforms = {p["id"].lower() for p in platforms_data}diff --git a/source/scripts/maintenance/stats_updator.py b/core/source/maintenance/stats_updator.pysimilarity index 93%rename from source/scripts/maintenance/stats_updator.pyrename to core/source/maintenance/stats_updator.pyindex a0beb87..938c3b9 100644--- a/source/scripts/maintenance/stats_updator.py+++ b/core/source/maintenance/stats_updator.py@@ -4,7 +4,7 @@ import jsonfrom datetime import datetimeimport os-with open('source/data/dynamic/applications.json', 'r') as f:+with open('core/data/dynamic/applications.json', 'r') as f:data = json.load(f)GITHUB_TOKEN = os.getenv('GITHUB_TOKEN')@@ -57,7 +57,7 @@ def update_application_data(app):for app in data['applications']:app = update_application_data(app)-with open('source/data/dynamic/applications.json', 'w') as f:+with open('core/data/dynamic/applications.json', 'w') as f:json.dump(data, f, indent=4)print("Updated application data successfully!")diff --git a/source/scripts/maintenance/status_checker.py b/core/source/maintenance/status_checker.pysimilarity index 97%rename from source/scripts/maintenance/status_checker.pyrename to core/source/maintenance/status_checker.pyindex 5da3313..1c8b612 100644--- a/source/scripts/maintenance/status_checker.py+++ b/core/source/maintenance/status_checker.py@@ -4,7 +4,7 @@ import jsonfrom datetime import datetime, timedeltaimport os-INPUT_FILE = "source/data/dynamic/applications.json"+INPUT_FILE = "core/data/dynamic/applications.json"OUTPUT_FILE = "resources/maintenance/status_maintenance.md"GITHUB_TOKEN = os.getenv("GITHUB_TOKEN")diff --git a/source/scripts/utils/contributing_autofill.py b/core/source/utils/contributing_autofill.pysimilarity index 99%rename from source/scripts/utils/contributing_autofill.pyrename to core/source/utils/contributing_autofill.pyindex b7e899b..6096e5d 100644--- a/source/scripts/utils/contributing_autofill.py+++ b/core/source/utils/contributing_autofill.py@@ -391,7 +391,7 @@ def main() -> None:parser.add_argument("--applications-file",default=str(APPLICATIONS_FILE),- help="Path to applications.json (default: source/data/dynamic/applications.json).",+ help="Path to applications.json (default: core/data/dynamic/applications.json).",)parser.add_argument("--full-details",diff --git a/source/scripts/utils/json_mod.py b/core/source/utils/json_mod.pysimilarity index 73%rename from source/scripts/utils/json_mod.pyrename to core/source/utils/json_mod.pyindex dabee5b..f26f6bb 100644--- a/source/scripts/utils/json_mod.py+++ b/core/source/utils/json_mod.py@@ -3,7 +3,7 @@ import json"""# Load the JSON data from file-with open("source/data/dynamic/applications.json", "r", encoding="utf-8") as file:+with open("core/data/dynamic/applications.json", "r", encoding="utf-8") as file:data = json.load(file)# Convert all platform entries to lowercase@@ -12,7 +12,7 @@ for app in data.get("applications", []):app["platforms"] = [platform.lower() for platform in app["platforms"]]# Write the modified data back to the file-with open("source/data/dynamic/applications.json", "w", encoding="utf-8") as file:+with open("core/data/dynamic/applications.json", "w", encoding="utf-8") as file:json.dump(data, file, indent=4)print("All platform entries have been converted to lowercase.")@@ -20,7 +20,7 @@ print("All platform entries have been converted to lowercase.")"""# Load the JSON file-with open("source/data/dynamic/applications.json", "r", encoding="utf-8") as file:+with open("core/data/dynamic/applications.json", "r", encoding="utf-8") as file:data = json.load(file)# Add "flags" and "stars" properties to each application@@ -28,14 +28,14 @@ for app in data.get("applications", []):app["homepage_url"] = ""# Save the updated JSON back to the file-with open("source/data/dynamic/applications.json", "w", encoding="utf-8") as file:+with open("core/data/dynamic/applications.json", "w", encoding="utf-8") as file:json.dump(data, file, indent=4, ensure_ascii=False)print("Operation successful: applications.json updated")"""# Load applications.json-with open("source/data/dynamic/applications.json", "r", encoding="utf-8") as f:+with open("core/data/dynamic/applications.json", "r", encoding="utf-8") as f:data = json.load(f)# Platforms to check for@@ -58,5 +58,5 @@ for app in data.get("applications", []):app["tags"] = sorted(tags)# Save the updated file-with open("source/data/dynamic/applications.json", "w", encoding="utf-8") as f:+with open("core/data/dynamic/applications.json", "w", encoding="utf-8") as f:json.dump(data, f, indent=4)diff --git a/source/scripts/utils/md_to_json.py b/core/source/utils/md_to_json.pysimilarity index 100%rename from source/scripts/utils/md_to_json.pyrename to core/source/utils/md_to_json.pydiff --git a/source/testing/test.md b/core/testing/test.mdsimilarity index 100%rename from source/testing/test.mdrename to core/testing/test.mddiff --git a/resources/PORTAL.md b/resources/PORTAL.mdindex a7aa420..9348812 100644--- a/resources/PORTAL.md+++ b/resources/PORTAL.md@@ -15,17 +15,17 @@ The place that connects everything related to definitive-opensource.### Development- [ARCHITECTURE.md](/resources/dev/ARCHITECTURE.md) - Explains the "backend" of the list-- [source/scripts/generation](/source/scripts/generation) - Contains scripts related to README generation-- [source/scripts/maintenance](/source/scripts/maintenance) - Contains scripts related to maintenance+- [core/source/generation](/core/source/generation) - Contains scripts related to README generation+- [core/source/maintenance](/core/source/maintenance) - Contains scripts related to maintenance## Data-- [applications.json](/source/data/dynamic/applications.json) - Stores all information related to applications-- [categories.json](/source/data/static/categories.json) - Declares categories and subcategories-- [tags](/source/data/static/tags.json) - Declares tags, their id, and corresponding emoji+- [applications.json](/core/data/dynamic/applications.json) - Stores all information related to applications+- [categories.json](/core/data/static/categories.json) - Declares categories and subcategories+- [tags](/core/data/static/tags.json) - Declares tags, their id, and corresponding emoji## GitHub Actions-- [generate-readme.yml](/.github/workflows/generate-readme.yml) - Calls the [`readme_generator.py`](/source/scripts/generation/readme_generator.py) to generate READMEs-- [update-stats.yml](/.github/workflows/update-stats.yml) - Calls the [`stats_updator.py`](/source/scripts/maintenance/stats_updator.py.py) to update stats in applications.json+- [generate-readme.yml](/.github/workflows/generate-readme.yml) - Calls the [`readme_generator.py`](/core/source/generation/readme_generator.py) to generate READMEs+- [update-stats.yml](/.github/workflows/update-stats.yml) - Calls the [`stats_updator.py`](/core/source/maintenance/stats_updator.py.py) to update stats in applications.json## Other Resources- [DOCS.md](/resources/DOCS.md) - Elaborates tagsdiff --git a/resources/dev/ARCHITECTURE.md b/resources/dev/ARCHITECTURE.mdindex b911ba1..bd6587b 100644--- a/resources/dev/ARCHITECTURE.md+++ b/resources/dev/ARCHITECTURE.md@@ -3,15 +3,15 @@Here's a look at how the "backend" of the list works.## README Generation-All applications are stored inside [`applications.json`](source/data/dynamic/applications.json). Categories are declared inside [`categories.json`](source/data/static/categories.json). Instead of a nested format with subcategories as on object of it's parent, we've given subcategories a `parent` attribute. There's also a [`tags.json`](source/data/static/tags.json). Instead of putting the emoji inside of the ```tags``` attribute in `applications.json`, the id is used, for example, `commercial` or `disruptive`.. These id's are mapped to their corresponding emoji for when the READMEs are generated and makes``applications.json``` more readable.+All applications are stored inside [`applications.json`](core/data/dynamic/applications.json). Categories are declared inside [`categories.json`](core/data/static/categories.json). Instead of a nested format with subcategories as on object of it's parent, we've given subcategories a `parent` attribute. There's also a [`tags.json`](core/data/static/tags.json). Instead of putting the emoji inside of the ```tags``` attribute in `applications.json`, the id is used, for example, `commercial` or `disruptive`.. These id's are mapped to their corresponding emoji for when the READMEs are generated and makes``applications.json``` more readable.-The generation scripts are inside of the [`source/scripts/generation`](source/scripts/generation) directory. [`mainheader_generator.py`](source/scripts/generation/mainheader_generator.py) generates the very top header with the dynamic project count. Then, depending on the platform being generating, it inserts [`header.md`](source/components/header.md), [`macosheader.md`](source/components/macosheader.md), etc.+The generation scripts are inside of the [`core/source/generation`](core/source/generation) directory. [`mainheader_generator.py`](core/source/generation/mainheader_generator.py) generates the very top header with the dynamic project count. Then, depending on the platform being generating, it inserts [`header.md`](source/components/header.md), [`macosheader.md`](source/components/macosheader.md), etc.-[`tableofcontents_generator.py`](source/scripts/generation/tableofcontents_generator.py) generates the table of contents. It creates one, expandable but hidden by default, with all subsections listed alphabetically. The default TOC shows parent categories alphabetically with subcategories underneath, also alphabetically.+[`tableofcontents_generator.py`](core/source/generation/tableofcontents_generator.py) generates the table of contents. It creates one, expandable but hidden by default, with all subsections listed alphabetically. The default TOC shows parent categories alphabetically with subcategories underneath, also alphabetically.-[`contents_generator.py`](source/scripts/generation/contents_generator.py) generates the actual list.+[`contents_generator.py`](core/source/generation/contents_generator.py) generates the actual list.-Lastly [`readme_generator.py`](source/scripts/generation/readme_generator.py) brings everything together, calling the other scripts to generate one main list, and more for several platforms.+Lastly [`readme_generator.py`](core/source/generation/readme_generator.py) brings everything together, calling the other scripts to generate one main list, and more for several platforms.## Maintenence-[`applications.json`](source/data/dynamic/applications.json) stores a lot of information that the README does not display such as last commit, language, and license. These are for a future web version of the list that would pull data from the json file. [`stats_updator.py`](source/maintenance/stats_updator.py) runs every midnight and updates all application stats. Each application object in the json file also has a `flags` attribute. For example, the `custom-description` flag tells the stats_updator script to skip updating the description for that app. For more into on flags, consult the [`DOCS.md`](resources/DOCS.md)\ No newline at end of file+[`applications.json`](core/data/dynamic/applications.json) stores a lot of information that the README does not display such as last commit, language, and license. These are for a future web version of the list that would pull data from the json file. [`stats_updator.py`](source/maintenance/stats_updator.py) runs every midnight and updates all application stats. Each application object in the json file also has a `flags` attribute. For example, the `custom-description` flag tells the stats_updator script to skip updating the description for that app. For more into on flags, consult the [`DOCS.md`](resources/DOCS.md)\ No newline at end of file