diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 00000000..0bef3c15 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,11 @@ +# To get started with Dependabot version updates, you'll need to specify which +# package ecosystems to update and where the package manifests are located. +# Please see the documentation for all configuration options: +# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates + +version: 2 +updates: + - package-ecosystem: "cargo" # See documentation for possible values + directory: "/grabber/" # Location of package manifests + schedule: + interval: "daily" diff --git a/.github/workflows/annotate_code.yml b/.github/workflows/annotate_code.yml new file mode 100644 index 00000000..e3338af7 --- /dev/null +++ b/.github/workflows/annotate_code.yml @@ -0,0 +1,17 @@ +on: push +name: Annotate code +jobs: + clippy_check: + name: Annotate code + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v1 + - uses: actions-rs/toolchain@v1 + with: + toolchain: nightly + components: clippy + override: true + - uses: actions-rs/clippy-check@v1 + with: + token: ${{ secrets.GITHUB_TOKEN }} + args: --manifest-path grabber/Cargo.toml --all-features diff --git a/.github/workflows/audit_on_change.yml b/.github/workflows/audit_on_change.yml new file mode 100644 index 00000000..0a6e5efa --- /dev/null +++ b/.github/workflows/audit_on_change.yml @@ -0,0 +1,15 @@ +name: Dependency security audit (on change) +on: + push: + paths: + - '**/Cargo.toml' + - '**/Cargo.lock' +jobs: + security_audit: + name: Security audit + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions-rs/audit-check@v1 + with: + token: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file diff --git a/.github/workflows/check_code.yml b/.github/workflows/check_code.yml new file mode 100644 index 00000000..22a71436 --- /dev/null +++ b/.github/workflows/check_code.yml @@ -0,0 +1,29 @@ +on: [push] + +name: Evaluate codebase + +jobs: + code_check: + name: Evaluate codebase + runs-on: ubuntu-latest + steps: + - name: Checkout codebase + uses: actions/checkout@v2 + with: + token: ${{ secrets.GITHUB_TOKEN }} + - name: Setup Rust toolchain + uses: actions-rs/toolchain@v1 + with: + toolchain: nightly + components: clippy, rustfmt + profile: minimal + - name: Check codebase is properly formatted + uses: actions-rs/cargo@v1 + with: + command: fmt + args: --manifest-path grabber/Cargo.toml -- --check + - name: Check codebase using linter + uses: actions-rs/cargo@v1 + with: + command: clippy + args: --manifest-path grabber/Cargo.toml --all-targets --all-features -- -D warnings diff --git a/.github/workflows/fix_code.yml b/.github/workflows/fix_code.yml new file mode 100644 index 00000000..1dc7bb7b --- /dev/null +++ b/.github/workflows/fix_code.yml @@ -0,0 +1,38 @@ +on: + push: + branches: + - master + +name: Revise codebase + +jobs: + code_fix: + name: Revise codebase + runs-on: ubuntu-latest + steps: + - name: Checkout codebase + uses: actions/checkout@v2 + with: + token: ${{ secrets.GITHUB_TOKEN }} + - name: Setup Rust toolchain + uses: actions-rs/toolchain@v1 + with: + toolchain: nightly + profile: minimal + components: clippy, rustfmt + - name: Install 'cargo-fix' + uses: actions-rs/cargo@v1 + with: + command: install + args: cargo-fix + - name: Revise code files + uses: actions-rs/cargo@v1 + with: + command: fix + args: --manifest-path grabber/Cargo.toml + - name: Commit changes to code, if any + run: | + git config --global user.name 'Dirout' + git config --global user.email 'Dirout@users.noreply.github.com' + git diff --quiet && git diff --staged --quiet || git commit -am "Automatically apply compiler suggestions" + git push diff --git a/.github/workflows/format_code.yml b/.github/workflows/format_code.yml new file mode 100644 index 00000000..3b86de7c --- /dev/null +++ b/.github/workflows/format_code.yml @@ -0,0 +1,33 @@ +on: + push: + branches: + - master + +name: Format codebase + +jobs: + code_format: + name: Format codebase + runs-on: ubuntu-latest + steps: + - name: Checkout codebase + uses: actions/checkout@v2 + with: + token: ${{ secrets.GITHUB_TOKEN }} + - name: Setup Rust toolchain + uses: actions-rs/toolchain@v1 + with: + toolchain: nightly + profile: minimal + components: clippy, rustfmt + - name: Format code files + uses: actions-rs/cargo@v1 + with: + command: fmt + args: --manifest-path grabber/Cargo.toml + - name: Commit changes to code, if any + run: | + git config --global user.name 'Dirout' + git config --global user.email 'Dirout@users.noreply.github.com' + git diff --quiet && git diff --staged --quiet || git commit -am "Automatically enforce Rust styleguide" + git push diff --git a/.github/workflows/gh-pages-scheduled.yml b/.github/workflows/gh-pages-scheduled.yml new file mode 100644 index 00000000..8c0d1847 --- /dev/null +++ b/.github/workflows/gh-pages-scheduled.yml @@ -0,0 +1,75 @@ +name: Publish to GitHub Pages (scheduled) + +on: + schedule: + - cron: '0 0 * * *' + +jobs: + build: + + runs-on: ubuntu-latest + name: "Publish" + + steps: + - name: Install Dokkoo + run: | + curl -s https://raw.githubusercontent.com/Dirout/dokkoo/master/Cargo.toml --output Cargo.toml > /dev/null + version=$( awk -F ' = ' '$1 ~ /version/ { gsub(/[\"]/, "", $2); printf("%s",$2) }' Cargo.toml ) + curl -s -L https://github.com/Dirout/dokkoo/releases/download/v${version}/dokkoo_${version}_amd64.deb --output dokkoo_${version}_amd64.deb > /dev/null + sudo apt-get -qq install ./dokkoo_${version}_amd64.deb > /dev/null + printf "Installed Dokkoo v${version}" + - name: Checkout Mokk + uses: actions/checkout@v2 + with: + path: ./mokk + - name: Checkout GitHub Pages environment + uses: actions/checkout@v2 + with: + ref: gh-pages + path: ./gh-pages + token: ${{ secrets.GITHUB_TOKEN }} + - name: Setup Rust toolchain + uses: actions-rs/toolchain@v1 + with: + toolchain: nightly + profile: minimal + target: x86_64-unknown-linux-gnu + override: true + - name: Build GitHub grabber + uses: actions-rs/cargo@v1 + with: + command: build + args: --manifest-path mokk/grabber/Cargo.toml --release --all-features --target x86_64-unknown-linux-gnu + - name: Grab GitHub data + run: | + strip -v --strip-all ./mokk/grabber/target/x86_64-unknown-linux-gnu/release/grabber + chmod +x ./mokk/grabber/target/x86_64-unknown-linux-gnu/release/grabber + ./mokk/grabber/target/x86_64-unknown-linux-gnu/release/grabber ./mokk + - name: Build + run: | + sudo apt-get -qq install tree > /dev/null + find ./gh-pages -mindepth 1 ! -regex '^./gh-pages/.git\(/.*\)?' -delete + cd ./mokk + printf "\nBuilding … \n" && dokkoo build . + cd ../ + ls ./mokk + cp -ar ./mokk/output/* ./gh-pages + cp -ar ./mokk/assets ./gh-pages + cp -ar ./mokk/branding/vector ./gh-pages/assets/icons + cp -ar ./mokk/keybase.txt ./gh-pages + if [ -f "./gh-pages/postbuild.sh" ]; then + chmod +x ./gh-pages/postbuild.sh && ./gh-pages/postbuild.sh + fi + touch ./gh-pages/.nojekyll + tee -a ./gh-pages/.nojekyll > /dev/null < /dev/null + version=$( awk -F ' = ' '$1 ~ /version/ { gsub(/[\"]/, "", $2); printf("%s",$2) }' Cargo.toml ) + curl -s -L https://github.com/Dirout/dokkoo/releases/download/v${version}/dokkoo_${version}_amd64.deb --output dokkoo_${version}_amd64.deb > /dev/null + sudo apt-get -qq install ./dokkoo_${version}_amd64.deb > /dev/null + printf "Installed Dokkoo v${version}" + - name: Checkout Mokk + uses: actions/checkout@v2 + with: + path: ./mokk + - name: Checkout GitHub Pages environment + uses: actions/checkout@v2 + with: + ref: gh-pages + path: ./gh-pages + token: ${{ secrets.GITHUB_TOKEN }} + - name: Setup Rust toolchain + uses: actions-rs/toolchain@v1 + with: + toolchain: nightly + profile: minimal + target: x86_64-unknown-linux-gnu + override: true + - name: Build GitHub grabber + uses: actions-rs/cargo@v1 + with: + command: build + args: --manifest-path mokk/grabber/Cargo.toml --release --all-features --target x86_64-unknown-linux-gnu + - name: Grab GitHub data + run: | + strip -v --strip-all ./mokk/grabber/target/x86_64-unknown-linux-gnu/release/grabber + chmod +x ./mokk/grabber/target/x86_64-unknown-linux-gnu/release/grabber + ./mokk/grabber/target/x86_64-unknown-linux-gnu/release/grabber ./mokk + - name: Build + run: | + sudo apt-get -qq install tree > /dev/null + find ./gh-pages -mindepth 1 ! -regex '^./gh-pages/.git\(/.*\)?' -delete + cd ./mokk + printf "\nBuilding … \n" && dokkoo build . + cd ../ + ls ./mokk + cp -ar ./mokk/output/* ./gh-pages + cp -ar ./mokk/assets ./gh-pages + cp -ar ./mokk/branding/vector ./gh-pages/assets/icons + cp -ar ./mokk/keybase.txt ./gh-pages + if [ -f "./gh-pages/postbuild.sh" ]; then + chmod +x ./gh-pages/postbuild.sh && ./gh-pages/postbuild.sh + fi + touch ./gh-pages/.nojekyll + tee -a ./gh-pages/.nojekyll > /dev/null < + + + + + + + + #ffcc00 + + + diff --git a/assets/icons/favicon-16x16.png b/assets/icons/favicon-16x16.png new file mode 100644 index 00000000..7bc68a24 Binary files /dev/null and b/assets/icons/favicon-16x16.png differ diff --git a/assets/icons/favicon-32x32.png b/assets/icons/favicon-32x32.png new file mode 100644 index 00000000..3c87b013 Binary files /dev/null and b/assets/icons/favicon-32x32.png differ diff --git a/assets/icons/favicon.ico b/assets/icons/favicon.ico new file mode 100644 index 00000000..574ba09a Binary files /dev/null and b/assets/icons/favicon.ico differ diff --git a/assets/icons/mstile-144x144.png b/assets/icons/mstile-144x144.png new file mode 100644 index 00000000..86a52fe2 Binary files /dev/null and b/assets/icons/mstile-144x144.png differ diff --git a/assets/icons/mstile-150x150.png b/assets/icons/mstile-150x150.png new file mode 100644 index 00000000..f7ed4279 Binary files /dev/null and b/assets/icons/mstile-150x150.png differ diff --git a/assets/icons/mstile-310x150.png b/assets/icons/mstile-310x150.png new file mode 100644 index 00000000..94d70b18 Binary files /dev/null and b/assets/icons/mstile-310x150.png differ diff --git a/assets/icons/mstile-310x310.png b/assets/icons/mstile-310x310.png new file mode 100644 index 00000000..539b5d45 Binary files /dev/null and b/assets/icons/mstile-310x310.png differ diff --git a/assets/icons/mstile-70x70.png b/assets/icons/mstile-70x70.png new file mode 100644 index 00000000..ee924da7 Binary files /dev/null and b/assets/icons/mstile-70x70.png differ diff --git a/assets/icons/safari-pinned-tab.svg b/assets/icons/safari-pinned-tab.svg new file mode 100644 index 00000000..a68c44ad --- /dev/null +++ b/assets/icons/safari-pinned-tab.svg @@ -0,0 +1 @@ +Created by potrace 1.11, written by Peter Selinger 2001-2013 \ No newline at end of file diff --git a/assets/icons/site.webmanifest b/assets/icons/site.webmanifest new file mode 100644 index 00000000..7ef280cf --- /dev/null +++ b/assets/icons/site.webmanifest @@ -0,0 +1,53 @@ +{ + "name": "", + "short_name": "", + "icons": [ + { + "src": "android-chrome-36x36.png", + "sizes": "36x36", + "type": "image/png" + }, + { + "src": "android-chrome-48x48.png", + "sizes": "48x48", + "type": "image/png" + }, + { + "src": "android-chrome-72x72.png", + "sizes": "72x72", + "type": "image/png" + }, + { + "src": "android-chrome-96x96.png", + "sizes": "96x96", + "type": "image/png" + }, + { + "src": "android-chrome-144x144.png", + "sizes": "144x144", + "type": "image/png" + }, + { + "src": "android-chrome-192x192.png", + "sizes": "192x192", + "type": "image/png" + }, + { + "src": "android-chrome-256x256.png", + "sizes": "256x256", + "type": "image/png" + }, + { + "src": "android-chrome-384x384.png", + "sizes": "384x384", + "type": "image/png" + }, + { + "src": "android-chrome-512x512.png", + "sizes": "512x512", + "type": "image/png" + } + ], + "theme_color": "#ffffff", + "background_color": "#ffffff" +} diff --git a/assets/stylesheet.css b/assets/stylesheet.css new file mode 100644 index 00000000..3342aacb --- /dev/null +++ b/assets/stylesheet.css @@ -0,0 +1,110 @@ +a { + text-decoration: none; + color: rgb(255,59,48); +} + +a:hover { + text-decoration: none; + color: #d70015; +} + +* { + cursor: default !important; +} + +*:hover { + cursor: default !important; +} + +.btn:hover { + cursor: default; +} + +.container { + margin-left: 1rem; + margin-top: 1rem; + display: ruby; +} + +.card-body > * { + margin-bottom: 0.5rem; + max-width: fit-content; +} + +.card-footer { + margin-top: 1rem; + min-width: max-content; + width: max-content; + background: #fff; +} + +.card > * { + margin-top: 0.5rem; + max-width: fit-content; +} + +.card { + min-width: auto; + border-radius: 1rem; + margin: 0.5rem; +} + +.btn { + padding-bottom: 0.333rem; +} + +.btn > span { + padding-bottom: 0.25rem; +} + +.repo-buttons { + margin-top: 0.5rem; + padding-top: 0.1rem; + margin-bottom: 0.4rem +} + +body { + font:16px/1 "Inter", Helvetica, Arial, sans-serif; + color: #666; + -webkit-font-smoothing: antialiased; + text-rendering: optimizeLegibility; + width: 11in; + height: 8.5in; + margin: auto; + background: #ff3a30; +} + +h1 { + font-size: 30px; + letter-spacing: -1px; + color: #222; + font-weight: bold; +} + +h3 { + font: normal 17px/1.5em "Inter",Helvetica,Arial,sans-serif; + color: #aaa; + font-weight: bold; +} + +h2 { + font-size: 24px; + letter-spacing: -1px; + color: #666; + font-weight: bold; +} + +p.small { + color: #bbb; + font-size: 14px; + line-height: 1.5; +} + +.center { + text-align: center; + margin: auto; +} + +p { + line-height: 1.25; +} diff --git a/branding/ancient/EMIL.png b/branding/ancient/EMIL.png new file mode 100644 index 00000000..cbcc05a2 Binary files /dev/null and b/branding/ancient/EMIL.png differ diff --git a/branding/ancient/EMIL.psd b/branding/ancient/EMIL.psd new file mode 100755 index 00000000..0a76c70e Binary files /dev/null and b/branding/ancient/EMIL.psd differ diff --git a/branding/ancient/EMIL_8meg.png b/branding/ancient/EMIL_8meg.png new file mode 100755 index 00000000..08acbebb Binary files /dev/null and b/branding/ancient/EMIL_8meg.png differ diff --git a/branding/ancient/EMIL_bigtext.png b/branding/ancient/EMIL_bigtext.png new file mode 100644 index 00000000..a99b58fc Binary files /dev/null and b/branding/ancient/EMIL_bigtext.png differ diff --git a/branding/ancient/EMIL_bigtext.psd b/branding/ancient/EMIL_bigtext.psd new file mode 100755 index 00000000..544fc1e5 Binary files /dev/null and b/branding/ancient/EMIL_bigtext.psd differ diff --git a/branding/ancient/EMIL_twitter.png b/branding/ancient/EMIL_twitter.png new file mode 100644 index 00000000..4fb0a23a Binary files /dev/null and b/branding/ancient/EMIL_twitter.png differ diff --git a/branding/ancient/EMIL_twitter.psd b/branding/ancient/EMIL_twitter.psd new file mode 100755 index 00000000..de6234da Binary files /dev/null and b/branding/ancient/EMIL_twitter.psd differ diff --git a/branding/ancient/SAYAHI.png b/branding/ancient/SAYAHI.png new file mode 100644 index 00000000..75caf6cc Binary files /dev/null and b/branding/ancient/SAYAHI.png differ diff --git a/branding/ancient/SAYAHI.psd b/branding/ancient/SAYAHI.psd new file mode 100755 index 00000000..ecf32305 Binary files /dev/null and b/branding/ancient/SAYAHI.psd differ diff --git a/branding/ancient/SAYAHI_bigtext.png b/branding/ancient/SAYAHI_bigtext.png new file mode 100644 index 00000000..6ffe2159 Binary files /dev/null and b/branding/ancient/SAYAHI_bigtext.png differ diff --git a/branding/ancient/SAYAHI_bigtext.psd b/branding/ancient/SAYAHI_bigtext.psd new file mode 100755 index 00000000..c2f7cb38 Binary files /dev/null and b/branding/ancient/SAYAHI_bigtext.psd differ diff --git a/branding/ancient/SAYAHI_bigtext_lowres.png b/branding/ancient/SAYAHI_bigtext_lowres.png new file mode 100644 index 00000000..63aa00a2 Binary files /dev/null and b/branding/ancient/SAYAHI_bigtext_lowres.png differ diff --git a/branding/ancient/SAYAHI_lowres.png b/branding/ancient/SAYAHI_lowres.png new file mode 100644 index 00000000..30c3feeb Binary files /dev/null and b/branding/ancient/SAYAHI_lowres.png differ diff --git a/branding/ancient/emi.png b/branding/ancient/emi.png new file mode 100644 index 00000000..11596166 Binary files /dev/null and b/branding/ancient/emi.png differ diff --git a/branding/ancient/emi.psd b/branding/ancient/emi.psd new file mode 100755 index 00000000..4ebb7ed6 Binary files /dev/null and b/branding/ancient/emi.psd differ diff --git a/branding/ancient/emi_fall.png b/branding/ancient/emi_fall.png new file mode 100644 index 00000000..22d78eaa Binary files /dev/null and b/branding/ancient/emi_fall.png differ diff --git a/branding/ancient/emi_fall.psd b/branding/ancient/emi_fall.psd new file mode 100755 index 00000000..02029747 Binary files /dev/null and b/branding/ancient/emi_fall.psd differ diff --git a/branding/ancient/emi_pop.png b/branding/ancient/emi_pop.png new file mode 100644 index 00000000..2777b793 Binary files /dev/null and b/branding/ancient/emi_pop.png differ diff --git a/branding/ancient/emi_pop.psd b/branding/ancient/emi_pop.psd new file mode 100755 index 00000000..1505a669 Binary files /dev/null and b/branding/ancient/emi_pop.psd differ diff --git a/branding/ancient/emi_summer.png b/branding/ancient/emi_summer.png new file mode 100644 index 00000000..c8b5b437 Binary files /dev/null and b/branding/ancient/emi_summer.png differ diff --git a/branding/ancient/emi_summer.psd b/branding/ancient/emi_summer.psd new file mode 100755 index 00000000..b50a7d76 Binary files /dev/null and b/branding/ancient/emi_summer.psd differ diff --git a/branding/ancient/emi_winter+big+contrast+move.png b/branding/ancient/emi_winter+big+contrast+move.png new file mode 100644 index 00000000..ce155869 Binary files /dev/null and b/branding/ancient/emi_winter+big+contrast+move.png differ diff --git a/branding/ancient/emi_winter+big+contrast+move.psd b/branding/ancient/emi_winter+big+contrast+move.psd new file mode 100755 index 00000000..d41d31ea Binary files /dev/null and b/branding/ancient/emi_winter+big+contrast+move.psd differ diff --git a/branding/ancient/emi_winter+big+contrast.png b/branding/ancient/emi_winter+big+contrast.png new file mode 100644 index 00000000..59855802 Binary files /dev/null and b/branding/ancient/emi_winter+big+contrast.png differ diff --git a/branding/ancient/emi_winter+big+contrast.psd b/branding/ancient/emi_winter+big+contrast.psd new file mode 100755 index 00000000..0eaf8966 Binary files /dev/null and b/branding/ancient/emi_winter+big+contrast.psd differ diff --git a/branding/ancient/emi_winter+big.png b/branding/ancient/emi_winter+big.png new file mode 100644 index 00000000..37e5f4e1 Binary files /dev/null and b/branding/ancient/emi_winter+big.png differ diff --git a/branding/ancient/emi_winter+big.psd b/branding/ancient/emi_winter+big.psd new file mode 100755 index 00000000..a08c5f23 Binary files /dev/null and b/branding/ancient/emi_winter+big.psd differ diff --git a/branding/ancient/emi_winter+contrast+move.png b/branding/ancient/emi_winter+contrast+move.png new file mode 100644 index 00000000..d91b6f1b Binary files /dev/null and b/branding/ancient/emi_winter+contrast+move.png differ diff --git a/branding/ancient/emi_winter+contrast+move.psd b/branding/ancient/emi_winter+contrast+move.psd new file mode 100755 index 00000000..de974434 Binary files /dev/null and b/branding/ancient/emi_winter+contrast+move.psd differ diff --git a/branding/ancient/emi_winter.png b/branding/ancient/emi_winter.png new file mode 100644 index 00000000..696e3466 Binary files /dev/null and b/branding/ancient/emi_winter.png differ diff --git a/branding/ancient/emi_winter.psd b/branding/ancient/emi_winter.psd new file mode 100755 index 00000000..5c774312 Binary files /dev/null and b/branding/ancient/emi_winter.psd differ diff --git a/branding/ancient/emil2.png b/branding/ancient/emil2.png new file mode 100644 index 00000000..8f36ae91 Binary files /dev/null and b/branding/ancient/emil2.png differ diff --git a/branding/ancient/emsa.png b/branding/ancient/emsa.png new file mode 100644 index 00000000..9f1903d4 Binary files /dev/null and b/branding/ancient/emsa.png differ diff --git a/branding/ancient/emsa.psd b/branding/ancient/emsa.psd new file mode 100755 index 00000000..d330fb71 Binary files /dev/null and b/branding/ancient/emsa.psd differ diff --git a/branding/ancient/emsa_ban.png b/branding/ancient/emsa_ban.png new file mode 100644 index 00000000..9b7ac9fb Binary files /dev/null and b/branding/ancient/emsa_ban.png differ diff --git a/branding/ancient/emsa_ban.psd b/branding/ancient/emsa_ban.psd new file mode 100755 index 00000000..ae7762b2 Binary files /dev/null and b/branding/ancient/emsa_ban.psd differ diff --git a/branding/ancient/emsa_round.png b/branding/ancient/emsa_round.png new file mode 100644 index 00000000..1bc7f531 Binary files /dev/null and b/branding/ancient/emsa_round.png differ diff --git a/branding/ancient/emsa_round.psd b/branding/ancient/emsa_round.psd new file mode 100755 index 00000000..04d0bd39 Binary files /dev/null and b/branding/ancient/emsa_round.psd differ diff --git a/branding/ancient/wrimpus.piskel b/branding/ancient/wrimpus.piskel new file mode 100755 index 00000000..113b15d5 --- /dev/null +++ b/branding/ancient/wrimpus.piskel @@ -0,0 +1 @@ +{"modelVersion":2,"piskel":{"name":"New Piskel","description":"","fps":12,"height":32,"width":32,"layers":["{\"name\":\"Layer 1\",\"opacity\":1,\"frameCount\":1,\"chunks\":[{\"layout\":[[0]],\"base64PNG\":\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAABiElEQVRYR2N0dpr/n2EAAeOoA2gRAt+/v2Lg5BQjKmJpFgXEOoJqDrh5cy7cx+rqyWA2MY6gigNAlsMsBbHl5HzhUUDIERQ7AGb5xycNDC++yjIIa7CDfS/yP4aoUKDIAeg+B1n++pop2GJNTXXaJ0LkeIdZLi3tCraYj+8R7R0AswEUz1+5doF9D3IAsZaD9BMVBadPr2Dg4/uKkcqJ8iIBRQQdALMcOZXD2CCzzQ03M5w87wunSXUUXgcgWw5L5aAsdvflTLA9Ogq1YJoSRxAMAVhKh+VvkOVyQrOxJjSYQ9BDAV9ZQJQDQAbCfA6yHJTIUh4/Z5gjKwm3C2Q5CICig6oOQDbsyoNmsO9hDgDJITsCWe17nYsMglf0CRZGeEOAUDGKL8FRxQEgC5AdYc/+jOHgTymwGAzgqnap5gCYRTDL8TkCZCkyoDgK0IMYZjmpeZ2iXIBsGTlpgpAegtkQW5YCiRHb5CIUWiQ7AGYgLCFS6hCyHUDIZ8TKjzpgNARGQ2DAQwAAyWAEkLezfHsAAAAASUVORK5CYII=\"}]}"]}} \ No newline at end of file diff --git a/branding/ancient/wrimpus.png b/branding/ancient/wrimpus.png new file mode 100644 index 00000000..8225fa4d Binary files /dev/null and b/branding/ancient/wrimpus.png differ diff --git a/branding/ancient/wrimpus_banner.pdn b/branding/ancient/wrimpus_banner.pdn new file mode 100755 index 00000000..3452eba6 Binary files /dev/null and b/branding/ancient/wrimpus_banner.pdn differ diff --git a/branding/ancient/wrimpus_banner.png b/branding/ancient/wrimpus_banner.png new file mode 100644 index 00000000..986ac010 Binary files /dev/null and b/branding/ancient/wrimpus_banner.png differ diff --git a/branding/ancient/wrimpus_banner_tipping.pdn b/branding/ancient/wrimpus_banner_tipping.pdn new file mode 100755 index 00000000..d1893400 Binary files /dev/null and b/branding/ancient/wrimpus_banner_tipping.pdn differ diff --git a/branding/ancient/wrimpus_banner_tipping.png b/branding/ancient/wrimpus_banner_tipping.png new file mode 100644 index 00000000..5fe8fa8b Binary files /dev/null and b/branding/ancient/wrimpus_banner_tipping.png differ diff --git a/branding/ancient/wrimpus_banner_yt.pdn b/branding/ancient/wrimpus_banner_yt.pdn new file mode 100755 index 00000000..ba05401a Binary files /dev/null and b/branding/ancient/wrimpus_banner_yt.pdn differ diff --git a/branding/ancient/wrimpus_banner_yt.png b/branding/ancient/wrimpus_banner_yt.png new file mode 100644 index 00000000..e4d28c70 Binary files /dev/null and b/branding/ancient/wrimpus_banner_yt.png differ diff --git a/branding/ancient/wrimpus_cropped.png b/branding/ancient/wrimpus_cropped.png new file mode 100644 index 00000000..71815f5a Binary files /dev/null and b/branding/ancient/wrimpus_cropped.png differ diff --git a/branding/ancient/wrimpus_crystal.png b/branding/ancient/wrimpus_crystal.png new file mode 100644 index 00000000..5f5019a9 Binary files /dev/null and b/branding/ancient/wrimpus_crystal.png differ diff --git a/branding/ancient/wrimpus_tier1.png b/branding/ancient/wrimpus_tier1.png new file mode 100644 index 00000000..9d3bef33 Binary files /dev/null and b/branding/ancient/wrimpus_tier1.png differ diff --git a/branding/ancient/wrimpus_tier2.png b/branding/ancient/wrimpus_tier2.png new file mode 100644 index 00000000..043c1a75 Binary files /dev/null and b/branding/ancient/wrimpus_tier2.png differ diff --git a/branding/ancient/wrimpus_tier3.png b/branding/ancient/wrimpus_tier3.png new file mode 100644 index 00000000..2bedafec Binary files /dev/null and b/branding/ancient/wrimpus_tier3.png differ diff --git a/branding/vector/logo.svg b/branding/vector/logo.svg new file mode 100644 index 00000000..a678393b --- /dev/null +++ b/branding/vector/logo.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/branding/vector/logo_grey.svg b/branding/vector/logo_grey.svg new file mode 100644 index 00000000..45a059fd --- /dev/null +++ b/branding/vector/logo_grey.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/branding/vector/logo_red.svg b/branding/vector/logo_red.svg new file mode 100644 index 00000000..bc83fe84 --- /dev/null +++ b/branding/vector/logo_red.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/branding/vector/logo_uncropped.svg b/branding/vector/logo_uncropped.svg new file mode 100644 index 00000000..eb4d99b2 --- /dev/null +++ b/branding/vector/logo_uncropped.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/branding/vector/logo_yellow.svg b/branding/vector/logo_yellow.svg new file mode 100644 index 00000000..58c12a20 --- /dev/null +++ b/branding/vector/logo_yellow.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/branding/vector/logo_yellow_square.svg b/branding/vector/logo_yellow_square.svg new file mode 100644 index 00000000..0039d8c9 --- /dev/null +++ b/branding/vector/logo_yellow_square.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/branding/web/logo_github.png b/branding/web/logo_github.png new file mode 100644 index 00000000..d2214ade Binary files /dev/null and b/branding/web/logo_github.png differ diff --git a/grabber/Cargo.toml b/grabber/Cargo.toml new file mode 100644 index 00000000..72cab723 --- /dev/null +++ b/grabber/Cargo.toml @@ -0,0 +1,15 @@ +[package] +name = "grabber" +version = "0.1.0" +authors = ["Emil Sayahi "] +edition = "2018" + +# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html + +[dependencies] +chrono = { version = "0.4.19", features = ["unstable-locales"] } +clap = { version = "3.0.0-beta.2", features = ["yaml", "wrap_help", "suggestions", "color"] } +octocrab = "0.15.3" +serde = "1.0.127" +serde_yaml = "0.8.17" +tokio = { version = "1.1.1", features = ["macros", "rt-multi-thread"] } \ No newline at end of file diff --git a/grabber/src/main.rs b/grabber/src/main.rs new file mode 100644 index 00000000..f3a5e327 --- /dev/null +++ b/grabber/src/main.rs @@ -0,0 +1,134 @@ +use clap::clap_app; +use octocrab::params; +use serde::{Deserialize, Serialize}; +use std::env; +use std::fs; +use std::fs::File; +use std::io::BufWriter; +use std::io::Write; +use std::path::Path; + +const VERSION: Option<&'static str> = option_env!("CARGO_PKG_VERSION"); + +#[derive(Clone, Debug, Serialize, Deserialize)] +struct Repository { + archived: bool, + forked: bool, + title: String, + description: String, + has_issues: bool, + has_license: bool, + html_url: String, + license_id: String, + license_name: String, + open_issues_count: u32, + pushed_at: String, + date: String, + stargazers_count: u32, +} + +#[tokio::main] +async fn main() { + let matches = clap_app!(myapp => + (version: VERSION.unwrap()) + (author: "Emil Sayahi ") + (@arg INPUT: "The working directory of the grabber") + ) + .get_matches(); + env::set_current_dir(matches.value_of("INPUT").unwrap()).unwrap(); + let octocrab; + match fs::read_to_string("./token.txt") { + Ok(_) => { + octocrab = octocrab::OctocrabBuilder::new() + .personal_token(fs::read_to_string("./token.txt").unwrap()) + .build() + .unwrap(); + } + Err(_) => { + octocrab = octocrab::OctocrabBuilder::new().build().unwrap(); + } + } + + let organizations = ["Dirout"]; + let mut repositories = vec![]; + for organization in &organizations { + let organization = octocrab.orgs(organization.to_owned()); + let listing = organization + .list_repos() + .sort(params::repos::Sort::Pushed) + .per_page(100) + .send() + .await + .unwrap(); + for repository in listing.items { + let license_id; + let license_name; + match &repository.license { + Some(license) => { + license_id = license.clone().spdx_id.to_lowercase(); + license_name = license.clone().name; + } + None => { + license_id = String::new(); + license_name = String::new(); + } + } + + let description; + match repository.description { + Some(gh_description) => { + description = gh_description; + } + None => { + description = String::new(); + } + } + + let open_issues_count; + match repository.has_issues.unwrap() { + true => { + open_issues_count = repository.open_issues_count.unwrap(); + } + false => { + open_issues_count = 0; + } + } + + let structured_data = Repository { + archived: repository.archived.unwrap(), + forked: repository.fork, + title: repository.name, + description: description.to_owned(), + has_issues: repository.has_issues.unwrap(), + has_license: repository.license.is_some(), + html_url: repository.html_url.to_string(), + license_id: license_id.to_owned(), + license_name: license_name.to_owned(), + open_issues_count, + pushed_at: repository.pushed_at.unwrap().to_rfc3339(), + date: repository.pushed_at.unwrap().to_rfc3339(), + stargazers_count: repository.stargazers_count.unwrap(), + }; + repositories.push(structured_data); + } + } + + for i in 0..repositories.len() { + let file_contents = &serde_yaml::to_string(&repositories[i]).unwrap(); + write_file( + format!("./repos/{}.mokkf", i), + format!( + "{}\ncollection: \"repos\"\npermalink: date\n---", + file_contents + ), + ) + } +} + +fn write_file(path: String, text_to_write: String) { + fs::create_dir_all(Path::new(&path[..]).parent().unwrap()).unwrap(); // Create output path, write to file + let file = File::create(&path).unwrap(); // Create file which we will write to + let mut buffered_writer = BufWriter::new(file); // Create a buffered writer, allowing us to modify the file we've just created + write!(buffered_writer, "{}", text_to_write).unwrap(); // Write String to file + buffered_writer.flush().unwrap(); // Empty out the data in memory after we've written to the file +} diff --git a/index.html b/index.html deleted file mode 100644 index f0f1c4d6..00000000 --- a/index.html +++ /dev/null @@ -1,3 +0,0 @@ - - - \ No newline at end of file diff --git a/index.mokkf b/index.mokkf new file mode 100644 index 00000000..7c32f477 --- /dev/null +++ b/index.mokkf @@ -0,0 +1,62 @@ +--- +layout: main +title: "Dirout" +permalink: "index.html" +markdown: false +--- +
+
+ {% assign urls = '' | split: '' %} + {% assign repository_date_rfc_3339 = collections["repos"] | map: 'date' | sort: "rfc_3339" %} + {% for repository_date in repository_date_rfc_3339 reversed %} + {% for repository in collections["repos"] %} + {% if repository.date.rfc_3339 == repository_date.rfc_3339 %} + {% unless urls contains repository.url %} + {% assign urls = urls | push: repository.url %} +
+ + {% if repository.data.archived %} +
Archived
+ {% endif %} +
+ {% if repository.data.fork %} +
{{ repository.data.title }}
+ {% else %} +
{{ repository.data.title }}
+ {% endif %} +

{{ repository.data.description }}

+
+
+ + {% if repository.data.has_issues %} + + {% endif %} +
+ +
+
+ + {% endunless %} + {% endif %} + {%- endfor -%} + {%- endfor -%} +
+
diff --git a/keybase.txt b/keybase.txt new file mode 100644 index 00000000..2b925d71 --- /dev/null +++ b/keybase.txt @@ -0,0 +1,56 @@ +================================================================== +https://keybase.io/emilsayahi +-------------------------------------------------------------------- + +I hereby claim: + + * I am an admin of https://emilsayahi.cf + * I am emilsayahi (https://keybase.io/emilsayahi) on keybase. + * I have a public key ASDrh_x0UBl5bOPYwIruGNW9rZpRF_zBW95FUQcwIr1ktQo + +To do so, I am signing this object: + +{ + "body": { + "key": { + "eldest_kid": "0120eb87fc745019796ce3d8c08aee18d5bdad9a5117fcc15bde4551073022bd64b50a", + "host": "keybase.io", + "kid": "0120eb87fc745019796ce3d8c08aee18d5bdad9a5117fcc15bde4551073022bd64b50a", + "uid": "1d213dbb7f0fec9ec1ff003299aec419", + "username": "emilsayahi" + }, + "merkle_root": { + "ctime": 1530871893, + "hash": "3a6b03e35fb5a2167d944c0802e480de183cb3ad6c9e58a5d49e56fec0fc673d42cce52a3e18859e65eb04e54a866c4e8113275fb9dc3474156abf42a09ccebc", + "hash_meta": "90509324f61bdb903b6e00f4771fd4a7c2c760d99678d2e32bcc816aff76c83f", + "seqno": 3208420 + }, + "service": { + "entropy": "dL2NSKwt0oiVXBCOz2zBwuAU", + "hostname": "emilsayahi.cf", + "protocol": "https:" + }, + "type": "web_service_binding", + "version": 2 + }, + "client": { + "name": "keybase.io go client", + "version": "2.1.2" + }, + "ctime": 1530871962, + "expire_in": 504576000, + "prev": "29e418278fdb6c7540f897677bf4520f4c75a31c844904893fe8cefeff82a1f8", + "seqno": 17, + "tag": "signature" +} + +which yields the signature: + +hKRib2R5hqhkZXRhY2hlZMOpaGFzaF90eXBlCqNrZXnEIwEg64f8dFAZeWzj2MCK7hjVva2aURf8wVveRVEHMCK9ZLUKp3BheWxvYWTESpcCEcQgKeQYJ4/bbHVA+Jdne/RSD0x1oxyESQSJP+jO/v+CofjEIDEzp2SgPbWdOhVflwpnPZE094quX9tTsfyv0Dw+6cG7AgHCo3NpZ8RAe1qq390j8g8lxBq77h5zE3GQ0MC6Rd3aIwFPNzG8SLrBULc1psH1loWWPPynk6zjzMEtT6F+AoSJAL+KTzpOBKhzaWdfdHlwZSCkaGFzaIKkdHlwZQildmFsdWXEIAvYMiIUQXBkVwepdWGY1FHIK8r0dtTHeH9fafY1JGwdo3RhZ80CAqd2ZXJzaW9uAQ== + +And finally, I am proving ownership of this host by posting or +appending to this document. + +View my publicly-auditable identity here: https://keybase.io/emilsayahi + +================================================================== diff --git a/layouts/main.mokkf b/layouts/main.mokkf new file mode 100644 index 00000000..49ae37e9 --- /dev/null +++ b/layouts/main.mokkf @@ -0,0 +1,26 @@ +--- +markdown: false +--- + + + + + + + + + + + + + {% include favicon.html %} + {{ page.data.title }} + + +{% include header.html %} +{{ page.content }} + + + + + diff --git a/renovate.json b/renovate.json new file mode 100644 index 00000000..f45d8f11 --- /dev/null +++ b/renovate.json @@ -0,0 +1,5 @@ +{ + "extends": [ + "config:base" + ] +} diff --git a/snippets/favicon.html b/snippets/favicon.html new file mode 100644 index 00000000..aad4b128 --- /dev/null +++ b/snippets/favicon.html @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/snippets/header.html b/snippets/header.html new file mode 100644 index 00000000..81a8c45d --- /dev/null +++ b/snippets/header.html @@ -0,0 +1,9 @@ + +
+ + +Dirout logo + +

Dirout

+ +