From a2f1d6ad1310903156282b3d2ae320d75c07a67c Mon Sep 17 00:00:00 2001 From: Manabu Nakazawa Date: Sun, 10 Dec 2023 15:36:52 +1000 Subject: [PATCH 01/21] Update library --- docs/_sidebar.md | 2 + docs/add-your-rules-to-library.md | 76 +++++++++++ docs/library/categories.json | 122 ++++++++++++++++++ .../rules/0_example_rule/metadata.json | 14 ++ .../rules}/0_example_rule/rule-set.json | 0 .../metadata.json | 14 ++ .../rule-set.json | 0 .../2_notion-open-in-notion-app/metadata.json | 14 ++ .../2_notion-open-in-notion-app/rule-set.json | 0 .../metadata.json | 14 ++ .../rule-set.json | 0 .../metadata.json | 14 ++ .../rule-set.json | 0 .../5_figma-open-in-figma-app/metadata.json | 14 ++ .../5_figma-open-in-figma-app/rule-set.json | 0 .../metadata.json | 14 ++ .../rule-set.json | 0 .../metadata.json | 14 ++ .../rule-set.json | 0 .../metadata.json | 14 ++ .../rule-set.json | 0 .../metadata.json | 14 ++ .../rule-set.json | 0 docs/scripts/generate-rule-set-list.sh | 2 +- 24 files changed, 341 insertions(+), 1 deletion(-) create mode 100644 docs/add-your-rules-to-library.md create mode 100644 docs/library/categories.json create mode 100644 docs/library/rules/0_example_rule/metadata.json rename docs/{rules-in-library => library/rules}/0_example_rule/rule-set.json (100%) create mode 100644 docs/library/rules/1_google-meet-open-in-chrome/metadata.json rename docs/{rules-in-library => library/rules}/1_google-meet-open-in-chrome/rule-set.json (100%) create mode 100644 docs/library/rules/2_notion-open-in-notion-app/metadata.json rename docs/{rules-in-library => library/rules}/2_notion-open-in-notion-app/rule-set.json (100%) create mode 100644 docs/library/rules/3_wikipedia-open-in-wikiwand/metadata.json rename docs/{rules-in-library => library/rules}/3_wikipedia-open-in-wikiwand/rule-set.json (100%) create mode 100644 docs/library/rules/4_github-hide-whitespace-changes-in-pull-request/metadata.json rename docs/{rules-in-library => library/rules}/4_github-hide-whitespace-changes-in-pull-request/rule-set.json (100%) create mode 100644 docs/library/rules/5_figma-open-in-figma-app/metadata.json rename docs/{rules-in-library => library/rules}/5_figma-open-in-figma-app/rule-set.json (100%) create mode 100644 docs/library/rules/6_redirect-from-google-search-to-youtube/metadata.json rename docs/{rules-in-library => library/rules}/6_redirect-from-google-search-to-youtube/rule-set.json (100%) create mode 100644 docs/library/rules/7_minecraft_fandom_wiki_to_mincraft_wiki/metadata.json rename docs/{rules-in-library => library/rules}/7_minecraft_fandom_wiki_to_mincraft_wiki/rule-set.json (100%) create mode 100644 docs/library/rules/8_twitter_redirect_to_nitter/metadata.json rename docs/{rules-in-library => library/rules}/8_twitter_redirect_to_nitter/rule-set.json (100%) create mode 100644 docs/library/rules/9_terraria_fandom_wiki_to_wiki_gg/metadata.json rename docs/{rules-in-library => library/rules}/9_terraria_fandom_wiki_to_wiki_gg/rule-set.json (100%) diff --git a/docs/_sidebar.md b/docs/_sidebar.md index 9996f29..3c19a6a 100644 --- a/docs/_sidebar.md +++ b/docs/_sidebar.md @@ -2,6 +2,8 @@ - How to Use - [Redirect Rule](redirect-rule) - [Export/Import Rules](export-or-import-rules) +- Library + - [Add Your Rules to Library](add-your-rules-to-library) - Q&A - [FAQ](faq) - [Contact Us](contact-us) diff --git a/docs/add-your-rules-to-library.md b/docs/add-your-rules-to-library.md new file mode 100644 index 0000000..cdab493 --- /dev/null +++ b/docs/add-your-rules-to-library.md @@ -0,0 +1,76 @@ +# Add your rules to Library + +You can share your rules with other users in Library. + +All rules in Library are managed in [docs/library/rules/](https://github.com/mshibanami/redirect-web/tree/main/docs/rules-in-library). You will need to create a pull request to add your rule set. + +All the data of your rule must be in a root folder named `{number}_{snake_cased_title_of_rule_set}`. In this folder, the following files must be located: + +- `rule-set.json` +- `metadata.json` + +## `rule-set.json` + +This is a rule set that contains one or more rules. This is essentially the same with the `redirectweb` file you can get when exporting your rules via the Redirect Web app. +The following json is a sample `rule-set.json` that opens Google Meet link in Google Chrome: + +```json +{ + "bundleID": "io.github.mshibanami.RedirectWebForSafari", + "kind": "RedirectList", + "redirects": [ + { + "appURL": "file:\/\/\/Applications\/Google%20Chrome.app", + "comments": "This is a rule to open Google Meet links in Google Chrome automatically.", + "destinationURLPattern": "$0", + "exampleURLs": [ + "https:\/\/meet.google.com\/xxx-yyyy-zzz" + ], + "kind": "Redirect", + "sourceURLPattern": { + "type": "regularExpression", + "value": "https:\/\/meet.google.com\/[a-z]*-[a-z]*-[a-z]*" + }, + "title": "Google Meet: Open in Chrome" + } + ] +} +``` + +## `metadata.json` + +This includes your rule's metadata. + +```json +{ + "authors": [ + { + "name": "Author Name 1", + "gitHubID": "author-github-id1" + }, + { + "name": "Author Name 2", + "gitHubID": "author-github-id2", + } + ], + "imageURLs": [ + "https://somewhere-on-the-internet.com/path-to-your-rule-set-image" + ], + "aboutURL": "https://somewhere-on-the-internet.com/path-to-the-rule-set-details", + "title": "A title of the rule set", + "description": "A description of the rule set.", + "category": "game" + "version": "1.0.0" +} +``` + +- `authors`: An array of authors. + - `name`: An author name. + - `gitHubID`: A GitHub ID of the author. +- `imageURLs` (optional): An array of image URLs of the rule set. +- `title`: A title of the rule set. +- `description` (optional): A description of the rule set. +- `version`: A version of the rule which consists of `{major}.{minor}.{patch}`. +- `category`: A category of the rule set. + +## Categories diff --git a/docs/library/categories.json b/docs/library/categories.json new file mode 100644 index 0000000..588818e --- /dev/null +++ b/docs/library/categories.json @@ -0,0 +1,122 @@ +[ + { + "id": "social_media", + "name": "Social Media" + }, + { + "id": "search", + "name": "Search" + }, + { + "id": "education", + "name": "Education" + }, + { + "id": "utilities", + "name": "Utilities" + }, + { + "id": "tech_it", + "name": "Tech & IT" + }, + { + "id": "entertainment", + "name": "Entertainment" + }, + { + "id": "shopping", + "name": "Shopping" + }, + { + "id": "health_fitness", + "name": "Health & Fitness" + }, + { + "id": "travel", + "name": "Travel" + }, + { + "id": "news", + "name": "News" + }, + { + "id": "finance", + "name": "Finance" + }, + { + "id": "business", + "name": "Business" + }, + { + "id": "government", + "name": "Government" + }, + { + "id": "science_nature", + "name": "Science & Nature" + }, + { + "id": "arts_crafts", + "name": "Arts & Crafts" + }, + { + "id": "sports", + "name": "Sports" + }, + { + "id": "lifestyle", + "name": "Lifestyle" + }, + { + "id": "legal", + "name": "Legal" + }, + { + "id": "gaming", + "name": "Gaming" + }, + { + "id": "real_estate", + "name": "Real Estate" + }, + { + "id": "transport", + "name": "Transport" + }, + { + "id": "safety_security", + "name": "Safety & Security" + }, + { + "id": "careers", + "name": "Careers" + }, + { + "id": "marketing", + "name": "Marketing" + }, + { + "id": "project_management", + "name": "Project Management" + }, + { + "id": "nonprofits", + "name": "Nonprofits" + }, + { + "id": "medical", + "name": "Medical" + }, + { + "id": "family", + "name": "Family" + }, + { + "id": "food_cooking", + "name": "Food & Cooking" + }, + { + "id": "miscellaneous", + "name": "Other" + } +] diff --git a/docs/library/rules/0_example_rule/metadata.json b/docs/library/rules/0_example_rule/metadata.json new file mode 100644 index 0000000..375deba --- /dev/null +++ b/docs/library/rules/0_example_rule/metadata.json @@ -0,0 +1,14 @@ +{ + "authors": [ + { + "name": "Manabu Nakazawa", + "gitHubID": "mshibanami" + } + ], + "imageURLs": null, + "aboutURL": null, + "title": "Example Rule", + "description": "An example rule", + "version": "1.0.0", + "category": "other" +} diff --git a/docs/rules-in-library/0_example_rule/rule-set.json b/docs/library/rules/0_example_rule/rule-set.json similarity index 100% rename from docs/rules-in-library/0_example_rule/rule-set.json rename to docs/library/rules/0_example_rule/rule-set.json diff --git a/docs/library/rules/1_google-meet-open-in-chrome/metadata.json b/docs/library/rules/1_google-meet-open-in-chrome/metadata.json new file mode 100644 index 0000000..325b70a --- /dev/null +++ b/docs/library/rules/1_google-meet-open-in-chrome/metadata.json @@ -0,0 +1,14 @@ +{ + "authors": [ + { + "name": "Manabu Nakazawa", + "gitHubID": "mshibanami" + } + ], + "imageURLs": null, + "aboutURL": null, + "title": "Example Rule", + "description": "An example rule", + "version": "1.0.0", + "category": "utilities" +} diff --git a/docs/rules-in-library/1_google-meet-open-in-chrome/rule-set.json b/docs/library/rules/1_google-meet-open-in-chrome/rule-set.json similarity index 100% rename from docs/rules-in-library/1_google-meet-open-in-chrome/rule-set.json rename to docs/library/rules/1_google-meet-open-in-chrome/rule-set.json diff --git a/docs/library/rules/2_notion-open-in-notion-app/metadata.json b/docs/library/rules/2_notion-open-in-notion-app/metadata.json new file mode 100644 index 0000000..325b70a --- /dev/null +++ b/docs/library/rules/2_notion-open-in-notion-app/metadata.json @@ -0,0 +1,14 @@ +{ + "authors": [ + { + "name": "Manabu Nakazawa", + "gitHubID": "mshibanami" + } + ], + "imageURLs": null, + "aboutURL": null, + "title": "Example Rule", + "description": "An example rule", + "version": "1.0.0", + "category": "utilities" +} diff --git a/docs/rules-in-library/2_notion-open-in-notion-app/rule-set.json b/docs/library/rules/2_notion-open-in-notion-app/rule-set.json similarity index 100% rename from docs/rules-in-library/2_notion-open-in-notion-app/rule-set.json rename to docs/library/rules/2_notion-open-in-notion-app/rule-set.json diff --git a/docs/library/rules/3_wikipedia-open-in-wikiwand/metadata.json b/docs/library/rules/3_wikipedia-open-in-wikiwand/metadata.json new file mode 100644 index 0000000..5e85db8 --- /dev/null +++ b/docs/library/rules/3_wikipedia-open-in-wikiwand/metadata.json @@ -0,0 +1,14 @@ +{ + "authors": [ + { + "name": "Manabu Nakazawa", + "gitHubID": "mshibanami" + } + ], + "imageURLs": null, + "aboutURL": null, + "title": "Example Rule", + "description": "An example rule", + "version": "1.0.0", + "category": "education" +} diff --git a/docs/rules-in-library/3_wikipedia-open-in-wikiwand/rule-set.json b/docs/library/rules/3_wikipedia-open-in-wikiwand/rule-set.json similarity index 100% rename from docs/rules-in-library/3_wikipedia-open-in-wikiwand/rule-set.json rename to docs/library/rules/3_wikipedia-open-in-wikiwand/rule-set.json diff --git a/docs/library/rules/4_github-hide-whitespace-changes-in-pull-request/metadata.json b/docs/library/rules/4_github-hide-whitespace-changes-in-pull-request/metadata.json new file mode 100644 index 0000000..27349d3 --- /dev/null +++ b/docs/library/rules/4_github-hide-whitespace-changes-in-pull-request/metadata.json @@ -0,0 +1,14 @@ +{ + "authors": [ + { + "name": "Manabu Nakazawa", + "gitHubID": "mshibanami" + } + ], + "imageURLs": null, + "aboutURL": null, + "title": "Example Rule", + "description": "An example rule", + "version": "1.0.0", + "category": "tech_it" +} diff --git a/docs/rules-in-library/4_github-hide-whitespace-changes-in-pull-request/rule-set.json b/docs/library/rules/4_github-hide-whitespace-changes-in-pull-request/rule-set.json similarity index 100% rename from docs/rules-in-library/4_github-hide-whitespace-changes-in-pull-request/rule-set.json rename to docs/library/rules/4_github-hide-whitespace-changes-in-pull-request/rule-set.json diff --git a/docs/library/rules/5_figma-open-in-figma-app/metadata.json b/docs/library/rules/5_figma-open-in-figma-app/metadata.json new file mode 100644 index 0000000..d8f1fb6 --- /dev/null +++ b/docs/library/rules/5_figma-open-in-figma-app/metadata.json @@ -0,0 +1,14 @@ +{ + "authors": [ + { + "name": "Manabu Nakazawa", + "gitHubID": "mshibanami" + } + ], + "imageURLs": null, + "aboutURL": null, + "title": "Example Rule", + "description": "An example rule", + "version": "1.0.0", + "category": "arts_crafts" +} diff --git a/docs/rules-in-library/5_figma-open-in-figma-app/rule-set.json b/docs/library/rules/5_figma-open-in-figma-app/rule-set.json similarity index 100% rename from docs/rules-in-library/5_figma-open-in-figma-app/rule-set.json rename to docs/library/rules/5_figma-open-in-figma-app/rule-set.json diff --git a/docs/library/rules/6_redirect-from-google-search-to-youtube/metadata.json b/docs/library/rules/6_redirect-from-google-search-to-youtube/metadata.json new file mode 100644 index 0000000..c95a0b7 --- /dev/null +++ b/docs/library/rules/6_redirect-from-google-search-to-youtube/metadata.json @@ -0,0 +1,14 @@ +{ + "authors": [ + { + "name": "Manabu Nakazawa", + "gitHubID": "mshibanami" + } + ], + "imageURLs": null, + "aboutURL": null, + "title": "Example Rule", + "description": "An example rule", + "version": "1.0.0", + "category": "search" +} diff --git a/docs/rules-in-library/6_redirect-from-google-search-to-youtube/rule-set.json b/docs/library/rules/6_redirect-from-google-search-to-youtube/rule-set.json similarity index 100% rename from docs/rules-in-library/6_redirect-from-google-search-to-youtube/rule-set.json rename to docs/library/rules/6_redirect-from-google-search-to-youtube/rule-set.json diff --git a/docs/library/rules/7_minecraft_fandom_wiki_to_mincraft_wiki/metadata.json b/docs/library/rules/7_minecraft_fandom_wiki_to_mincraft_wiki/metadata.json new file mode 100644 index 0000000..14ac8ca --- /dev/null +++ b/docs/library/rules/7_minecraft_fandom_wiki_to_mincraft_wiki/metadata.json @@ -0,0 +1,14 @@ +{ + "authors": [ + { + "name": "Manabu Nakazawa", + "gitHubID": "mshibanami" + } + ], + "imageURLs": null, + "aboutURL": null, + "title": "Example Rule", + "description": "An example rule", + "version": "1.0.0", + "category": "gaming" +} diff --git a/docs/rules-in-library/7_minecraft_fandom_wiki_to_mincraft_wiki/rule-set.json b/docs/library/rules/7_minecraft_fandom_wiki_to_mincraft_wiki/rule-set.json similarity index 100% rename from docs/rules-in-library/7_minecraft_fandom_wiki_to_mincraft_wiki/rule-set.json rename to docs/library/rules/7_minecraft_fandom_wiki_to_mincraft_wiki/rule-set.json diff --git a/docs/library/rules/8_twitter_redirect_to_nitter/metadata.json b/docs/library/rules/8_twitter_redirect_to_nitter/metadata.json new file mode 100644 index 0000000..1318093 --- /dev/null +++ b/docs/library/rules/8_twitter_redirect_to_nitter/metadata.json @@ -0,0 +1,14 @@ +{ + "authors": [ + { + "name": "Manabu Nakazawa", + "gitHubID": "mshibanami" + } + ], + "imageURLs": null, + "aboutURL": null, + "title": "Example Rule", + "description": "An example rule", + "version": "1.0.0", + "category": "social_media" +} diff --git a/docs/rules-in-library/8_twitter_redirect_to_nitter/rule-set.json b/docs/library/rules/8_twitter_redirect_to_nitter/rule-set.json similarity index 100% rename from docs/rules-in-library/8_twitter_redirect_to_nitter/rule-set.json rename to docs/library/rules/8_twitter_redirect_to_nitter/rule-set.json diff --git a/docs/library/rules/9_terraria_fandom_wiki_to_wiki_gg/metadata.json b/docs/library/rules/9_terraria_fandom_wiki_to_wiki_gg/metadata.json new file mode 100644 index 0000000..14ac8ca --- /dev/null +++ b/docs/library/rules/9_terraria_fandom_wiki_to_wiki_gg/metadata.json @@ -0,0 +1,14 @@ +{ + "authors": [ + { + "name": "Manabu Nakazawa", + "gitHubID": "mshibanami" + } + ], + "imageURLs": null, + "aboutURL": null, + "title": "Example Rule", + "description": "An example rule", + "version": "1.0.0", + "category": "gaming" +} diff --git a/docs/rules-in-library/9_terraria_fandom_wiki_to_wiki_gg/rule-set.json b/docs/library/rules/9_terraria_fandom_wiki_to_wiki_gg/rule-set.json similarity index 100% rename from docs/rules-in-library/9_terraria_fandom_wiki_to_wiki_gg/rule-set.json rename to docs/library/rules/9_terraria_fandom_wiki_to_wiki_gg/rule-set.json diff --git a/docs/scripts/generate-rule-set-list.sh b/docs/scripts/generate-rule-set-list.sh index 7a29999..2b6b578 100755 --- a/docs/scripts/generate-rule-set-list.sh +++ b/docs/scripts/generate-rule-set-list.sh @@ -8,7 +8,7 @@ supported_json_files=( ) combined='[]' -for dir in ../rules-in-library/*; do +for dir in ../library/rules/*; do if [ -d "$dir" ]; then id=$(basename "$dir" | cut -d'_' -f1) From b5e7efd77cce8a3062c26c6d04ce40a2706174ac Mon Sep 17 00:00:00 2001 From: Manabu Nakazawa Date: Mon, 11 Dec 2023 09:33:33 +1000 Subject: [PATCH 02/21] supporting metadata --- docs/scripts/generate-rule-set-list.sh | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/docs/scripts/generate-rule-set-list.sh b/docs/scripts/generate-rule-set-list.sh index 2b6b578..27a9499 100755 --- a/docs/scripts/generate-rule-set-list.sh +++ b/docs/scripts/generate-rule-set-list.sh @@ -2,7 +2,7 @@ cd "$(dirname "${BASH_SOURCE:-$0}")" -supported_json_files=( +supported_rule_set_files=( "rule-set.json" "rule-set.redirectweb" ) @@ -17,23 +17,24 @@ for dir in ../library/rules/*; do exit 1 fi - json_file="" - for file in "${supported_json_files[@]}"; do + rule_set_file="" + for file in "${supported_rule_set_files[@]}"; do if [ -f "$dir/$file" ]; then - json_file="$dir/$file" + rule_set_file="$dir/$file" break fi done + metadata_file="$dir/metadata.json" - if [ -n "$json_file" ]; then - processed_json=$(jq --argjson id "$id" '{id: $id|tonumber, redirectList: .}' "$json_file") - combined=$(echo "$combined" | jq --argjson newElement "$processed_json" '. += [$newElement]') + if [ -n "$rule_set_file" ]; then + processed_rule_set=$(jq --argjson id "$id" '{id: $id|tonumber, redirectList: ., metadata: .}' "$rule_set_file" "$metadata_file") + combined=$(echo "$combined" | jq --argjson newElement "$processed_rule_set" '. += [$newElement]') fi fi done wrapped=$(echo "$combined" | jq '{ "ruleSets": . }') -output_dir="../generated/rule-set/" +output_dir="../generated/rule-sets/" mkdir -p $output_dir echo "$wrapped" > $output_dir/list.json -echo "✅ Created list.json" +echo "✅ Created list.json at $output_dir/list.json" From cb2eb3f42356c52c5cec2a8aa60411f01f3bd19c Mon Sep 17 00:00:00 2001 From: Manabu Nakazawa Date: Mon, 11 Dec 2023 19:30:04 +1000 Subject: [PATCH 03/21] update metadata --- docs/library/rules/0_example_rule/metadata.json | 4 ++-- docs/library/rules/1_google-meet-open-in-chrome/metadata.json | 4 ++-- docs/library/rules/2_notion-open-in-notion-app/metadata.json | 4 ++-- docs/library/rules/3_wikipedia-open-in-wikiwand/metadata.json | 4 ++-- .../metadata.json | 4 ++-- docs/library/rules/5_figma-open-in-figma-app/metadata.json | 4 ++-- docs/library/rules/5_figma-open-in-figma-app/rule-set.json | 2 +- .../6_redirect-from-google-search-to-youtube/metadata.json | 4 ++-- .../7_minecraft_fandom_wiki_to_mincraft_wiki/metadata.json | 4 ++-- docs/library/rules/8_twitter_redirect_to_nitter/metadata.json | 4 ++-- .../rules/9_terraria_fandom_wiki_to_wiki_gg/metadata.json | 4 ++-- 11 files changed, 21 insertions(+), 21 deletions(-) diff --git a/docs/library/rules/0_example_rule/metadata.json b/docs/library/rules/0_example_rule/metadata.json index 375deba..d7c2eac 100644 --- a/docs/library/rules/0_example_rule/metadata.json +++ b/docs/library/rules/0_example_rule/metadata.json @@ -7,8 +7,8 @@ ], "imageURLs": null, "aboutURL": null, - "title": "Example Rule", - "description": "An example rule", + "title": "Example Redirect Rule", + "description": "An example rule.", "version": "1.0.0", "category": "other" } diff --git a/docs/library/rules/1_google-meet-open-in-chrome/metadata.json b/docs/library/rules/1_google-meet-open-in-chrome/metadata.json index 325b70a..ba9c878 100644 --- a/docs/library/rules/1_google-meet-open-in-chrome/metadata.json +++ b/docs/library/rules/1_google-meet-open-in-chrome/metadata.json @@ -7,8 +7,8 @@ ], "imageURLs": null, "aboutURL": null, - "title": "Example Rule", - "description": "An example rule", + "title": "Google Meet: Open in Chrome", + "description": "A rule to open Google Meet links in Google Chrome automatically.", "version": "1.0.0", "category": "utilities" } diff --git a/docs/library/rules/2_notion-open-in-notion-app/metadata.json b/docs/library/rules/2_notion-open-in-notion-app/metadata.json index 325b70a..fb3799b 100644 --- a/docs/library/rules/2_notion-open-in-notion-app/metadata.json +++ b/docs/library/rules/2_notion-open-in-notion-app/metadata.json @@ -7,8 +7,8 @@ ], "imageURLs": null, "aboutURL": null, - "title": "Example Rule", - "description": "An example rule", + "title": "Notion: Open in Notion App", + "description": "A rule to open Notion links in the Notion app automatically.", "version": "1.0.0", "category": "utilities" } diff --git a/docs/library/rules/3_wikipedia-open-in-wikiwand/metadata.json b/docs/library/rules/3_wikipedia-open-in-wikiwand/metadata.json index 5e85db8..99088eb 100644 --- a/docs/library/rules/3_wikipedia-open-in-wikiwand/metadata.json +++ b/docs/library/rules/3_wikipedia-open-in-wikiwand/metadata.json @@ -7,8 +7,8 @@ ], "imageURLs": null, "aboutURL": null, - "title": "Example Rule", - "description": "An example rule", + "title": "Wikipedia: Open in Wikiwand", + "description": "Open Wikipedia pages in Wikiwand automatically.", "version": "1.0.0", "category": "education" } diff --git a/docs/library/rules/4_github-hide-whitespace-changes-in-pull-request/metadata.json b/docs/library/rules/4_github-hide-whitespace-changes-in-pull-request/metadata.json index 27349d3..8e888fb 100644 --- a/docs/library/rules/4_github-hide-whitespace-changes-in-pull-request/metadata.json +++ b/docs/library/rules/4_github-hide-whitespace-changes-in-pull-request/metadata.json @@ -7,8 +7,8 @@ ], "imageURLs": null, "aboutURL": null, - "title": "Example Rule", - "description": "An example rule", + "title": "GitHub: Ignore Whitespace Changes in a Pull Request", + "description": "This hides whitespace changes in a pull request on GitHub automatically.", "version": "1.0.0", "category": "tech_it" } diff --git a/docs/library/rules/5_figma-open-in-figma-app/metadata.json b/docs/library/rules/5_figma-open-in-figma-app/metadata.json index d8f1fb6..3c3f006 100644 --- a/docs/library/rules/5_figma-open-in-figma-app/metadata.json +++ b/docs/library/rules/5_figma-open-in-figma-app/metadata.json @@ -7,8 +7,8 @@ ], "imageURLs": null, "aboutURL": null, - "title": "Example Rule", - "description": "An example rule", + "title": "Figma: Open in Figma App", + "description": "Open Figma links in the Figma app automatically.", "version": "1.0.0", "category": "arts_crafts" } diff --git a/docs/library/rules/5_figma-open-in-figma-app/rule-set.json b/docs/library/rules/5_figma-open-in-figma-app/rule-set.json index 4e8a68b..179fc16 100644 --- a/docs/library/rules/5_figma-open-in-figma-app/rule-set.json +++ b/docs/library/rules/5_figma-open-in-figma-app/rule-set.json @@ -4,7 +4,7 @@ "redirects": [ { "appURL": "file:\/\/\/Applications\/Figma.app", - "comments": "", + "comments": "This is a rule to open Figma links in the Figma app automatically.", "destinationURLPattern": "figma:\/\/$1", "exampleURLs": [ "https:\/\/www.figma.com\/file\/XZp2hMcv4s3gmqKtXg4uupfX\/Personal-Colors?node-id=2%3A22" diff --git a/docs/library/rules/6_redirect-from-google-search-to-youtube/metadata.json b/docs/library/rules/6_redirect-from-google-search-to-youtube/metadata.json index c95a0b7..6e2be7e 100644 --- a/docs/library/rules/6_redirect-from-google-search-to-youtube/metadata.json +++ b/docs/library/rules/6_redirect-from-google-search-to-youtube/metadata.json @@ -7,8 +7,8 @@ ], "imageURLs": null, "aboutURL": null, - "title": "Example Rule", - "description": "An example rule", + "title": "Google Search: From Video Tab to YouTube's Search Results", + "description": "This redirects from the Videos tab on Google Search to the search results on YouTube automatically.", "version": "1.0.0", "category": "search" } diff --git a/docs/library/rules/7_minecraft_fandom_wiki_to_mincraft_wiki/metadata.json b/docs/library/rules/7_minecraft_fandom_wiki_to_mincraft_wiki/metadata.json index 14ac8ca..169e62e 100644 --- a/docs/library/rules/7_minecraft_fandom_wiki_to_mincraft_wiki/metadata.json +++ b/docs/library/rules/7_minecraft_fandom_wiki_to_mincraft_wiki/metadata.json @@ -7,8 +7,8 @@ ], "imageURLs": null, "aboutURL": null, - "title": "Example Rule", - "description": "An example rule", + "title": "Minecraft Wiki: From Fandom to minecraft.wiki", + "description": "This redirects from Minecraft Wiki on Fandom to the new domain at minecraft.wiki.", "version": "1.0.0", "category": "gaming" } diff --git a/docs/library/rules/8_twitter_redirect_to_nitter/metadata.json b/docs/library/rules/8_twitter_redirect_to_nitter/metadata.json index 1318093..303bd82 100644 --- a/docs/library/rules/8_twitter_redirect_to_nitter/metadata.json +++ b/docs/library/rules/8_twitter_redirect_to_nitter/metadata.json @@ -7,8 +7,8 @@ ], "imageURLs": null, "aboutURL": null, - "title": "Example Rule", - "description": "An example rule", + "title": "Twitter: Redirect to Nitter", + "description": "This redirects users from twitter.com to nitter.com", "version": "1.0.0", "category": "social_media" } diff --git a/docs/library/rules/9_terraria_fandom_wiki_to_wiki_gg/metadata.json b/docs/library/rules/9_terraria_fandom_wiki_to_wiki_gg/metadata.json index 14ac8ca..780fdd6 100644 --- a/docs/library/rules/9_terraria_fandom_wiki_to_wiki_gg/metadata.json +++ b/docs/library/rules/9_terraria_fandom_wiki_to_wiki_gg/metadata.json @@ -7,8 +7,8 @@ ], "imageURLs": null, "aboutURL": null, - "title": "Example Rule", - "description": "An example rule", + "title": "Terraria Wiki: From Fandom to wiki.gg", + "description": "This redirects from Terraria Wiki on Fandom to the new domain at wiki.gg.", "version": "1.0.0", "category": "gaming" } From d49efbf4bf012a9dbf0c97276963567c7edee6b5 Mon Sep 17 00:00:00 2001 From: Manabu Nakazawa Date: Mon, 11 Dec 2023 19:30:25 +1000 Subject: [PATCH 04/21] Output the list.json properly --- docs/scripts/generate-rule-set-list.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/scripts/generate-rule-set-list.sh b/docs/scripts/generate-rule-set-list.sh index 27a9499..914e7a8 100755 --- a/docs/scripts/generate-rule-set-list.sh +++ b/docs/scripts/generate-rule-set-list.sh @@ -17,6 +17,7 @@ for dir in ../library/rules/*; do exit 1 fi + metadata_file="$dir/metadata.json" rule_set_file="" for file in "${supported_rule_set_files[@]}"; do if [ -f "$dir/$file" ]; then @@ -24,17 +25,16 @@ for dir in ../library/rules/*; do break fi done - metadata_file="$dir/metadata.json" if [ -n "$rule_set_file" ]; then - processed_rule_set=$(jq --argjson id "$id" '{id: $id|tonumber, redirectList: ., metadata: .}' "$rule_set_file" "$metadata_file") + processed_rule_set=$(jq --argjson id "$id" -s '{id: $id, ruleSet: .[0], metadata: .[1]}' "$rule_set_file" "$metadata_file") combined=$(echo "$combined" | jq --argjson newElement "$processed_rule_set" '. += [$newElement]') fi fi done wrapped=$(echo "$combined" | jq '{ "ruleSets": . }') -output_dir="../generated/rule-sets/" +output_dir="../generated/rule-sets" mkdir -p $output_dir echo "$wrapped" > $output_dir/list.json echo "✅ Created list.json at $output_dir/list.json" From e3b517372c54a0858ce5fb27319d83417e93475a Mon Sep 17 00:00:00 2001 From: Manabu Nakazawa Date: Mon, 11 Dec 2023 19:46:31 +1000 Subject: [PATCH 05/21] nit --- docs/library/categories.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/library/categories.json b/docs/library/categories.json index 588818e..d6914c5 100644 --- a/docs/library/categories.json +++ b/docs/library/categories.json @@ -116,7 +116,7 @@ "name": "Food & Cooking" }, { - "id": "miscellaneous", + "id": "other", "name": "Other" } ] From 3d14737e8573a458534ac15c45d807de0c47dde8 Mon Sep 17 00:00:00 2001 From: Manabu Nakazawa Date: Tue, 12 Dec 2023 18:34:38 +1000 Subject: [PATCH 06/21] empty commit From c14235c92d1eebcecb3218a8b3908dc59a4dacea Mon Sep 17 00:00:00 2001 From: Manabu Nakazawa Date: Tue, 12 Dec 2023 18:42:09 +1000 Subject: [PATCH 07/21] empty commit From 03eb0d48076071884f0113605be08edaede247a3 Mon Sep 17 00:00:00 2001 From: Manabu Nakazawa Date: Tue, 12 Dec 2023 18:47:30 +1000 Subject: [PATCH 08/21] empty commit From c9a727b01037a6ee7f8c598baa5a2f733d52c36f Mon Sep 17 00:00:00 2001 From: Manabu Nakazawa Date: Tue, 12 Dec 2023 18:58:39 +1000 Subject: [PATCH 09/21] Add build.sh (for Netlify) --- build.sh | 5 +++++ 1 file changed, 5 insertions(+) create mode 100755 build.sh diff --git a/build.sh b/build.sh new file mode 100755 index 0000000..fc688d7 --- /dev/null +++ b/build.sh @@ -0,0 +1,5 @@ +#!/bin/bash + +cd "$(dirname "${BASH_SOURCE:-$0}")" + +./docs/scripts/generate-rule-set-list.sh From 3f02610410f7b492a1b9bdbe7c1f490d71239779 Mon Sep 17 00:00:00 2001 From: Manabu Nakazawa Date: Tue, 12 Dec 2023 18:59:34 +1000 Subject: [PATCH 10/21] empty commit From 21ca696a4791fb3725e80bf76a22d1b99316bec1 Mon Sep 17 00:00:00 2001 From: Manabu Nakazawa Date: Tue, 12 Dec 2023 19:31:12 +1000 Subject: [PATCH 11/21] Specify the output folder explicitly for netlify --- .gitignore | 1 + build.sh | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/.gitignore b/.gitignore index 9ab870d..7398339 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ generated/ +output/ diff --git a/build.sh b/build.sh index fc688d7..e420c47 100755 --- a/build.sh +++ b/build.sh @@ -3,3 +3,7 @@ cd "$(dirname "${BASH_SOURCE:-$0}")" ./docs/scripts/generate-rule-set-list.sh + +rm -rf output +mkdir -p output/redirect-web +cp -R docs/* output/redirect-web From c8132334bebc14e8cf75fc53fa14fc50a4896118 Mon Sep 17 00:00:00 2001 From: Manabu Nakazawa Date: Sun, 4 Feb 2024 14:24:52 +1000 Subject: [PATCH 12/21] Wrap category array with a json object --- docs/library/categories.json | 246 ++++++++++++++++++----------------- 1 file changed, 124 insertions(+), 122 deletions(-) diff --git a/docs/library/categories.json b/docs/library/categories.json index d6914c5..5c2e2a2 100644 --- a/docs/library/categories.json +++ b/docs/library/categories.json @@ -1,122 +1,124 @@ -[ - { - "id": "social_media", - "name": "Social Media" - }, - { - "id": "search", - "name": "Search" - }, - { - "id": "education", - "name": "Education" - }, - { - "id": "utilities", - "name": "Utilities" - }, - { - "id": "tech_it", - "name": "Tech & IT" - }, - { - "id": "entertainment", - "name": "Entertainment" - }, - { - "id": "shopping", - "name": "Shopping" - }, - { - "id": "health_fitness", - "name": "Health & Fitness" - }, - { - "id": "travel", - "name": "Travel" - }, - { - "id": "news", - "name": "News" - }, - { - "id": "finance", - "name": "Finance" - }, - { - "id": "business", - "name": "Business" - }, - { - "id": "government", - "name": "Government" - }, - { - "id": "science_nature", - "name": "Science & Nature" - }, - { - "id": "arts_crafts", - "name": "Arts & Crafts" - }, - { - "id": "sports", - "name": "Sports" - }, - { - "id": "lifestyle", - "name": "Lifestyle" - }, - { - "id": "legal", - "name": "Legal" - }, - { - "id": "gaming", - "name": "Gaming" - }, - { - "id": "real_estate", - "name": "Real Estate" - }, - { - "id": "transport", - "name": "Transport" - }, - { - "id": "safety_security", - "name": "Safety & Security" - }, - { - "id": "careers", - "name": "Careers" - }, - { - "id": "marketing", - "name": "Marketing" - }, - { - "id": "project_management", - "name": "Project Management" - }, - { - "id": "nonprofits", - "name": "Nonprofits" - }, - { - "id": "medical", - "name": "Medical" - }, - { - "id": "family", - "name": "Family" - }, - { - "id": "food_cooking", - "name": "Food & Cooking" - }, - { - "id": "other", - "name": "Other" - } -] +{ + "categories": [ + { + "id": "social_media", + "name": "Social Media" + }, + { + "id": "search", + "name": "Search" + }, + { + "id": "education", + "name": "Education" + }, + { + "id": "utilities", + "name": "Utilities" + }, + { + "id": "tech_it", + "name": "Tech & IT" + }, + { + "id": "entertainment", + "name": "Entertainment" + }, + { + "id": "shopping", + "name": "Shopping" + }, + { + "id": "health_fitness", + "name": "Health & Fitness" + }, + { + "id": "travel", + "name": "Travel" + }, + { + "id": "news", + "name": "News" + }, + { + "id": "finance", + "name": "Finance" + }, + { + "id": "business", + "name": "Business" + }, + { + "id": "government", + "name": "Government" + }, + { + "id": "science_nature", + "name": "Science & Nature" + }, + { + "id": "arts_crafts", + "name": "Arts & Crafts" + }, + { + "id": "sports", + "name": "Sports" + }, + { + "id": "lifestyle", + "name": "Lifestyle" + }, + { + "id": "legal", + "name": "Legal" + }, + { + "id": "gaming", + "name": "Gaming" + }, + { + "id": "real_estate", + "name": "Real Estate" + }, + { + "id": "transport", + "name": "Transport" + }, + { + "id": "safety_security", + "name": "Safety & Security" + }, + { + "id": "careers", + "name": "Careers" + }, + { + "id": "marketing", + "name": "Marketing" + }, + { + "id": "project_management", + "name": "Project Management" + }, + { + "id": "nonprofits", + "name": "Nonprofits" + }, + { + "id": "medical", + "name": "Medical" + }, + { + "id": "family", + "name": "Family" + }, + { + "id": "food_cooking", + "name": "Food & Cooking" + }, + { + "id": "other", + "name": "Other" + } + ] +} From da2af8fa4f7fd83f890d92b48291913709937ac3 Mon Sep 17 00:00:00 2001 From: Manabu Nakazawa Date: Sun, 4 Feb 2024 14:52:07 +1000 Subject: [PATCH 13/21] category -> category ID --- docs/add-your-rules-to-library.md | 4 ++-- docs/library/rules/0_example_rule/metadata.json | 2 +- docs/library/rules/1_google-meet-open-in-chrome/metadata.json | 2 +- docs/library/rules/2_notion-open-in-notion-app/metadata.json | 2 +- docs/library/rules/3_wikipedia-open-in-wikiwand/metadata.json | 2 +- .../metadata.json | 2 +- docs/library/rules/5_figma-open-in-figma-app/metadata.json | 2 +- .../6_redirect-from-google-search-to-youtube/metadata.json | 2 +- .../7_minecraft_fandom_wiki_to_mincraft_wiki/metadata.json | 2 +- .../rules/9_terraria_fandom_wiki_to_wiki_gg/metadata.json | 2 +- 10 files changed, 11 insertions(+), 11 deletions(-) diff --git a/docs/add-your-rules-to-library.md b/docs/add-your-rules-to-library.md index cdab493..5b44bb1 100644 --- a/docs/add-your-rules-to-library.md +++ b/docs/add-your-rules-to-library.md @@ -59,7 +59,7 @@ This includes your rule's metadata. "aboutURL": "https://somewhere-on-the-internet.com/path-to-the-rule-set-details", "title": "A title of the rule set", "description": "A description of the rule set.", - "category": "game" + "categoryID": "game" "version": "1.0.0" } ``` @@ -71,6 +71,6 @@ This includes your rule's metadata. - `title`: A title of the rule set. - `description` (optional): A description of the rule set. - `version`: A version of the rule which consists of `{major}.{minor}.{patch}`. -- `category`: A category of the rule set. +- `categoryID`: A category ID of the rule set. ## Categories diff --git a/docs/library/rules/0_example_rule/metadata.json b/docs/library/rules/0_example_rule/metadata.json index d7c2eac..8dcf0aa 100644 --- a/docs/library/rules/0_example_rule/metadata.json +++ b/docs/library/rules/0_example_rule/metadata.json @@ -10,5 +10,5 @@ "title": "Example Redirect Rule", "description": "An example rule.", "version": "1.0.0", - "category": "other" + "categoryID": "other" } diff --git a/docs/library/rules/1_google-meet-open-in-chrome/metadata.json b/docs/library/rules/1_google-meet-open-in-chrome/metadata.json index ba9c878..6c3a00c 100644 --- a/docs/library/rules/1_google-meet-open-in-chrome/metadata.json +++ b/docs/library/rules/1_google-meet-open-in-chrome/metadata.json @@ -10,5 +10,5 @@ "title": "Google Meet: Open in Chrome", "description": "A rule to open Google Meet links in Google Chrome automatically.", "version": "1.0.0", - "category": "utilities" + "categoryID": "utilities" } diff --git a/docs/library/rules/2_notion-open-in-notion-app/metadata.json b/docs/library/rules/2_notion-open-in-notion-app/metadata.json index fb3799b..5969ffc 100644 --- a/docs/library/rules/2_notion-open-in-notion-app/metadata.json +++ b/docs/library/rules/2_notion-open-in-notion-app/metadata.json @@ -10,5 +10,5 @@ "title": "Notion: Open in Notion App", "description": "A rule to open Notion links in the Notion app automatically.", "version": "1.0.0", - "category": "utilities" + "categoryID": "utilities" } diff --git a/docs/library/rules/3_wikipedia-open-in-wikiwand/metadata.json b/docs/library/rules/3_wikipedia-open-in-wikiwand/metadata.json index 99088eb..cfd2b04 100644 --- a/docs/library/rules/3_wikipedia-open-in-wikiwand/metadata.json +++ b/docs/library/rules/3_wikipedia-open-in-wikiwand/metadata.json @@ -10,5 +10,5 @@ "title": "Wikipedia: Open in Wikiwand", "description": "Open Wikipedia pages in Wikiwand automatically.", "version": "1.0.0", - "category": "education" + "categoryID": "education" } diff --git a/docs/library/rules/4_github-hide-whitespace-changes-in-pull-request/metadata.json b/docs/library/rules/4_github-hide-whitespace-changes-in-pull-request/metadata.json index 8e888fb..6cc4d1d 100644 --- a/docs/library/rules/4_github-hide-whitespace-changes-in-pull-request/metadata.json +++ b/docs/library/rules/4_github-hide-whitespace-changes-in-pull-request/metadata.json @@ -10,5 +10,5 @@ "title": "GitHub: Ignore Whitespace Changes in a Pull Request", "description": "This hides whitespace changes in a pull request on GitHub automatically.", "version": "1.0.0", - "category": "tech_it" + "categoryID": "tech_it" } diff --git a/docs/library/rules/5_figma-open-in-figma-app/metadata.json b/docs/library/rules/5_figma-open-in-figma-app/metadata.json index 3c3f006..c6fdc36 100644 --- a/docs/library/rules/5_figma-open-in-figma-app/metadata.json +++ b/docs/library/rules/5_figma-open-in-figma-app/metadata.json @@ -10,5 +10,5 @@ "title": "Figma: Open in Figma App", "description": "Open Figma links in the Figma app automatically.", "version": "1.0.0", - "category": "arts_crafts" + "categoryID": "arts_crafts" } diff --git a/docs/library/rules/6_redirect-from-google-search-to-youtube/metadata.json b/docs/library/rules/6_redirect-from-google-search-to-youtube/metadata.json index 6e2be7e..af4ea16 100644 --- a/docs/library/rules/6_redirect-from-google-search-to-youtube/metadata.json +++ b/docs/library/rules/6_redirect-from-google-search-to-youtube/metadata.json @@ -10,5 +10,5 @@ "title": "Google Search: From Video Tab to YouTube's Search Results", "description": "This redirects from the Videos tab on Google Search to the search results on YouTube automatically.", "version": "1.0.0", - "category": "search" + "categoryID": "search" } diff --git a/docs/library/rules/7_minecraft_fandom_wiki_to_mincraft_wiki/metadata.json b/docs/library/rules/7_minecraft_fandom_wiki_to_mincraft_wiki/metadata.json index 169e62e..e0a6c4b 100644 --- a/docs/library/rules/7_minecraft_fandom_wiki_to_mincraft_wiki/metadata.json +++ b/docs/library/rules/7_minecraft_fandom_wiki_to_mincraft_wiki/metadata.json @@ -10,5 +10,5 @@ "title": "Minecraft Wiki: From Fandom to minecraft.wiki", "description": "This redirects from Minecraft Wiki on Fandom to the new domain at minecraft.wiki.", "version": "1.0.0", - "category": "gaming" + "categoryID": "gaming" } diff --git a/docs/library/rules/9_terraria_fandom_wiki_to_wiki_gg/metadata.json b/docs/library/rules/9_terraria_fandom_wiki_to_wiki_gg/metadata.json index 780fdd6..a72fd8f 100644 --- a/docs/library/rules/9_terraria_fandom_wiki_to_wiki_gg/metadata.json +++ b/docs/library/rules/9_terraria_fandom_wiki_to_wiki_gg/metadata.json @@ -10,5 +10,5 @@ "title": "Terraria Wiki: From Fandom to wiki.gg", "description": "This redirects from Terraria Wiki on Fandom to the new domain at wiki.gg.", "version": "1.0.0", - "category": "gaming" + "categoryID": "gaming" } From 37b007e302ee93c4b91f35b3abe16095d9c77352 Mon Sep 17 00:00:00 2001 From: Manabu Nakazawa Date: Sun, 10 Mar 2024 16:37:04 +1000 Subject: [PATCH 14/21] Add `videoURLs` to the metadata, etc. --- docs/add-your-rules-to-library.md | 1 + .../rules/{0_example_rule => 0_example-rule}/metadata.json | 0 .../rules/{0_example_rule => 0_example-rule}/rule-set.json | 0 docs/library/rules/1_google-meet-open-in-chrome/metadata.json | 1 + docs/library/rules/2_notion-open-in-notion-app/metadata.json | 1 + docs/library/rules/3_wikipedia-open-in-wikiwand/metadata.json | 1 + .../metadata.json | 1 + docs/library/rules/5_figma-open-in-figma-app/metadata.json | 1 + .../6_redirect-from-google-search-to-youtube/metadata.json | 3 +++ .../metadata.json | 1 + .../rule-set.json | 0 .../metadata.json | 3 ++- .../rule-set.json | 0 .../metadata.json | 1 + .../rule-set.json | 0 15 files changed, 13 insertions(+), 1 deletion(-) rename docs/library/rules/{0_example_rule => 0_example-rule}/metadata.json (100%) rename docs/library/rules/{0_example_rule => 0_example-rule}/rule-set.json (100%) rename docs/library/rules/{7_minecraft_fandom_wiki_to_mincraft_wiki => 7_minecraft-fandom-wiki-to-mincraft-wiki}/metadata.json (94%) rename docs/library/rules/{7_minecraft_fandom_wiki_to_mincraft_wiki => 7_minecraft-fandom-wiki-to-mincraft-wiki}/rule-set.json (100%) rename docs/library/rules/{8_twitter_redirect_to_nitter => 8_twitter-redirect-to-nitter}/metadata.json (84%) rename docs/library/rules/{8_twitter_redirect_to_nitter => 8_twitter-redirect-to-nitter}/rule-set.json (100%) rename docs/library/rules/{9_terraria_fandom_wiki_to_wiki_gg => 9_terraria-fandom-wiki-to-wiki-gg}/metadata.json (94%) rename docs/library/rules/{9_terraria_fandom_wiki_to_wiki_gg => 9_terraria-fandom-wiki-to-wiki-gg}/rule-set.json (100%) diff --git a/docs/add-your-rules-to-library.md b/docs/add-your-rules-to-library.md index 5b44bb1..d60efb4 100644 --- a/docs/add-your-rules-to-library.md +++ b/docs/add-your-rules-to-library.md @@ -68,6 +68,7 @@ This includes your rule's metadata. - `name`: An author name. - `gitHubID`: A GitHub ID of the author. - `imageURLs` (optional): An array of image URLs of the rule set. +- `videoURLs` (optional): An array of video URLs of the rule set. Not only direct links to the files, YouTube URLs are also supported. - `title`: A title of the rule set. - `description` (optional): A description of the rule set. - `version`: A version of the rule which consists of `{major}.{minor}.{patch}`. diff --git a/docs/library/rules/0_example_rule/metadata.json b/docs/library/rules/0_example-rule/metadata.json similarity index 100% rename from docs/library/rules/0_example_rule/metadata.json rename to docs/library/rules/0_example-rule/metadata.json diff --git a/docs/library/rules/0_example_rule/rule-set.json b/docs/library/rules/0_example-rule/rule-set.json similarity index 100% rename from docs/library/rules/0_example_rule/rule-set.json rename to docs/library/rules/0_example-rule/rule-set.json diff --git a/docs/library/rules/1_google-meet-open-in-chrome/metadata.json b/docs/library/rules/1_google-meet-open-in-chrome/metadata.json index 6c3a00c..8034267 100644 --- a/docs/library/rules/1_google-meet-open-in-chrome/metadata.json +++ b/docs/library/rules/1_google-meet-open-in-chrome/metadata.json @@ -6,6 +6,7 @@ } ], "imageURLs": null, + "videoURLs": null, "aboutURL": null, "title": "Google Meet: Open in Chrome", "description": "A rule to open Google Meet links in Google Chrome automatically.", diff --git a/docs/library/rules/2_notion-open-in-notion-app/metadata.json b/docs/library/rules/2_notion-open-in-notion-app/metadata.json index 5969ffc..02f08a3 100644 --- a/docs/library/rules/2_notion-open-in-notion-app/metadata.json +++ b/docs/library/rules/2_notion-open-in-notion-app/metadata.json @@ -6,6 +6,7 @@ } ], "imageURLs": null, + "videoURLs": null, "aboutURL": null, "title": "Notion: Open in Notion App", "description": "A rule to open Notion links in the Notion app automatically.", diff --git a/docs/library/rules/3_wikipedia-open-in-wikiwand/metadata.json b/docs/library/rules/3_wikipedia-open-in-wikiwand/metadata.json index cfd2b04..c194426 100644 --- a/docs/library/rules/3_wikipedia-open-in-wikiwand/metadata.json +++ b/docs/library/rules/3_wikipedia-open-in-wikiwand/metadata.json @@ -6,6 +6,7 @@ } ], "imageURLs": null, + "videoURLs": null, "aboutURL": null, "title": "Wikipedia: Open in Wikiwand", "description": "Open Wikipedia pages in Wikiwand automatically.", diff --git a/docs/library/rules/4_github-hide-whitespace-changes-in-pull-request/metadata.json b/docs/library/rules/4_github-hide-whitespace-changes-in-pull-request/metadata.json index 6cc4d1d..aeb1fe0 100644 --- a/docs/library/rules/4_github-hide-whitespace-changes-in-pull-request/metadata.json +++ b/docs/library/rules/4_github-hide-whitespace-changes-in-pull-request/metadata.json @@ -6,6 +6,7 @@ } ], "imageURLs": null, + "videoURLs": null, "aboutURL": null, "title": "GitHub: Ignore Whitespace Changes in a Pull Request", "description": "This hides whitespace changes in a pull request on GitHub automatically.", diff --git a/docs/library/rules/5_figma-open-in-figma-app/metadata.json b/docs/library/rules/5_figma-open-in-figma-app/metadata.json index c6fdc36..69cc0f7 100644 --- a/docs/library/rules/5_figma-open-in-figma-app/metadata.json +++ b/docs/library/rules/5_figma-open-in-figma-app/metadata.json @@ -6,6 +6,7 @@ } ], "imageURLs": null, + "videoURLs": null, "aboutURL": null, "title": "Figma: Open in Figma App", "description": "Open Figma links in the Figma app automatically.", diff --git a/docs/library/rules/6_redirect-from-google-search-to-youtube/metadata.json b/docs/library/rules/6_redirect-from-google-search-to-youtube/metadata.json index af4ea16..f57a78b 100644 --- a/docs/library/rules/6_redirect-from-google-search-to-youtube/metadata.json +++ b/docs/library/rules/6_redirect-from-google-search-to-youtube/metadata.json @@ -6,6 +6,9 @@ } ], "imageURLs": null, + "videoURLs": [ + "https://private-user-images.githubusercontent.com/1333214/241560627-ef8abf48-fa9d-4bb4-9298-7e78cde5e5d9.mov?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTAwNTEzNTAsIm5iZiI6MTcxMDA1MTA1MCwicGF0aCI6Ii8xMzMzMjE0LzI0MTU2MDYyNy1lZjhhYmY0OC1mYTlkLTRiYjQtOTI5OC03ZTc4Y2RlNWU1ZDkubW92P1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI0MDMxMCUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNDAzMTBUMDYxMDUwWiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9NGI1MDJiZTc5NzkzYzQ4OWJlMzg5YTcyNjUzMDA3MzU0ODZlZTY3YzU3ZjA2NTZlNjNjNzY5Y2MzMmIxOGI5MiZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmYWN0b3JfaWQ9MCZrZXlfaWQ9MCZyZXBvX2lkPTAifQ.cDgH4bPIqDqoze6_v39IFXEA-OhACgheG_VYvF4n6t4" + ], "aboutURL": null, "title": "Google Search: From Video Tab to YouTube's Search Results", "description": "This redirects from the Videos tab on Google Search to the search results on YouTube automatically.", diff --git a/docs/library/rules/7_minecraft_fandom_wiki_to_mincraft_wiki/metadata.json b/docs/library/rules/7_minecraft-fandom-wiki-to-mincraft-wiki/metadata.json similarity index 94% rename from docs/library/rules/7_minecraft_fandom_wiki_to_mincraft_wiki/metadata.json rename to docs/library/rules/7_minecraft-fandom-wiki-to-mincraft-wiki/metadata.json index e0a6c4b..5d04fb9 100644 --- a/docs/library/rules/7_minecraft_fandom_wiki_to_mincraft_wiki/metadata.json +++ b/docs/library/rules/7_minecraft-fandom-wiki-to-mincraft-wiki/metadata.json @@ -6,6 +6,7 @@ } ], "imageURLs": null, + "videoURLs": null, "aboutURL": null, "title": "Minecraft Wiki: From Fandom to minecraft.wiki", "description": "This redirects from Minecraft Wiki on Fandom to the new domain at minecraft.wiki.", diff --git a/docs/library/rules/7_minecraft_fandom_wiki_to_mincraft_wiki/rule-set.json b/docs/library/rules/7_minecraft-fandom-wiki-to-mincraft-wiki/rule-set.json similarity index 100% rename from docs/library/rules/7_minecraft_fandom_wiki_to_mincraft_wiki/rule-set.json rename to docs/library/rules/7_minecraft-fandom-wiki-to-mincraft-wiki/rule-set.json diff --git a/docs/library/rules/8_twitter_redirect_to_nitter/metadata.json b/docs/library/rules/8_twitter-redirect-to-nitter/metadata.json similarity index 84% rename from docs/library/rules/8_twitter_redirect_to_nitter/metadata.json rename to docs/library/rules/8_twitter-redirect-to-nitter/metadata.json index 303bd82..6effb9b 100644 --- a/docs/library/rules/8_twitter_redirect_to_nitter/metadata.json +++ b/docs/library/rules/8_twitter-redirect-to-nitter/metadata.json @@ -6,9 +6,10 @@ } ], "imageURLs": null, + "videoURLs": null, "aboutURL": null, "title": "Twitter: Redirect to Nitter", "description": "This redirects users from twitter.com to nitter.com", "version": "1.0.0", - "category": "social_media" + "categoryID": "social_media" } diff --git a/docs/library/rules/8_twitter_redirect_to_nitter/rule-set.json b/docs/library/rules/8_twitter-redirect-to-nitter/rule-set.json similarity index 100% rename from docs/library/rules/8_twitter_redirect_to_nitter/rule-set.json rename to docs/library/rules/8_twitter-redirect-to-nitter/rule-set.json diff --git a/docs/library/rules/9_terraria_fandom_wiki_to_wiki_gg/metadata.json b/docs/library/rules/9_terraria-fandom-wiki-to-wiki-gg/metadata.json similarity index 94% rename from docs/library/rules/9_terraria_fandom_wiki_to_wiki_gg/metadata.json rename to docs/library/rules/9_terraria-fandom-wiki-to-wiki-gg/metadata.json index a72fd8f..b6ce7fb 100644 --- a/docs/library/rules/9_terraria_fandom_wiki_to_wiki_gg/metadata.json +++ b/docs/library/rules/9_terraria-fandom-wiki-to-wiki-gg/metadata.json @@ -6,6 +6,7 @@ } ], "imageURLs": null, + "videoURLs": null, "aboutURL": null, "title": "Terraria Wiki: From Fandom to wiki.gg", "description": "This redirects from Terraria Wiki on Fandom to the new domain at wiki.gg.", diff --git a/docs/library/rules/9_terraria_fandom_wiki_to_wiki_gg/rule-set.json b/docs/library/rules/9_terraria-fandom-wiki-to-wiki-gg/rule-set.json similarity index 100% rename from docs/library/rules/9_terraria_fandom_wiki_to_wiki_gg/rule-set.json rename to docs/library/rules/9_terraria-fandom-wiki-to-wiki-gg/rule-set.json From a392280051a333e702a2d9330b75c5a80279c6fe Mon Sep 17 00:00:00 2001 From: Manabu Nakazawa Date: Sun, 10 Mar 2024 17:05:09 +1000 Subject: [PATCH 15/21] nit --- docs/library/rules/2_notion-open-in-notion-app/rule-set.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/library/rules/2_notion-open-in-notion-app/rule-set.json b/docs/library/rules/2_notion-open-in-notion-app/rule-set.json index 42524d5..f4d8a60 100644 --- a/docs/library/rules/2_notion-open-in-notion-app/rule-set.json +++ b/docs/library/rules/2_notion-open-in-notion-app/rule-set.json @@ -4,7 +4,7 @@ "redirects": [ { "appURL": "file:\/\/\/Applications\/Notion.app", - "comments": "Notion allows you to open the Notion app by changing the scheme of the Notion page URL from https to notion. This rule automates this process.", + "comments": "Notion allows you to open the Notion app by changing the scheme of the Notion page URL from https to notion. This rule automates that process.", "destinationURLPattern": "notion:\/\/$1", "exampleURLs": [ "https:\/\/www.notion.so\/Quick-Note-c5a2f0fa248e4de38ab1866c25cffe10" From e164a00b15b18ce2d1796a8aa5a7ae28cae10256 Mon Sep 17 00:00:00 2001 From: Manabu Nakazawa Date: Sun, 10 Mar 2024 21:38:13 +1000 Subject: [PATCH 16/21] Update categories --- docs/library/categories.json | 96 ++++++++++++++++++++++-------------- 1 file changed, 58 insertions(+), 38 deletions(-) diff --git a/docs/library/categories.json b/docs/library/categories.json index 5c2e2a2..9d909d4 100644 --- a/docs/library/categories.json +++ b/docs/library/categories.json @@ -2,123 +2,143 @@ "categories": [ { "id": "social_media", - "name": "Social Media" + "name": "Social Media", + "emoji": "👍" }, { "id": "search", - "name": "Search" + "name": "Search", + "emoji": "🔍" }, { "id": "education", - "name": "Education" + "name": "Education", + "emoji": "📚" }, { "id": "utilities", - "name": "Utilities" + "name": "Utilities", + "emoji": "🛠️" }, { "id": "tech_it", - "name": "Tech & IT" + "name": "Tech & IT", + "emoji": "💻" }, { "id": "entertainment", - "name": "Entertainment" + "name": "Entertainment", + "emoji": "🍿" }, { "id": "shopping", - "name": "Shopping" + "name": "Shopping", + "emoji": "🛍️" }, { - "id": "health_fitness", - "name": "Health & Fitness" + "id": "health", + "name": "Health", + "emoji": "💊" }, { "id": "travel", - "name": "Travel" + "name": "Travel", + "emoji": "🏝️" }, { "id": "news", - "name": "News" + "name": "News", + "emoji": "🗞️" }, { "id": "finance", - "name": "Finance" + "name": "Finance", + "emoji": "📈" }, { "id": "business", - "name": "Business" + "name": "Business", + "emoji": "📊" }, { "id": "government", - "name": "Government" + "name": "Government", + "emoji": "🏢" }, { "id": "science_nature", - "name": "Science & Nature" + "name": "Science & Nature", + "emoji": "🔬" }, { "id": "arts_crafts", - "name": "Arts & Crafts" + "name": "Arts & Crafts", + "emoji": "🎨" }, { "id": "sports", - "name": "Sports" + "name": "Sports", + "emoji": "🏄‍♂️" }, { "id": "lifestyle", - "name": "Lifestyle" + "name": "Lifestyle", + "emoji": "🌇" }, { "id": "legal", - "name": "Legal" + "name": "Legal", + "emoji": "🧑‍⚖️" }, { "id": "gaming", - "name": "Gaming" + "name": "Gaming", + "emoji": "🎮" }, { "id": "real_estate", - "name": "Real Estate" + "name": "Real Estate", + "emoji": "🏠" }, { "id": "transport", - "name": "Transport" + "name": "Transport", + "emoji": "🚅" }, { "id": "safety_security", - "name": "Safety & Security" + "name": "Safety & Security", + "emoji": "👮" }, { - "id": "careers", - "name": "Careers" + "id": "jobs_careers", + "name": "Jobs & Careers", + "emoji": "🧑‍💼" }, { "id": "marketing", - "name": "Marketing" - }, - { - "id": "project_management", - "name": "Project Management" + "name": "Marketing", + "emoji": "💰" }, { "id": "nonprofits", - "name": "Nonprofits" - }, - { - "id": "medical", - "name": "Medical" + "name": "Nonprofits", + "emoji": "🖐️" }, { "id": "family", - "name": "Family" + "name": "Family", + "emoji": "👪" }, { "id": "food_cooking", - "name": "Food & Cooking" + "name": "Food & Cooking", + "emoji": "🥗" }, { "id": "other", - "name": "Other" + "name": "Other", + "emoji": null } ] } From e85caa5644ce9fef08eaca5499a003c8fda38fd7 Mon Sep 17 00:00:00 2001 From: Manabu Nakazawa Date: Mon, 11 Mar 2024 07:48:50 +1000 Subject: [PATCH 17/21] "Nitter is dead" https://github.com/zedeus/nitter/issues/1155#issuecomment-1913361757 --- .../rules/0_example-rule/metadata.json | 1 + .../metadata.json | 15 -------------- .../rule-set.json | 20 ------------------- 3 files changed, 1 insertion(+), 35 deletions(-) delete mode 100644 docs/library/rules/8_twitter-redirect-to-nitter/metadata.json delete mode 100644 docs/library/rules/8_twitter-redirect-to-nitter/rule-set.json diff --git a/docs/library/rules/0_example-rule/metadata.json b/docs/library/rules/0_example-rule/metadata.json index 8dcf0aa..7d80d40 100644 --- a/docs/library/rules/0_example-rule/metadata.json +++ b/docs/library/rules/0_example-rule/metadata.json @@ -6,6 +6,7 @@ } ], "imageURLs": null, + "videoURLs": null, "aboutURL": null, "title": "Example Redirect Rule", "description": "An example rule.", diff --git a/docs/library/rules/8_twitter-redirect-to-nitter/metadata.json b/docs/library/rules/8_twitter-redirect-to-nitter/metadata.json deleted file mode 100644 index 6effb9b..0000000 --- a/docs/library/rules/8_twitter-redirect-to-nitter/metadata.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "authors": [ - { - "name": "Manabu Nakazawa", - "gitHubID": "mshibanami" - } - ], - "imageURLs": null, - "videoURLs": null, - "aboutURL": null, - "title": "Twitter: Redirect to Nitter", - "description": "This redirects users from twitter.com to nitter.com", - "version": "1.0.0", - "categoryID": "social_media" -} diff --git a/docs/library/rules/8_twitter-redirect-to-nitter/rule-set.json b/docs/library/rules/8_twitter-redirect-to-nitter/rule-set.json deleted file mode 100644 index 54b2610..0000000 --- a/docs/library/rules/8_twitter-redirect-to-nitter/rule-set.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "bundleID": "io.github.mshibanami.RedirectWebForSafari", - "kind": "RedirectList", - "redirects": [ - { - "comments": "This is a rule that automatically redirects users from twitter.com to nitter.com, providing a faster and more privacy-focused browsing experience by avoiding Elon Musk's tracking and advertisements. You can change the nitter.net to another instance of Nitter if you want. Find the list of other instances in https://github.com/zedeus/nitter/wiki/Instances .", - "destinationURLPattern": "https:\/\/nitter.net\/$2", - "exampleURLs": [ - "https:\/\/twitter.com\/mshibanami\/status\/1556979987244523520", - "https:\/\/x.com\/mshibanami\/status\/1556979987244523520" - ], - "kind": "Redirect", - "sourceURLPattern": { - "type": "regularExpression", - "value": "https:\\\/\\\/(twitter\\.com|x\\.com)\\\/(.*)" - }, - "title": "Twitter: Redirect to Nitter" - } - ] -} From 05e77abdae6359f4ca3e1a1d86e598e23c658ebb Mon Sep 17 00:00:00 2001 From: Manabu Nakazawa Date: Sat, 13 Apr 2024 15:55:57 +1000 Subject: [PATCH 18/21] 8_DELETED --- docs/library/rules/8_DELETED/.gitkeep | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 docs/library/rules/8_DELETED/.gitkeep diff --git a/docs/library/rules/8_DELETED/.gitkeep b/docs/library/rules/8_DELETED/.gitkeep new file mode 100644 index 0000000..e69de29 From ce46854666f16ee061fca875de83e848c1b3fb09 Mon Sep 17 00:00:00 2001 From: Manabu Nakazawa Date: Sat, 13 Apr 2024 15:58:34 +1000 Subject: [PATCH 19/21] Move library-related folders to the root --- {docs/library => library}/categories.json | 0 {docs/library => library}/rules/0_example-rule/metadata.json | 0 {docs/library => library}/rules/0_example-rule/rule-set.json | 0 .../rules/1_google-meet-open-in-chrome/metadata.json | 0 .../rules/1_google-meet-open-in-chrome/rule-set.json | 0 .../rules/2_notion-open-in-notion-app/metadata.json | 0 .../rules/2_notion-open-in-notion-app/rule-set.json | 0 .../rules/3_wikipedia-open-in-wikiwand/metadata.json | 0 .../rules/3_wikipedia-open-in-wikiwand/rule-set.json | 0 .../metadata.json | 0 .../rule-set.json | 0 .../rules/5_figma-open-in-figma-app/metadata.json | 0 .../rules/5_figma-open-in-figma-app/rule-set.json | 0 .../rules/6_redirect-from-google-search-to-youtube/metadata.json | 0 .../rules/6_redirect-from-google-search-to-youtube/rule-set.json | 0 .../rules/7_minecraft-fandom-wiki-to-mincraft-wiki/metadata.json | 0 .../rules/7_minecraft-fandom-wiki-to-mincraft-wiki/rule-set.json | 0 {docs/library => library}/rules/8_DELETED/.gitkeep | 0 .../rules/9_terraria-fandom-wiki-to-wiki-gg/metadata.json | 0 .../rules/9_terraria-fandom-wiki-to-wiki-gg/rule-set.json | 0 {docs/scripts => scripts}/generate-rule-set-list.sh | 0 21 files changed, 0 insertions(+), 0 deletions(-) rename {docs/library => library}/categories.json (100%) rename {docs/library => library}/rules/0_example-rule/metadata.json (100%) rename {docs/library => library}/rules/0_example-rule/rule-set.json (100%) rename {docs/library => library}/rules/1_google-meet-open-in-chrome/metadata.json (100%) rename {docs/library => library}/rules/1_google-meet-open-in-chrome/rule-set.json (100%) rename {docs/library => library}/rules/2_notion-open-in-notion-app/metadata.json (100%) rename {docs/library => library}/rules/2_notion-open-in-notion-app/rule-set.json (100%) rename {docs/library => library}/rules/3_wikipedia-open-in-wikiwand/metadata.json (100%) rename {docs/library => library}/rules/3_wikipedia-open-in-wikiwand/rule-set.json (100%) rename {docs/library => library}/rules/4_github-hide-whitespace-changes-in-pull-request/metadata.json (100%) rename {docs/library => library}/rules/4_github-hide-whitespace-changes-in-pull-request/rule-set.json (100%) rename {docs/library => library}/rules/5_figma-open-in-figma-app/metadata.json (100%) rename {docs/library => library}/rules/5_figma-open-in-figma-app/rule-set.json (100%) rename {docs/library => library}/rules/6_redirect-from-google-search-to-youtube/metadata.json (100%) rename {docs/library => library}/rules/6_redirect-from-google-search-to-youtube/rule-set.json (100%) rename {docs/library => library}/rules/7_minecraft-fandom-wiki-to-mincraft-wiki/metadata.json (100%) rename {docs/library => library}/rules/7_minecraft-fandom-wiki-to-mincraft-wiki/rule-set.json (100%) rename {docs/library => library}/rules/8_DELETED/.gitkeep (100%) rename {docs/library => library}/rules/9_terraria-fandom-wiki-to-wiki-gg/metadata.json (100%) rename {docs/library => library}/rules/9_terraria-fandom-wiki-to-wiki-gg/rule-set.json (100%) rename {docs/scripts => scripts}/generate-rule-set-list.sh (100%) diff --git a/docs/library/categories.json b/library/categories.json similarity index 100% rename from docs/library/categories.json rename to library/categories.json diff --git a/docs/library/rules/0_example-rule/metadata.json b/library/rules/0_example-rule/metadata.json similarity index 100% rename from docs/library/rules/0_example-rule/metadata.json rename to library/rules/0_example-rule/metadata.json diff --git a/docs/library/rules/0_example-rule/rule-set.json b/library/rules/0_example-rule/rule-set.json similarity index 100% rename from docs/library/rules/0_example-rule/rule-set.json rename to library/rules/0_example-rule/rule-set.json diff --git a/docs/library/rules/1_google-meet-open-in-chrome/metadata.json b/library/rules/1_google-meet-open-in-chrome/metadata.json similarity index 100% rename from docs/library/rules/1_google-meet-open-in-chrome/metadata.json rename to library/rules/1_google-meet-open-in-chrome/metadata.json diff --git a/docs/library/rules/1_google-meet-open-in-chrome/rule-set.json b/library/rules/1_google-meet-open-in-chrome/rule-set.json similarity index 100% rename from docs/library/rules/1_google-meet-open-in-chrome/rule-set.json rename to library/rules/1_google-meet-open-in-chrome/rule-set.json diff --git a/docs/library/rules/2_notion-open-in-notion-app/metadata.json b/library/rules/2_notion-open-in-notion-app/metadata.json similarity index 100% rename from docs/library/rules/2_notion-open-in-notion-app/metadata.json rename to library/rules/2_notion-open-in-notion-app/metadata.json diff --git a/docs/library/rules/2_notion-open-in-notion-app/rule-set.json b/library/rules/2_notion-open-in-notion-app/rule-set.json similarity index 100% rename from docs/library/rules/2_notion-open-in-notion-app/rule-set.json rename to library/rules/2_notion-open-in-notion-app/rule-set.json diff --git a/docs/library/rules/3_wikipedia-open-in-wikiwand/metadata.json b/library/rules/3_wikipedia-open-in-wikiwand/metadata.json similarity index 100% rename from docs/library/rules/3_wikipedia-open-in-wikiwand/metadata.json rename to library/rules/3_wikipedia-open-in-wikiwand/metadata.json diff --git a/docs/library/rules/3_wikipedia-open-in-wikiwand/rule-set.json b/library/rules/3_wikipedia-open-in-wikiwand/rule-set.json similarity index 100% rename from docs/library/rules/3_wikipedia-open-in-wikiwand/rule-set.json rename to library/rules/3_wikipedia-open-in-wikiwand/rule-set.json diff --git a/docs/library/rules/4_github-hide-whitespace-changes-in-pull-request/metadata.json b/library/rules/4_github-hide-whitespace-changes-in-pull-request/metadata.json similarity index 100% rename from docs/library/rules/4_github-hide-whitespace-changes-in-pull-request/metadata.json rename to library/rules/4_github-hide-whitespace-changes-in-pull-request/metadata.json diff --git a/docs/library/rules/4_github-hide-whitespace-changes-in-pull-request/rule-set.json b/library/rules/4_github-hide-whitespace-changes-in-pull-request/rule-set.json similarity index 100% rename from docs/library/rules/4_github-hide-whitespace-changes-in-pull-request/rule-set.json rename to library/rules/4_github-hide-whitespace-changes-in-pull-request/rule-set.json diff --git a/docs/library/rules/5_figma-open-in-figma-app/metadata.json b/library/rules/5_figma-open-in-figma-app/metadata.json similarity index 100% rename from docs/library/rules/5_figma-open-in-figma-app/metadata.json rename to library/rules/5_figma-open-in-figma-app/metadata.json diff --git a/docs/library/rules/5_figma-open-in-figma-app/rule-set.json b/library/rules/5_figma-open-in-figma-app/rule-set.json similarity index 100% rename from docs/library/rules/5_figma-open-in-figma-app/rule-set.json rename to library/rules/5_figma-open-in-figma-app/rule-set.json diff --git a/docs/library/rules/6_redirect-from-google-search-to-youtube/metadata.json b/library/rules/6_redirect-from-google-search-to-youtube/metadata.json similarity index 100% rename from docs/library/rules/6_redirect-from-google-search-to-youtube/metadata.json rename to library/rules/6_redirect-from-google-search-to-youtube/metadata.json diff --git a/docs/library/rules/6_redirect-from-google-search-to-youtube/rule-set.json b/library/rules/6_redirect-from-google-search-to-youtube/rule-set.json similarity index 100% rename from docs/library/rules/6_redirect-from-google-search-to-youtube/rule-set.json rename to library/rules/6_redirect-from-google-search-to-youtube/rule-set.json diff --git a/docs/library/rules/7_minecraft-fandom-wiki-to-mincraft-wiki/metadata.json b/library/rules/7_minecraft-fandom-wiki-to-mincraft-wiki/metadata.json similarity index 100% rename from docs/library/rules/7_minecraft-fandom-wiki-to-mincraft-wiki/metadata.json rename to library/rules/7_minecraft-fandom-wiki-to-mincraft-wiki/metadata.json diff --git a/docs/library/rules/7_minecraft-fandom-wiki-to-mincraft-wiki/rule-set.json b/library/rules/7_minecraft-fandom-wiki-to-mincraft-wiki/rule-set.json similarity index 100% rename from docs/library/rules/7_minecraft-fandom-wiki-to-mincraft-wiki/rule-set.json rename to library/rules/7_minecraft-fandom-wiki-to-mincraft-wiki/rule-set.json diff --git a/docs/library/rules/8_DELETED/.gitkeep b/library/rules/8_DELETED/.gitkeep similarity index 100% rename from docs/library/rules/8_DELETED/.gitkeep rename to library/rules/8_DELETED/.gitkeep diff --git a/docs/library/rules/9_terraria-fandom-wiki-to-wiki-gg/metadata.json b/library/rules/9_terraria-fandom-wiki-to-wiki-gg/metadata.json similarity index 100% rename from docs/library/rules/9_terraria-fandom-wiki-to-wiki-gg/metadata.json rename to library/rules/9_terraria-fandom-wiki-to-wiki-gg/metadata.json diff --git a/docs/library/rules/9_terraria-fandom-wiki-to-wiki-gg/rule-set.json b/library/rules/9_terraria-fandom-wiki-to-wiki-gg/rule-set.json similarity index 100% rename from docs/library/rules/9_terraria-fandom-wiki-to-wiki-gg/rule-set.json rename to library/rules/9_terraria-fandom-wiki-to-wiki-gg/rule-set.json diff --git a/docs/scripts/generate-rule-set-list.sh b/scripts/generate-rule-set-list.sh similarity index 100% rename from docs/scripts/generate-rule-set-list.sh rename to scripts/generate-rule-set-list.sh From 6bf3420d62452ef38a51084f155cc70641d09933 Mon Sep 17 00:00:00 2001 From: Manabu Nakazawa Date: Sat, 13 Apr 2024 17:23:49 +1000 Subject: [PATCH 20/21] Add descriptions about library and backend --- CONTRIBUTING.md | 24 ++++++++++++++++++++---- README.md | 2 +- 2 files changed, 21 insertions(+), 5 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 26be3ae..151b41a 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,16 +1,32 @@ # Contributing guide -Thank you for investing your time in contributing to our project! Any contribution you make will be reflected on [mshibanami.github.io/redirect-web](https://mshibanami.github.io/redirect-web/). +Thank you for investing your time in contributing to our project! -## Livereload +## File structure -This website is powered by Docsify, and you can livereload it with their `docsify-cli`. +- `docs/`: A documentation of Redirect Web for Safari, which is hosted as [mshibanami.github.io/redirect-web](https://mshibanami.github.io/redirect-web/). +- `library/`: Data of the library available on the app, such as rules and categories. +- `backend/`: Codes for the backend. + +## docs + +### Livereload + +The documentation is powered by Docsify, and you can livereload it with their `docsify-cli`. Please check [their repository](https://github.com/docsifyjs/docsify-cli), and install it. -Once it's ready, run this command in the repository root of redirect-web. +Once it's ready, run this command in the repository root: ```sh $ docsify serve docs/ ``` Livereload makes maintaining the documentation easier. + +## Library + +TBD + +## Backend + +TBD diff --git a/README.md b/README.md index d4e1b78..544fa17 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Redirect Web for Safari -This is a repository for [the support website of Redirect Web for Safari](https://mshibanami.github.io/redirect-web). +This is a repository for [the support website of Redirect Web for Safari](https://mshibanami.github.io/redirect-web) and a library of redirect rules. In addition, we provides these on GitHub: From 3d00cba53cdd07fc7035d17ec48fc88982b3f9d7 Mon Sep 17 00:00:00 2001 From: Manabu Nakazawa Date: Wed, 17 Apr 2024 18:43:47 +1000 Subject: [PATCH 21/21] Update library etc. --- CONTRIBUTING.md | 13 +-- docs/add-your-rules-to-library.md | 77 --------------- library/README.md | 93 +++++++++++++++++++ library/categories.json | 50 ++++------ .../0_example-rule/metadata.json | 2 +- .../0_example-rule/rule-set.json | 0 .../metadata.json | 3 +- .../rule-set.json | 0 .../2_notion-open-in-notion-app/metadata.json | 2 +- .../2_notion-open-in-notion-app/rule-set.json | 0 .../metadata.json | 2 +- .../rule-set.json | 0 .../metadata.json | 2 +- .../rule-set.json | 0 .../5_figma-open-in-figma-app/metadata.json | 2 +- .../5_figma-open-in-figma-app/rule-set.json | 0 .../metadata.json | 2 +- .../rule-set.json | 0 .../metadata.json | 2 +- .../rule-set.json | 0 .../{rules => rule-sets}/8_DELETED/.gitkeep | 0 .../metadata.json | 2 +- .../rule-set.json | 0 scripts/generate-rule-set-list.sh | 40 -------- 24 files changed, 127 insertions(+), 165 deletions(-) delete mode 100644 docs/add-your-rules-to-library.md create mode 100644 library/README.md rename library/{rules => rule-sets}/0_example-rule/metadata.json (89%) rename library/{rules => rule-sets}/0_example-rule/rule-set.json (100%) rename library/{rules => rule-sets}/1_google-meet-open-in-chrome/metadata.json (81%) rename library/{rules => rule-sets}/1_google-meet-open-in-chrome/rule-set.json (100%) rename library/{rules => rule-sets}/2_notion-open-in-notion-app/metadata.json (89%) rename library/{rules => rule-sets}/2_notion-open-in-notion-app/rule-set.json (100%) rename library/{rules => rule-sets}/3_wikipedia-open-in-wikiwand/metadata.json (89%) rename library/{rules => rule-sets}/3_wikipedia-open-in-wikiwand/rule-set.json (100%) rename library/{rules => rule-sets}/4_github-hide-whitespace-changes-in-pull-request/metadata.json (88%) rename library/{rules => rule-sets}/4_github-hide-whitespace-changes-in-pull-request/rule-set.json (100%) rename library/{rules => rule-sets}/5_figma-open-in-figma-app/metadata.json (88%) rename library/{rules => rule-sets}/5_figma-open-in-figma-app/rule-set.json (100%) rename library/{rules => rule-sets}/6_redirect-from-google-search-to-youtube/metadata.json (97%) rename library/{rules => rule-sets}/6_redirect-from-google-search-to-youtube/rule-set.json (100%) rename library/{rules => rule-sets}/7_minecraft-fandom-wiki-to-mincraft-wiki/metadata.json (91%) rename library/{rules => rule-sets}/7_minecraft-fandom-wiki-to-mincraft-wiki/rule-set.json (100%) rename library/{rules => rule-sets}/8_DELETED/.gitkeep (100%) rename library/{rules => rule-sets}/9_terraria-fandom-wiki-to-wiki-gg/metadata.json (91%) rename library/{rules => rule-sets}/9_terraria-fandom-wiki-to-wiki-gg/rule-set.json (100%) delete mode 100755 scripts/generate-rule-set-list.sh diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 151b41a..04f0775 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -6,11 +6,10 @@ Thank you for investing your time in contributing to our project! - `docs/`: A documentation of Redirect Web for Safari, which is hosted as [mshibanami.github.io/redirect-web](https://mshibanami.github.io/redirect-web/). - `library/`: Data of the library available on the app, such as rules and categories. -- `backend/`: Codes for the backend. -## docs +### Documentation -### Livereload +#### Livereload The documentation is powered by Docsify, and you can livereload it with their `docsify-cli`. Please check [their repository](https://github.com/docsifyjs/docsify-cli), and install it. @@ -23,10 +22,6 @@ $ docsify serve docs/ Livereload makes maintaining the documentation easier. -## Library +### Library -TBD - -## Backend - -TBD +Please check [Library's README](./library/README.md). diff --git a/docs/add-your-rules-to-library.md b/docs/add-your-rules-to-library.md deleted file mode 100644 index d60efb4..0000000 --- a/docs/add-your-rules-to-library.md +++ /dev/null @@ -1,77 +0,0 @@ -# Add your rules to Library - -You can share your rules with other users in Library. - -All rules in Library are managed in [docs/library/rules/](https://github.com/mshibanami/redirect-web/tree/main/docs/rules-in-library). You will need to create a pull request to add your rule set. - -All the data of your rule must be in a root folder named `{number}_{snake_cased_title_of_rule_set}`. In this folder, the following files must be located: - -- `rule-set.json` -- `metadata.json` - -## `rule-set.json` - -This is a rule set that contains one or more rules. This is essentially the same with the `redirectweb` file you can get when exporting your rules via the Redirect Web app. -The following json is a sample `rule-set.json` that opens Google Meet link in Google Chrome: - -```json -{ - "bundleID": "io.github.mshibanami.RedirectWebForSafari", - "kind": "RedirectList", - "redirects": [ - { - "appURL": "file:\/\/\/Applications\/Google%20Chrome.app", - "comments": "This is a rule to open Google Meet links in Google Chrome automatically.", - "destinationURLPattern": "$0", - "exampleURLs": [ - "https:\/\/meet.google.com\/xxx-yyyy-zzz" - ], - "kind": "Redirect", - "sourceURLPattern": { - "type": "regularExpression", - "value": "https:\/\/meet.google.com\/[a-z]*-[a-z]*-[a-z]*" - }, - "title": "Google Meet: Open in Chrome" - } - ] -} -``` - -## `metadata.json` - -This includes your rule's metadata. - -```json -{ - "authors": [ - { - "name": "Author Name 1", - "gitHubID": "author-github-id1" - }, - { - "name": "Author Name 2", - "gitHubID": "author-github-id2", - } - ], - "imageURLs": [ - "https://somewhere-on-the-internet.com/path-to-your-rule-set-image" - ], - "aboutURL": "https://somewhere-on-the-internet.com/path-to-the-rule-set-details", - "title": "A title of the rule set", - "description": "A description of the rule set.", - "categoryID": "game" - "version": "1.0.0" -} -``` - -- `authors`: An array of authors. - - `name`: An author name. - - `gitHubID`: A GitHub ID of the author. -- `imageURLs` (optional): An array of image URLs of the rule set. -- `videoURLs` (optional): An array of video URLs of the rule set. Not only direct links to the files, YouTube URLs are also supported. -- `title`: A title of the rule set. -- `description` (optional): A description of the rule set. -- `version`: A version of the rule which consists of `{major}.{minor}.{patch}`. -- `categoryID`: A category ID of the rule set. - -## Categories diff --git a/library/README.md b/library/README.md new file mode 100644 index 0000000..de8cf28 --- /dev/null +++ b/library/README.md @@ -0,0 +1,93 @@ +# Library + +The library is shown in the Redirect Web apps and the data under the `library` folder may be used in the app. + +## Rule Sets + +Rule sets within the library are managed at [library/rule-sets](https://github.com/mshibanami/redirect-web/tree/main/library/rule-sets). + +Each rule is identified by a unique integer ID. All data in a rule set should be in a folder named `{id}_{short-title-of-rule-set}`. This folder should contain: + +- `rule-set.json` +- `metadata.json` + +Folders of deleted rule sets remain like `8_DELETED`, ensuring that IDs remain unique. + +You can submit a pull request to add your rule to the library. + +> [!WARNING] +> Old rules will persist in the Git history, although you can modify or remove your rules after creation. + +## `rule-set.json` + +This file defines a rule set containing one or more rules. It's essentially equivalent to the `redirectweb` file you can get by exporting your rules from the Redirect Web apps. + +> [!NOTE] +> The file extension is `json` because it's easier to browse on GitHub. + +Below is an example of `rule-set.json` that configures Google Meet links to open in Google Chrome: + +```json +{ + "bundleID": "io.github.mshibanami.RedirectWebForSafari", + "kind": "RedirectList", + "redirects": [ + { + "appURL": "file:\/\/\/Applications\/Google%20Chrome.app", + "comments": "This is a rule to open Google Meet links in Google Chrome automatically.", + "destinationURLPattern": "$0", + "exampleURLs": [ + "https:\/\/meet.google.com\/xxx-yyyy-zzz" + ], + "kind": "Redirect", + "sourceURLPattern": { + "type": "regularExpression", + "value": "https:\/\/meet.google.com\/[a-z]*-[a-z]*-[a-z]*" + }, + "title": "Google Meet: Open in Chrome" + } + ] +} +``` + +## `metadata.json` + +This file contains metadata of a rule set. + +```json +{ + "authors": [ + { + "name": "Author Name 1", + "gitHubID": "author-github-id1" + }, + { + "name": "Author Name 2", + "gitHubID": "author-github-id2", + } + ], + "imageURLs": [ + "https://somewhere-on-the-internet.com/path/to/your-rule-set-image.jpg" + ], + "aboutURL": "https://somewhere-on-the-internet.com/path/to/the-rule-set-details.html", + "title": "A title of the rule set", + "description": "A description of the rule set.", + "version": "1.0.0", + "primaryCategoryID": "gaming", + "secondaryCategoryID": "productivity" +} +``` + +- `authors`: A list of rule set's authors. + - `name`: The name of an author. + - `gitHubID`: The GitHub ID of an author. +- `imageURLs` (optional): A list of image URLs of the rule set. +- `videoURLs` (optional): A list of video URLs for the rule set, including: + - A direct link to a video file that QuickTime Player can play, or, + - A YouTube video URL. +- `aboutURL` (optional): A link to a webpage where users can learn more about the rule set. +- `title`: A short title of the rule set. +- `description`: A description of the rule set. This is optional when the first rule in the rule set has non-empty `comments`. +- `version`: A version of the rule set, which should follow [Semantic Versioning](https://semver.org). +- `primaryCategoryID`: A primary category ID of the rule set. Find a list of the categories in [categories.json](./categories.json). +- `secondaryCategoryID` (optional): A secondary category ID of the rule set. diff --git a/library/categories.json b/library/categories.json index 9d909d4..16608e4 100644 --- a/library/categories.json +++ b/library/categories.json @@ -13,16 +13,21 @@ { "id": "education", "name": "Education", - "emoji": "📚" + "emoji": "🎓" }, { - "id": "utilities", - "name": "Utilities", - "emoji": "🛠️" + "id": "reference", + "name": "Reference", + "emoji": "📖" }, { - "id": "tech_it", - "name": "Tech & IT", + "id": "productivity", + "name": "Productivity", + "emoji": "🧠" + }, + { + "id": "software_development", + "name": "Software Development", "emoji": "💻" }, { @@ -33,10 +38,10 @@ { "id": "shopping", "name": "Shopping", - "emoji": "🛍️" + "emoji": "👜" }, { - "id": "health", + "id": "health_and_fitness", "name": "Health", "emoji": "💊" }, @@ -66,22 +71,22 @@ "emoji": "🏢" }, { - "id": "science_nature", - "name": "Science & Nature", + "id": "science", + "name": "Science", "emoji": "🔬" }, { - "id": "arts_crafts", + "id": "arts_and_crafts", "name": "Arts & Crafts", "emoji": "🎨" }, { "id": "sports", "name": "Sports", - "emoji": "🏄‍♂️" + "emoji": "⚽️" }, { - "id": "lifestyle", + "id": "photo_and_video", "name": "Lifestyle", "emoji": "🌇" }, @@ -106,32 +111,17 @@ "emoji": "🚅" }, { - "id": "safety_security", - "name": "Safety & Security", - "emoji": "👮" - }, - { - "id": "jobs_careers", + "id": "jobs_and_careers", "name": "Jobs & Careers", "emoji": "🧑‍💼" }, - { - "id": "marketing", - "name": "Marketing", - "emoji": "💰" - }, { "id": "nonprofits", "name": "Nonprofits", "emoji": "🖐️" }, { - "id": "family", - "name": "Family", - "emoji": "👪" - }, - { - "id": "food_cooking", + "id": "food_and_cooking", "name": "Food & Cooking", "emoji": "🥗" }, diff --git a/library/rules/0_example-rule/metadata.json b/library/rule-sets/0_example-rule/metadata.json similarity index 89% rename from library/rules/0_example-rule/metadata.json rename to library/rule-sets/0_example-rule/metadata.json index 7d80d40..7c8a878 100644 --- a/library/rules/0_example-rule/metadata.json +++ b/library/rule-sets/0_example-rule/metadata.json @@ -11,5 +11,5 @@ "title": "Example Redirect Rule", "description": "An example rule.", "version": "1.0.0", - "categoryID": "other" + "primaryCategoryID": "other" } diff --git a/library/rules/0_example-rule/rule-set.json b/library/rule-sets/0_example-rule/rule-set.json similarity index 100% rename from library/rules/0_example-rule/rule-set.json rename to library/rule-sets/0_example-rule/rule-set.json diff --git a/library/rules/1_google-meet-open-in-chrome/metadata.json b/library/rule-sets/1_google-meet-open-in-chrome/metadata.json similarity index 81% rename from library/rules/1_google-meet-open-in-chrome/metadata.json rename to library/rule-sets/1_google-meet-open-in-chrome/metadata.json index 8034267..20c2893 100644 --- a/library/rules/1_google-meet-open-in-chrome/metadata.json +++ b/library/rule-sets/1_google-meet-open-in-chrome/metadata.json @@ -11,5 +11,6 @@ "title": "Google Meet: Open in Chrome", "description": "A rule to open Google Meet links in Google Chrome automatically.", "version": "1.0.0", - "categoryID": "utilities" + "primaryCategoryID": "productivity", + "secondaryCategoryID": "business" } diff --git a/library/rules/1_google-meet-open-in-chrome/rule-set.json b/library/rule-sets/1_google-meet-open-in-chrome/rule-set.json similarity index 100% rename from library/rules/1_google-meet-open-in-chrome/rule-set.json rename to library/rule-sets/1_google-meet-open-in-chrome/rule-set.json diff --git a/library/rules/2_notion-open-in-notion-app/metadata.json b/library/rule-sets/2_notion-open-in-notion-app/metadata.json similarity index 89% rename from library/rules/2_notion-open-in-notion-app/metadata.json rename to library/rule-sets/2_notion-open-in-notion-app/metadata.json index 02f08a3..427a422 100644 --- a/library/rules/2_notion-open-in-notion-app/metadata.json +++ b/library/rule-sets/2_notion-open-in-notion-app/metadata.json @@ -11,5 +11,5 @@ "title": "Notion: Open in Notion App", "description": "A rule to open Notion links in the Notion app automatically.", "version": "1.0.0", - "categoryID": "utilities" + "primaryCategoryID": "productivity" } diff --git a/library/rules/2_notion-open-in-notion-app/rule-set.json b/library/rule-sets/2_notion-open-in-notion-app/rule-set.json similarity index 100% rename from library/rules/2_notion-open-in-notion-app/rule-set.json rename to library/rule-sets/2_notion-open-in-notion-app/rule-set.json diff --git a/library/rules/3_wikipedia-open-in-wikiwand/metadata.json b/library/rule-sets/3_wikipedia-open-in-wikiwand/metadata.json similarity index 89% rename from library/rules/3_wikipedia-open-in-wikiwand/metadata.json rename to library/rule-sets/3_wikipedia-open-in-wikiwand/metadata.json index c194426..d270efb 100644 --- a/library/rules/3_wikipedia-open-in-wikiwand/metadata.json +++ b/library/rule-sets/3_wikipedia-open-in-wikiwand/metadata.json @@ -11,5 +11,5 @@ "title": "Wikipedia: Open in Wikiwand", "description": "Open Wikipedia pages in Wikiwand automatically.", "version": "1.0.0", - "categoryID": "education" + "primaryCategoryID": "reference" } diff --git a/library/rules/3_wikipedia-open-in-wikiwand/rule-set.json b/library/rule-sets/3_wikipedia-open-in-wikiwand/rule-set.json similarity index 100% rename from library/rules/3_wikipedia-open-in-wikiwand/rule-set.json rename to library/rule-sets/3_wikipedia-open-in-wikiwand/rule-set.json diff --git a/library/rules/4_github-hide-whitespace-changes-in-pull-request/metadata.json b/library/rule-sets/4_github-hide-whitespace-changes-in-pull-request/metadata.json similarity index 88% rename from library/rules/4_github-hide-whitespace-changes-in-pull-request/metadata.json rename to library/rule-sets/4_github-hide-whitespace-changes-in-pull-request/metadata.json index aeb1fe0..b8e613a 100644 --- a/library/rules/4_github-hide-whitespace-changes-in-pull-request/metadata.json +++ b/library/rule-sets/4_github-hide-whitespace-changes-in-pull-request/metadata.json @@ -11,5 +11,5 @@ "title": "GitHub: Ignore Whitespace Changes in a Pull Request", "description": "This hides whitespace changes in a pull request on GitHub automatically.", "version": "1.0.0", - "categoryID": "tech_it" + "primaryCategoryID": "software_development" } diff --git a/library/rules/4_github-hide-whitespace-changes-in-pull-request/rule-set.json b/library/rule-sets/4_github-hide-whitespace-changes-in-pull-request/rule-set.json similarity index 100% rename from library/rules/4_github-hide-whitespace-changes-in-pull-request/rule-set.json rename to library/rule-sets/4_github-hide-whitespace-changes-in-pull-request/rule-set.json diff --git a/library/rules/5_figma-open-in-figma-app/metadata.json b/library/rule-sets/5_figma-open-in-figma-app/metadata.json similarity index 88% rename from library/rules/5_figma-open-in-figma-app/metadata.json rename to library/rule-sets/5_figma-open-in-figma-app/metadata.json index 69cc0f7..3225d46 100644 --- a/library/rules/5_figma-open-in-figma-app/metadata.json +++ b/library/rule-sets/5_figma-open-in-figma-app/metadata.json @@ -11,5 +11,5 @@ "title": "Figma: Open in Figma App", "description": "Open Figma links in the Figma app automatically.", "version": "1.0.0", - "categoryID": "arts_crafts" + "primaryCategoryID": "arts_and_crafts" } diff --git a/library/rules/5_figma-open-in-figma-app/rule-set.json b/library/rule-sets/5_figma-open-in-figma-app/rule-set.json similarity index 100% rename from library/rules/5_figma-open-in-figma-app/rule-set.json rename to library/rule-sets/5_figma-open-in-figma-app/rule-set.json diff --git a/library/rules/6_redirect-from-google-search-to-youtube/metadata.json b/library/rule-sets/6_redirect-from-google-search-to-youtube/metadata.json similarity index 97% rename from library/rules/6_redirect-from-google-search-to-youtube/metadata.json rename to library/rule-sets/6_redirect-from-google-search-to-youtube/metadata.json index f57a78b..d42127f 100644 --- a/library/rules/6_redirect-from-google-search-to-youtube/metadata.json +++ b/library/rule-sets/6_redirect-from-google-search-to-youtube/metadata.json @@ -13,5 +13,5 @@ "title": "Google Search: From Video Tab to YouTube's Search Results", "description": "This redirects from the Videos tab on Google Search to the search results on YouTube automatically.", "version": "1.0.0", - "categoryID": "search" + "primaryCategoryID": "search" } diff --git a/library/rules/6_redirect-from-google-search-to-youtube/rule-set.json b/library/rule-sets/6_redirect-from-google-search-to-youtube/rule-set.json similarity index 100% rename from library/rules/6_redirect-from-google-search-to-youtube/rule-set.json rename to library/rule-sets/6_redirect-from-google-search-to-youtube/rule-set.json diff --git a/library/rules/7_minecraft-fandom-wiki-to-mincraft-wiki/metadata.json b/library/rule-sets/7_minecraft-fandom-wiki-to-mincraft-wiki/metadata.json similarity index 91% rename from library/rules/7_minecraft-fandom-wiki-to-mincraft-wiki/metadata.json rename to library/rule-sets/7_minecraft-fandom-wiki-to-mincraft-wiki/metadata.json index 5d04fb9..c3aa7bb 100644 --- a/library/rules/7_minecraft-fandom-wiki-to-mincraft-wiki/metadata.json +++ b/library/rule-sets/7_minecraft-fandom-wiki-to-mincraft-wiki/metadata.json @@ -11,5 +11,5 @@ "title": "Minecraft Wiki: From Fandom to minecraft.wiki", "description": "This redirects from Minecraft Wiki on Fandom to the new domain at minecraft.wiki.", "version": "1.0.0", - "categoryID": "gaming" + "primaryCategoryID": "gaming" } diff --git a/library/rules/7_minecraft-fandom-wiki-to-mincraft-wiki/rule-set.json b/library/rule-sets/7_minecraft-fandom-wiki-to-mincraft-wiki/rule-set.json similarity index 100% rename from library/rules/7_minecraft-fandom-wiki-to-mincraft-wiki/rule-set.json rename to library/rule-sets/7_minecraft-fandom-wiki-to-mincraft-wiki/rule-set.json diff --git a/library/rules/8_DELETED/.gitkeep b/library/rule-sets/8_DELETED/.gitkeep similarity index 100% rename from library/rules/8_DELETED/.gitkeep rename to library/rule-sets/8_DELETED/.gitkeep diff --git a/library/rules/9_terraria-fandom-wiki-to-wiki-gg/metadata.json b/library/rule-sets/9_terraria-fandom-wiki-to-wiki-gg/metadata.json similarity index 91% rename from library/rules/9_terraria-fandom-wiki-to-wiki-gg/metadata.json rename to library/rule-sets/9_terraria-fandom-wiki-to-wiki-gg/metadata.json index b6ce7fb..f44e10f 100644 --- a/library/rules/9_terraria-fandom-wiki-to-wiki-gg/metadata.json +++ b/library/rule-sets/9_terraria-fandom-wiki-to-wiki-gg/metadata.json @@ -11,5 +11,5 @@ "title": "Terraria Wiki: From Fandom to wiki.gg", "description": "This redirects from Terraria Wiki on Fandom to the new domain at wiki.gg.", "version": "1.0.0", - "categoryID": "gaming" + "primaryCategoryID": "gaming" } diff --git a/library/rules/9_terraria-fandom-wiki-to-wiki-gg/rule-set.json b/library/rule-sets/9_terraria-fandom-wiki-to-wiki-gg/rule-set.json similarity index 100% rename from library/rules/9_terraria-fandom-wiki-to-wiki-gg/rule-set.json rename to library/rule-sets/9_terraria-fandom-wiki-to-wiki-gg/rule-set.json diff --git a/scripts/generate-rule-set-list.sh b/scripts/generate-rule-set-list.sh deleted file mode 100755 index 914e7a8..0000000 --- a/scripts/generate-rule-set-list.sh +++ /dev/null @@ -1,40 +0,0 @@ -#!/bin/bash - -cd "$(dirname "${BASH_SOURCE:-$0}")" - -supported_rule_set_files=( - "rule-set.json" - "rule-set.redirectweb" -) - -combined='[]' -for dir in ../library/rules/*; do - if [ -d "$dir" ]; then - id=$(basename "$dir" | cut -d'_' -f1) - - if ! [[ $id =~ ^[0-9]+$ ]]; then - echo "❌ Error: Directory $dir does not start with '_' format." - exit 1 - fi - - metadata_file="$dir/metadata.json" - rule_set_file="" - for file in "${supported_rule_set_files[@]}"; do - if [ -f "$dir/$file" ]; then - rule_set_file="$dir/$file" - break - fi - done - - if [ -n "$rule_set_file" ]; then - processed_rule_set=$(jq --argjson id "$id" -s '{id: $id, ruleSet: .[0], metadata: .[1]}' "$rule_set_file" "$metadata_file") - combined=$(echo "$combined" | jq --argjson newElement "$processed_rule_set" '. += [$newElement]') - fi - fi -done - -wrapped=$(echo "$combined" | jq '{ "ruleSets": . }') -output_dir="../generated/rule-sets" -mkdir -p $output_dir -echo "$wrapped" > $output_dir/list.json -echo "✅ Created list.json at $output_dir/list.json"