Skip to content

Commit

Permalink
Script to clean showcase.json (#3851)
Browse files Browse the repository at this point in the history
* Script to clean showcase.json

* Revert used dapps

* Add comment
  • Loading branch information
lmuntaner authored Dec 4, 2024
1 parent 0258942 commit d0158fe
Show file tree
Hide file tree
Showing 2 changed files with 90 additions and 180 deletions.
66 changes: 66 additions & 0 deletions scripts/clean-showcase.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
#!/bin/bash

# The objective of this script is to flag entries to be removed by a human reviewer.
# An entry is flagged if it meets one of the next requirements:
# 1. The `usesInternetIdentity` field is set to `true` and the `website` field is a GitHub URL.
# 2. The website is unreachable (HTTP status code in the 4XX or 5XX range).

# Input JSON file
INPUT_FILE="showcase.json"

# Temporary file to store intermediate results
TEMP_FILE="temp.json"
TEMP_FILE_2="temp2.json"

# Substitute `usesInternetIdentity: true` with `usesInternetIdentity: false` for all entries with a GitHub URL instead of a website.
jq '[.[] | if (.usesInternetIdentity == true) and ((.website // "") | test("^https://github.com/")) then .usesInternetIdentity = false else . end]' "$INPUT_FILE" > "$TEMP_FILE"

# Function to check the status of a website
check_canister_website() {
local url=$1
# Get the HTTP headers and extract the status code
local response_status
response_status=$(curl -s -o /dev/null -I -w "%{http_code}" "$url")

echo "HTTP status: $response_status"

# If the status is in the 4XX or 5XX range, return failure
if [[ "$response_status" -ge 400 && "$response_status" -lt 600 ]]; then
echo "HTTP $response_status error detected for $url"
return 1
fi

return 0
}

# Start output as an empty array
echo "[" > "$TEMP_FILE_2"

# Process each entry in the filtered JSON
first_item=true
jq -c '.[]' "$TEMP_FILE" | while read -r item; do
website=$(echo "$item" | jq -r '.website')
echo "Processing $website"

# Check if the header is present for the website
if check_canister_website "$website"; then
# Add valid entries to the output file, handling comma placement
if [ "$first_item" = true ]; then
first_item=false
echo "$item" >> "$TEMP_FILE_2"
else
echo ",$item" >> "$TEMP_FILE_2"
fi
fi
done

# Close the JSON array
echo "]" >> "$TEMP_FILE_2"

jq '.' "$TEMP_FILE_2" > "$INPUT_FILE"

# Clean up temporary files
rm -f "$TEMP_FILE"
rm -f "$TEMP_FILE_2"

echo "Showcase file has been cleaned up successfullly."
204 changes: 24 additions & 180 deletions showcase.json
Original file line number Diff line number Diff line change
Expand Up @@ -372,28 +372,27 @@
],
"youtube": "https://www.youtube.com/@junobuild"
},

{
"id": "oisy",
"name": "OISY Wallet",
"oneLiner": "Browser-based multi-chain wallet",
"website": "https://oisy.com",
"github": "https://github.com/dfinity/oisy-wallet",
"display": "Large",
"tags": [
"Ethereum",
"DeFi",
"Wallet",
"Chain Fusion"
],
"twitter": "https://x.com/oisy",
"description": "OISY Wallet is a new browser-based multi-chain wallet, powered by Internet Computer’s chain fusion technology. It is fully on-chain and implements network custody, an innovative approach that leverages the Internet Computer’s advanced cryptography to eliminate the need for you to handle private keys directly.",
"usesInternetIdentity": true,
"logo": "/img/showcase/oisy_logo.svg",
"screenshots": [
"/img/showcase/oisy-preview.webp"
]
},
{
"id": "oisy",
"name": "OISY Wallet",
"oneLiner": "Browser-based multi-chain wallet",
"website": "https://oisy.com",
"github": "https://github.com/dfinity/oisy-wallet",
"display": "Large",
"tags": [
"Ethereum",
"DeFi",
"Wallet",
"Chain Fusion"
],
"twitter": "https://x.com/oisy",
"description": "OISY Wallet is a new browser-based multi-chain wallet, powered by Internet Computer’s chain fusion technology. It is fully on-chain and implements network custody, an innovative approach that leverages the Internet Computer’s advanced cryptography to eliminate the need for you to handle private keys directly.",
"usesInternetIdentity": true,
"logo": "/img/showcase/oisy_logo.svg",
"screenshots": [
"/img/showcase/oisy-preview.webp"
]
},
{
"id": "kinic",
"name": "Kinic",
Expand Down Expand Up @@ -742,25 +741,6 @@
"/img/showcase/internetidentity_screenshot_0.gif"
]
},
{
"id": "Arth",
"name": "Arth",
"tags": [
"DeFi",
"Wallet",
"Bitcoin",
"Chain Fusion"
],
"description": "The mobile payments app that combines the power of Bitcoin with the convenience of mobile payments. With ckBTC, you can easily swap ckBTC from Bitcoin, view balances, and seamlessly make payments using QR codes.",
"usesInternetIdentity": true,
"website": "https://play.google.com/store/apps/details?id=com.foo.arth&pli=1",
"display": "Normal",
"logo": "/img/showcase/arth_logo.png",
"screenshots": [
"/img/showcase/arth_ss.webp"
],
"submittableId": "36143434"
},
{
"id": "astrox",
"name": "AstroX ME",
Expand Down Expand Up @@ -1816,19 +1796,6 @@
"logo": "/img/showcase/dbox_logo.png",
"submittableId": "22737412"
},
{
"id": "icadashboard",
"name": "ICA Dashboard",
"website": "https://dashboard.internetcomputer.org/",
"tags": [
"Tools / Infrastructure"
],
"description": "The Internet Computer Association maintains a public dashboard where anyone can track the latest statistics for the Internet Computer blockchain. Tracking everything from blocks per second, to NNS proposals and their information and voting record, as well the latest state of the network, and transaction data. ",
"oneLiner": "ICA Official Dashboard",
"display": "Normal",
"logo": "/img/showcase/icadashboard_logo.webp",
"screenshots": []
},
{
"id": "icpcoins",
"name": "ICP Coins",
Expand Down Expand Up @@ -1920,19 +1887,6 @@
"/img/showcase/welcomeintothemetaverse_screenshot_0.webp"
]
},
{
"id": "lo-fiplayer",
"name": "Lo-Fi Player",
"website": "https://hl2zz-gyaaa-aaaad-qas3a-cai.raw.ic0.app/",
"tags": [
"Games"
],
"description": "Lo-Fi Player is a dapp hosted on the Internet Computer that lets users listen to relaxing beats delivered by blockchain. The back-end is using machine learning to build and develop the AI produced tunes, and users can interact within the player to change the sound to their liking. ",
"logo": "/img/showcase/lo-fiplayer_logo.webp",
"screenshots": [
"/img/showcase/lo-fiplayer_screenshot_0.webp"
]
},
{
"id": "reversi",
"name": "Reversi",
Expand Down Expand Up @@ -2500,24 +2454,6 @@
"twitter": "https://twitter.com/Faceless_Proj",
"submittableId": "35639090"
},
{
"name": "Sama Network",
"description": "SAMA network, with its original designed consensus and business sharding separation, builds a highly secure and private distributed computational system. It provides data security and computational power for the World Wide Web without altering users’ habits.",
"website": "https://sama.network/",
"logo": "/img/showcase/sama_network_logo.png",
"display": "Normal",
"id": "sama_network",
"oneLiner": "A blockchain OS with high throughput, business data full-stack encryption, and distributed computing capabilities.",
"stats": "Private alpha testnet has been launched; the network and user interface are ready for operation.",
"tags": [
"Tools / Infrastructure",
"Enterprise"
],
"usesInternetIdentity": false,
"twitter": "https://twitter.com/sama_network",
"youtube": "https://www.youtube.com/@sama_network",
"submittableId": "40741075"
},
{
"name": "221Bravo App",
"description": "Home for ICP Data-Detectives. Token Stats, Visual Explorer, Account Searching and more.",
Expand Down Expand Up @@ -2671,27 +2607,6 @@
"youtube": "https://www.youtube.com/channel/UCrCMtg7PhCHX1tKpw5NIU7g",
"submittableId": "44034269"
},
{
"id": "taxlint",
"name": "TaxLint",
"oneLiner": "A decentralised, private, and secure automated Tax Report aimed to help users to count ICP and ICRC1 token transactions.",
"website": "https://www.taxlint.online/",
"tags": [
"DeFi",
"Tools / Infrastructure"
],
"description": "A decentralised, private, and secure automated Tax Report aimed to help users to count ICP and ICRC1 token transactions.",
"usesInternetIdentity": true,
"logo": "/img/showcase/taxlint_logo.png",
"github": "https://github.com/TaxLintDAO/taxlint",
"twitter": "https://twitter.com/taxlint",
"display": "Normal",
"stats": "150+ users",
"screenshots": [
"/img/showcase/taxlint_screenshot.png"
],
"submittableId": "43956470"
},
{
"name": "InheritX",
"description": "InheritX is a blockchain-based application developed on Internet Computer (ICP) that allows users to create a digital will and bequeath their assets to designated beneficiaries in the event of their death.",
Expand Down Expand Up @@ -2869,7 +2784,7 @@
],
"description": "POC of a decentralized secret management solution that leverages Internet Computer (IC) technology. It aims to provide a means for services to share secrets in a flexible, transparent, and secure way. It simplifies the flow of secret management between consumers in the cluster as well as rotate secrets based on config for added security.",
"stats": "100% on chain ACL",
"usesInternetIdentity": true,
"usesInternetIdentity": false,
"github": "https://github.com/Zondax/vault-k8s-canister",
"youtube": "https://youtu.be/99MahI1SO7c",
"twitter": "https://twitter.com/_zondax_",
Expand Down Expand Up @@ -2921,7 +2836,7 @@
"Tools / Infrastructure"
],
"description": "POC of a decentralized mind and body data management tooling that leverages Internet Computer (IC) technology. This POC provides methods and interface to submit HTTP Outcall requests to a proxy API that interfaces with a Firebase FIrestore database. It provides an example front end react application that interacts with a motoko backend.",
"usesInternetIdentity": true,
"usesInternetIdentity": false,
"github": "https://github.com/blueberryxtech/ic-mind-body-canister",
"submittableId": "44190088"
},
Expand Down Expand Up @@ -3450,22 +3365,6 @@
"logo": "/img/showcase/gamebloc_logo.png",
"submittableId": "44503915"
},
{
"id": "allkinds",
"name": "AllKinds",
"oneLiner": "A web3 social network where people find more meaningful connections.",
"website": "https://allkinds.xyz/",
"github": "https://github.com/AllKinds/AllkindsICP",
"twitter": "https://twitter.com/Allkindsxyz",
"tags": [
"SocialFi"
],
"description": "A web3 social network where people find more meaningful connections.",
"usesInternetIdentity": true,
"display": "Normal",
"logo": "/img/showcase/allkinds_logo.svg",
"submittableId": "43688836"
},
{
"id": "dmail-network",
"name": "Dmail Network",
Expand Down Expand Up @@ -3553,23 +3452,6 @@
"logo": "/img/showcase/frontrow_logo.png",
"submittableId": "43814286"
},
{
"id": "myordinalsloan",
"name": "MyOrdinals.Loan",
"oneLiner": "Peer-to-peer Bitcoin lending using ckBTC. Users borrow or lend ckBTC, securing transactions with unique Ordinal Inscriptions (Ordinals) as collateral.",
"website": "https://myordinals.loan/",
"tags": [
"Bitcoin",
"DeFi",
"Chain Fusion"
],
"twitter": "https://twitter.com/MyOrdinalsLoan",
"description": "Peer-to-peer Bitcoin lending using ckBTC. Users borrow or lend ckBTC, securing transactions with unique Ordinal Inscriptions (Ordinals) as collateral.",
"usesInternetIdentity": false,
"display": "Normal",
"logo": "/img/showcase/myordinalsloan_logo.png",
"submittableId": "41341564"
},
{
"id": "icto",
"name": "ICTO",
Expand Down Expand Up @@ -4646,22 +4528,6 @@
"github": "https://github.com/NeutronStarDAO/icecube",
"twitter": "https://x.com/icecubeapp"
},
{
"id": "bridge-23-app",
"name": "Bridge 23",
"oneLiner": "Bridge 23 is a fully featured data marketplace running on ICP where everyone can sell their data directly to merchants, companies and institutions.",
"description": "Bridge 23 is a fully featured data marketplace running on ICP where everyone can sell their data directly to merchants, companies and institutions.",
"stats": "5000+ waitlist, 100+ users, 4000+ tokenized products",
"website": "https://alpha.bridge23.app/login",
"logo": "/img/showcase/bridge23_logo.png",
"display": "Normal",
"tags": [
"Tools / Infrastructure"
],
"usesInternetIdentity": true,
"github": "https://github.com/bridge-23/Bridge23app.0.1.0-alpha",
"twitter": "https://x.com/bridge23inc"
},
{
"id": "event-hub-attention-dao",
"name": "Event Hub",
Expand Down Expand Up @@ -4822,28 +4688,6 @@
"github": "https://github.com/supaIC/Cipher-AI-Vault",
"website": "https://qehbq-rqaaa-aaaan-ql2iq-cai.icp0.io/"
},
{
"id": "scoge",
"name": "SCOGÉ Universe",
"oneLiner": "T.A.O.S City’s finest distributor of Luxury Fashion and Consumer goods",
"website": "https://uqjdj-siaaa-aaaag-aaoxq-cai.icp0.io",
"tags": [
"NFT",
"Metaverse",
"Games"
],
"description": "SCOGÉ is a cutting-edge fashion-centric gamified metaverse platform that revolutionizes the way styles are born, stories are told, and interaction between users. Users embark on an enthralling journey, wielding unique powers to craft thrilling experiences while discovering T.A.O.S City and the evolving SCOGÉ Universe.",
"logo": "/img/showcase/scoge_logo.webp",
"display": "Normal",
"usesInternetIdentity": false,
"twitter": "https://twitter.com/_scoge_",
"screenshots": [
"/img/showcase/scoge_screenshots.webp"
],
"video": "/img/showcase/scoge_video.mp4",
"videoContentType": "video/mp4",
"submittableId": "34276514"
},
{
"id": "zkLama",
"name": "zkLama",
Expand Down Expand Up @@ -4998,4 +4842,4 @@
"github": "https://github.com/tolgayayci/dfx-dashboard",
"website": "https://dfx-dashboard-docs.netlify.app/"
}
]
]

0 comments on commit d0158fe

Please sign in to comment.