generated from NoneMeme/memebox
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
270 changed files
with
651 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
name: Check Similarity Images | ||
|
||
on: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
check-similarity-img: | ||
name: Check Similarity Images | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
ref: ${{ github.ref }} | ||
- name: Set up Python 3.10 | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.10.* | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install Pillow | ||
- name: check similarity images | ||
run: | | ||
python shell/imgcheck.py | ||
- uses: stefanzweifel/git-auto-commit-action@v4 | ||
with: | ||
commit_message: 'chore: update similarity images data' | ||
file_pattern: static/data/similar_images.json | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
name: Generate article page | ||
|
||
on: | ||
push: | ||
branches: | ||
- 'main' | ||
paths: | ||
- 'art/*' | ||
- 'shell/art2text.sh' | ||
- 'shell/genartlist.sh' | ||
- '.github/workflows/generate-article-page.yml' | ||
|
||
jobs: | ||
generate-article-page: | ||
name: Generate article page | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
ref: ${{ github.ref }} | ||
- name: remove previous build | ||
run: | | ||
rm -f ./text/*.html | ||
- name: generate directory | ||
run: | | ||
./shell/genartlist.sh | ||
- name: build article | ||
run: | | ||
./shell/art2text.sh | ||
- uses: stefanzweifel/git-auto-commit-action@v4 | ||
with: | ||
commit_message: 'chore: update article page' | ||
file_pattern: 'text/*.html' | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# This workflow will install Python dependencies, run tests and lint with a single version of Python | ||
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions | ||
|
||
name: Generate config file | ||
|
||
on: | ||
push: | ||
branches: | ||
- 'main' | ||
paths: | ||
- 'meme/**' | ||
- '.github/workflows/generate-config-file.yml' | ||
|
||
jobs: | ||
generate-config-file: | ||
name: Generate config file | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
ref: ${{ github.ref }} | ||
- name: build config | ||
run: | | ||
./shell/computed.sh | ||
cat static/scripts/config.js | ||
- uses: stefanzweifel/git-auto-commit-action@v4 | ||
with: | ||
commit_message: 'chore: update config file' | ||
file_pattern: static/scripts/config.js | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
<!DOCTYPE html> | ||
<html lang="zh"> | ||
|
||
<head> | ||
<meta charset="utf-8"> | ||
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1"> | ||
<meta name="description" content="PCL Community 群大佬们的日常"> | ||
<link rel="icon" href="/static/favicon.ico"> | ||
<title>PCL Community 梗 | PCL Community 群大佬们的日常</title> | ||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@picocss/[email protected]/css/pico.min.css"> | ||
<link rel="stylesheet" href="/static/style.css"> | ||
</head> | ||
|
||
<body> | ||
<main class="container"> | ||
<h1>PCL Community 梗 | <a href="text">文字梗</a></h1> | ||
<h5 id="description"></h5> | ||
<article id="view"> | ||
<div> | ||
<h2></h2> | ||
<div> | ||
<a download title="下载图片"> | ||
<svg width="32" height="32" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg" | ||
fill="currentColor"> | ||
<path | ||
d="M5.36891 8.08074L7.50833 10.2202V4.46802H8.50833V10.1473L10.5749 8.08074L11.282 8.78784L8.32545 11.7444H7.61835L4.6618 8.78784L5.36891 8.08074Z" /> | ||
<path | ||
d="M14 8C14 4.68629 11.3137 2 8 2C4.68629 2 2 4.68629 2 8C2 11.3137 4.68629 14 8 14C11.3137 14 14 11.3137 14 8ZM13 8C13 10.7614 10.7614 13 8 13C5.23858 13 3 10.7614 3 8C3 5.23858 5.23858 3 8 3C10.7614 3 13 5.23858 13 8Z" /> | ||
</svg> | ||
</a> | ||
<span id="refresh-btn" title="梗图不喜欢?换一张试试看"> | ||
<svg width="32" height="32" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg" | ||
fill="currentColor"> | ||
<path fill-rule="evenodd" clip-rule="evenodd" | ||
d="M4.681 3H2V2h3.5l.5.5V6H5V4a5 5 0 1 0 4.53-.761l.302-.954A6 6 0 1 1 4.681 3z" /> | ||
</svg> | ||
</span> | ||
<a href="#" title="返回画廊"> | ||
<svg width="40" height="40" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg" | ||
fill="currentColor"> | ||
<path fill-rule="evenodd" clip-rule="evenodd" | ||
d="M8 8.707l3.646 3.647.708-.707L8.707 8l3.647-3.646-.707-.708L8 7.293 4.354 3.646l-.707.708L7.293 8l-3.646 3.646.707.708L8 8.707z" /> | ||
</svg> | ||
</a> | ||
</div> | ||
</div> | ||
|
||
<img alt="查看大图"> | ||
</article> | ||
<div id="gallery"> | ||
<div class="column" id="col1"></div> | ||
<div class="column" id="col2"></div> | ||
<div class="column" id="col3"></div> | ||
</div> | ||
|
||
<footer id="footer"> | ||
<p>** Footer **</p> | ||
</footer> | ||
</main> | ||
|
||
<template id="gallery-item"> | ||
<article class="item"> | ||
<a href="${id}"> | ||
<img src="${src}" alt="${alt}"> | ||
<span aria-busy="false">${title}</span> | ||
</a> | ||
</article> | ||
</template> | ||
|
||
<script src="./static/scripts/index.js" type="module"></script> | ||
</body> | ||
|
||
</html> |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
#!/usr/bin/env bash | ||
|
||
direrr() { | ||
echo -e "\e[41m[ERROR] You should run me under \e[1;33mthe root of this repository.\e[0m" | ||
exit 1 | ||
} | ||
|
||
[[ -d "art" ]] || direrr | ||
[[ -d "text" ]] || direrr | ||
|
||
for doc in art/*.md | ||
do | ||
echo Converting "'${doc:4}'" ... | ||
cat > "text/${doc:4:-3}.html" <<EOF | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="utf-8"> | ||
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1"> | ||
<meta name="description" content="Joy for Everyone"> | ||
<link rel="icon" href="/static/favicon.ico"> | ||
<title>MemeBox | Joy for Everyone</title> | ||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@picocss/[email protected]/css/pico.min.css"> | ||
<link rel="stylesheet" href="/static/style.css"> | ||
<style> | ||
#view { | ||
text-align: left; | ||
} | ||
</style> | ||
</head> | ||
<body> | ||
<main class="container"> | ||
<h1>MemeBox | <a href="/text">Text memes</a></h1> | ||
<article id="view"> | ||
<github-md> | ||
EOF | ||
cat "$doc" >> "text/${doc:4:-3}.html" | ||
cat >> "text/${doc:4:-3}.html" <<EOF | ||
</github-md> | ||
</article> | ||
<footer id="footer"> | ||
<p>** Footer **</p> | ||
</footer> | ||
</main> | ||
</body> | ||
<script src="https://cdn.jsdelivr.net/gh/MarketingPipeline/Markdown-Tag/markdown-tag.js"></script> | ||
</html> | ||
EOF | ||
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#! /bin/bash | ||
echo 'export default { | ||
items: [' > ./static/scripts/config.js | ||
|
||
find meme -type f -print0 | grep -z -i -E '\.(jpg|png|jfif|webp|gif|jpeg|bmp)$' | sort -z | while IFS= read -r -d '' file_name | ||
do | ||
echo -n ' ' >> ./static/scripts/config.js | ||
echo $(jq -R -c . <<< "$file_name")',' >> ./static/scripts/config.js | ||
# echo ',' >> ./static/scripts/config.js | ||
done | ||
|
||
echo ' ] | ||
}' >> ./static/scripts/config.js |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
#!/usr/bin/env bash | ||
|
||
direrr() { | ||
echo -e "\e[41m[ERROR] You should run me under \e[1;33mthe root of this repository.\e[0m" | ||
exit 1 | ||
} | ||
|
||
titleerr() { | ||
rm -f text/index.html | ||
echo -e "\e[41m[ERROR] The title of the article \e[1;33mcannot be found!\e[0m" | ||
exit 1 | ||
} | ||
|
||
[[ -d "art" ]] || direrr | ||
[[ -d "text" ]] || direrr | ||
|
||
echo "Generating article directory..." | ||
|
||
cat > "text/index.html" <<EOF | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="utf-8"> | ||
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1"> | ||
<meta name="description" content="Joy for Everyone"> | ||
<link rel="icon" href="/static/favicon.ico"> | ||
<title>MemeBox | Joy for Everyone</title> | ||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@picocss/[email protected]/css/pico.min.css"> | ||
<link rel="stylesheet" href="/static/style.css"> | ||
<style> | ||
#view { | ||
text-align: left; | ||
} | ||
</style> | ||
</head> | ||
<body> | ||
<main class="container"> | ||
<h1>MemeBox | <a href="/">Picture memes</a></h1> | ||
<h5 id="description"></h5> | ||
<article id="view"> | ||
<github-md> | ||
> _Text memes description._ | ||
EOF | ||
|
||
for doc in art/*.md | ||
do | ||
echo Adding "'${doc:4:-3}'" ... | ||
title="$(grep -E '^# ' "$doc" | head -n1)" | ||
[[ -z "$title" ]] && titleerr | ||
echo "- [${title:2}](./${doc:4:-3}.html)" >> "text/index.html" | ||
done | ||
|
||
cat >> "text/index.html" <<EOF | ||
</github-md> | ||
</article> | ||
<footer id="footer"> | ||
<p>** Footer **</p> | ||
</footer> | ||
</main> | ||
</body> | ||
<script src="https://cdn.jsdelivr.net/gh/MarketingPipeline/Markdown-Tag/markdown-tag.js"></script> | ||
</html> | ||
EOF |
Oops, something went wrong.