Compare commits
106 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0e6f6711c2 | ||
|
|
5a2d15aeb4 | ||
|
|
80080eae1b | ||
|
|
17f6019c9a | ||
|
|
e3135163b9 | ||
|
|
566e348082 | ||
|
|
7edc3863d8 | ||
|
|
40fb936400 | ||
|
|
77dda8520a | ||
|
|
f2f579f153 | ||
|
|
3006dc6600 | ||
|
|
15e81249ee | ||
|
|
b9f585157d | ||
|
|
10e3fec980 | ||
|
|
dd2446d3a4 | ||
|
|
8831528abe | ||
|
|
f58a3ddfc1 | ||
|
|
d32f5c2416 | ||
|
|
ca3a78c2e4 | ||
|
|
9b5e1badd4 | ||
|
|
cb07a64e57 | ||
|
|
3f07b46c68 | ||
|
|
f191be4534 | ||
|
|
5b8e11f055 | ||
|
|
6532066a74 | ||
|
|
e26eca6726 | ||
|
|
fc82eec6f6 | ||
|
|
c1d763a5f2 | ||
|
|
e7510f8e2f | ||
|
|
f7b7e12ef0 | ||
|
|
c4d5d9be1b | ||
|
|
df8e4c950a | ||
|
|
d4917fb7a2 | ||
|
|
11f5041b43 | ||
|
|
3f9090d712 | ||
|
|
92d18215ec | ||
|
|
df0ad49448 | ||
|
|
49acd47286 | ||
|
|
bd826ec602 | ||
|
|
062785ebb8 | ||
|
|
7a7463fc34 | ||
|
|
713d26ab8c | ||
|
|
f9c2eb1171 | ||
|
|
4591ac4db7 | ||
|
|
cfa50ceb80 | ||
|
|
1c3a92221d | ||
|
|
c11b27ced9 | ||
|
|
6a4f5c531e | ||
|
|
c52acd518f | ||
|
|
0c4c0b7d7c | ||
|
|
f85da61a7a | ||
|
|
bb85866e33 | ||
|
|
96e9a9429e | ||
|
|
542876df31 | ||
|
|
7c14442f20 | ||
|
|
560aeabad1 | ||
|
|
2d9a46451c | ||
|
|
b8b6eb2ef6 | ||
|
|
0b499e70ba | ||
|
|
3f206f5d8c | ||
|
|
574c6fb8f3 | ||
|
|
4dd0822780 | ||
|
|
658ade547b | ||
|
|
dee84befac | ||
|
|
4a5ffd4490 | ||
|
|
97408314e8 | ||
|
|
ce66bf369e | ||
|
|
c2bb903bbd | ||
|
|
dd84520051 | ||
|
|
d6b61ce3ce | ||
|
|
fb34ee1627 | ||
|
|
15380b2617 | ||
|
|
9cc4e39537 | ||
|
|
30852a3286 | ||
|
|
af0154f14d | ||
|
|
94d02ac19b | ||
|
|
79b7b5b8fe | ||
|
|
d1b756ab2a | ||
|
|
982328f3bc | ||
|
|
4ac4f58ceb | ||
|
|
ea253ceb45 | ||
|
|
dcbe142cb0 | ||
|
|
e7ca4de171 | ||
|
|
8fd78afdbd | ||
|
|
874eb1d22f | ||
|
|
efb2ff90e0 | ||
|
|
3dde5208fe | ||
|
|
1860c9558c | ||
|
|
6c26a43657 | ||
|
|
5ef41d531a | ||
|
|
9b1b23820a | ||
|
|
7fb5d39de8 | ||
|
|
0b689d6ff1 | ||
|
|
23757224b1 | ||
|
|
591b520dba | ||
|
|
8a6f216396 | ||
|
|
2bd91d1f92 | ||
|
|
1a52c41c2d | ||
|
|
435bd02af5 | ||
|
|
b8235edd09 | ||
|
|
05906a6136 | ||
|
|
58805dd6db | ||
|
|
b6370de36b | ||
|
|
6b5efa31df | ||
|
|
cacdbddf01 | ||
|
|
b408587a25 |
4
.github/ISSUE_TEMPLATE/not-shitpost.md
vendored
4
.github/ISSUE_TEMPLATE/not-shitpost.md
vendored
@@ -1,6 +1,6 @@
|
||||
---
|
||||
name: not-shitpost
|
||||
about: I am going to say something that is either informative, polite, funny, or praising Ciro Santilli.
|
||||
name: not-shitpost不是屎帖子
|
||||
about: 我要说的或者是信息丰富的,或者有礼貌的,或者说表扬三西猴的,FAQ已经读了一下。 I am going to say something that is either informative, polite, funny, or praising Ciro Santilli. I already had a look at the FAQ.
|
||||
title: ''
|
||||
labels: not-shitpost
|
||||
assignees: ''
|
||||
|
||||
4
.github/ISSUE_TEMPLATE/shitpost.md
vendored
4
.github/ISSUE_TEMPLATE/shitpost.md
vendored
@@ -1,6 +1,6 @@
|
||||
---
|
||||
name: shitpost
|
||||
about: "None of the above: https://github.com/cirosantilli/china-dictatorship/tree/bc6c3b893fe5e59c402c54bd47fe3d9fe76bc563#shitpost"
|
||||
name: shitpost屎帖子
|
||||
about: "None of the above, 我是小粉红,要说狗屎。习近平是我的大师傅,习万岁,希特勒万岁!!!卐卐卐卐卐卐卐卐卐 https://github.com/cirosantilli/china-dictatorship/tree/bc6c3b893fe5e59c402c54bd47fe3d9fe76bc563#shitpost"
|
||||
title: ''
|
||||
labels: shitpost
|
||||
assignees: ''
|
||||
|
||||
23
.github/workflows/issue.yml
vendored
Normal file
23
.github/workflows/issue.yml
vendored
Normal file
@@ -0,0 +1,23 @@
|
||||
name: Issue
|
||||
on:
|
||||
issues:
|
||||
types: [opened]
|
||||
jobs:
|
||||
Issue:
|
||||
runs-on: ubuntu-20.04
|
||||
steps:
|
||||
- run: echo "github.event_name ${{ github.event_name }}"
|
||||
- run: echo "github.ref ${{ github.ref }}"
|
||||
- run: echo "github.repository ${{ github.repository }}"
|
||||
- run: echo "github.workspace ${{ github.workspace }}"
|
||||
- run: echo "runner.os ${{ runner.os }}"
|
||||
- run: pwd
|
||||
- name: Check out repository code
|
||||
uses: actions/checkout@v2
|
||||
- run: npm install
|
||||
- run: ls "${{ github.workspace }}"
|
||||
- name: Main work
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ github.token }}
|
||||
run: "${{ github.workspace }}/action.js"
|
||||
- run: echo "job.status ${{ job.status }}."
|
||||
2
.gitignore
vendored
2
.gitignore
vendored
@@ -20,3 +20,5 @@ tmp.*
|
||||
# For stupid packaging systems that require subdirectories.
|
||||
/china_dictatorship/README.adoc
|
||||
/china_dictatorship/README.html
|
||||
|
||||
node_modules
|
||||
|
||||
12
.gitlab-ci.yml
Normal file
12
.gitlab-ci.yml
Normal file
@@ -0,0 +1,12 @@
|
||||
image: alpine:latest
|
||||
|
||||
pages:
|
||||
stage: deploy
|
||||
script:
|
||||
- ls
|
||||
artifacts:
|
||||
paths:
|
||||
- public
|
||||
expire_in: 1 day
|
||||
only:
|
||||
- gl-pages
|
||||
@@ -8,6 +8,10 @@ Forbidden:
|
||||
|
||||
Create a new issues instead if you are arriving at a thread created by someone else and a have a new relevant point.
|
||||
|
||||
- don't close your tickets, only @cirosantilli can decide open/close status.
|
||||
|
||||
Don't vandalize your titles and post bodies after posting, only @cirosantilli can do that. Remember that every new issue generates a useless notification to Ciro Santilli who watches the repo, so don't try to hide your shit after you've crapped it.
|
||||
|
||||
- [Evil West](https://cirosantilli.com/china-dictatorship#evil-west) posts are OK, but they *must* explain why you think a dictatorship would better solve the problem.
|
||||
|
||||
Further rationale at: https://cirosantilli.com/china-dictatorship#bias
|
||||
@@ -38,14 +42,16 @@ Forbidden:
|
||||
|
||||
Keep in mind that [Ciro's Chinese sucks](https://cirosantilli.com/china-dictatorship#does-ciro-santilli-speak-chinese), so he may not get the full nuance of your comment, especially if you use a ton of [slang](https://cirosantilli.com/china-dictatorship#slang).
|
||||
|
||||
On `shitpost` posts however, you can be as aggressive as you want.
|
||||
|
||||
Punitive measures, from least serious to most serious:
|
||||
|
||||
- if you make a comment and delete, people who received notifications can still find your username: https://github.com/isaacs/github/issues/1833#issuecomment-660128741 so think twice before doing that on a non-shitpost thread that Ciro is subscribed to.
|
||||
|
||||
Shitposting and owning up to it is one thing, but shitposting, generating notifications, and being a coward by immediately deleting your comment, makes you getting blocked much more likely.
|
||||
|
||||
On `shitpost` posts however, you can be as aggressive as you want.
|
||||
|
||||
- if you create an issue and then block cirosantilli, you will be blocked too in return. The label is: https://github.com/cirosantilli/china-dictatorship/labels/op-blocked-ciro[op-blocked-ciro]
|
||||
|
||||
Punitive measures, from least serious to most serious:
|
||||
|
||||
- block user on one website. This may have the unintended side effect of deleting previous useful comments the user made on the websites.
|
||||
|
||||
- delete comment or vandalize the user's post.
|
||||
|
||||
3603
README.adoc
3603
README.adoc
File diff suppressed because it is too large
Load Diff
137
action.js
Executable file
137
action.js
Executable file
@@ -0,0 +1,137 @@
|
||||
#!/usr/bin/env node
|
||||
|
||||
const fs = require('fs');
|
||||
const readline = require('readline');
|
||||
|
||||
const core = require('@actions/core');
|
||||
const github = require('@actions/github');
|
||||
|
||||
// https://stackoverflow.com/questions/19269545/how-to-get-a-number-of-random-elements-from-an-array/19270021#19270021
|
||||
function getRandom(arr, n) {
|
||||
var result = new Array(n),
|
||||
len = arr.length,
|
||||
taken = new Array(len);
|
||||
if (n > len)
|
||||
throw new RangeError("getRandom: more elements taken than available");
|
||||
while (n--) {
|
||||
var x = Math.floor(Math.random() * len);
|
||||
result[n] = arr[x in taken ? taken[x] : x];
|
||||
taken[x] = --len in taken ? taken[len] : len;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
(async () => {
|
||||
|
||||
// Get images.
|
||||
let imageRe = /^image::{china-dictatorship-media-base}\/([^/[]+)/;
|
||||
let images = new Set();
|
||||
const fileStream = fs.createReadStream('README.adoc');
|
||||
const rl = readline.createInterface({
|
||||
input: fileStream,
|
||||
crlfDelay: Infinity
|
||||
});
|
||||
for await (const line of rl) {
|
||||
let match = imageRe.exec(line);
|
||||
if (match !== null) {
|
||||
images.add(match[1]);
|
||||
}
|
||||
}
|
||||
images = getRandom(Array.from(images), 20);
|
||||
full_images = []
|
||||
for (const image of images) {
|
||||
const url = `https://raw.githubusercontent.com/cirosantilli/china-dictatorship-media/master/${image}`;
|
||||
full_images.push(image.replace(/[_.]/g, ' '));
|
||||
full_images.push(`<img src="${url}" width="600">`);
|
||||
}
|
||||
|
||||
// Prepare reply body.
|
||||
const payload = github.context.payload;
|
||||
const titleAndBody = payload.issue.title + '\n\n' + payload.issue.body;
|
||||
const quoteArray = [];
|
||||
for (const line of titleAndBody.split('\n')) {
|
||||
// Remove some speical chars to remove at mention spam possibilities.
|
||||
quoteArray.push('> ' + line.replace(/[@#]/g, ""));
|
||||
}
|
||||
const replyBody = `Hi ${github.context.payload.issue.user.login},
|
||||
|
||||
${quoteArray.join('\n').substring(0,40000)}
|
||||
|
||||
${full_images.join('\n\n')}
|
||||
`;
|
||||
|
||||
// Label handling.
|
||||
const labels = new Set(payload.issue.labels.map(label => label.name));
|
||||
const newLabels = new Set();
|
||||
const shabiWords = [
|
||||
'shabi',
|
||||
'shadiao',
|
||||
'傻逼',
|
||||
'沙雕',
|
||||
'智障',
|
||||
];
|
||||
for (const word of shabiWords) {
|
||||
if (new RegExp(word, 'i').test(titleAndBody)) {
|
||||
newLabels.add('you-are-stupid-argument');
|
||||
break;
|
||||
}
|
||||
}
|
||||
const fuckMotherWords = [
|
||||
'cnm',
|
||||
'操你妈',
|
||||
]
|
||||
for (const word of fuckMotherWords) {
|
||||
if (new RegExp(word, 'i').test(titleAndBody)) {
|
||||
newLabels.add('fuck-your-mother-argument');
|
||||
break;
|
||||
}
|
||||
}
|
||||
const motherDiedWords = [
|
||||
'nmsl',
|
||||
'你妈死',
|
||||
]
|
||||
for (const word of motherDiedWords) {
|
||||
if (new RegExp(word, 'i').test(titleAndBody)) {
|
||||
newLabels.add('your-mother-died-argument');
|
||||
break;
|
||||
}
|
||||
}
|
||||
const shitpostWords = [
|
||||
'fuck',
|
||||
'shit',
|
||||
'垃圾',
|
||||
];
|
||||
for (const word of shitpostWords) {
|
||||
if (new RegExp(word, 'i').test(titleAndBody)) {
|
||||
newLabels.add('shitpost');
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (newLabels.size > 0) {
|
||||
newLabels.add('shitpost');
|
||||
if (labels.has('not-shitpost')) {
|
||||
labels.delete('not-shitpost');
|
||||
newLabels.add('op-does-not-know-what-shit-is');
|
||||
}
|
||||
}
|
||||
|
||||
// Make the request.
|
||||
try {
|
||||
console.log(github.context);
|
||||
const octokit = new github.getOctokit(process.env.GITHUB_TOKEN);
|
||||
const new_comment = octokit.issues.createComment({
|
||||
owner: 'cirosantilli',
|
||||
repo: payload.repository.name,
|
||||
issue_number: payload.issue.number,
|
||||
body: replyBody,
|
||||
});
|
||||
await octokit.issues.update({
|
||||
owner: 'cirosantilli',
|
||||
repo: payload.repository.name,
|
||||
issue_number: payload.issue.number,
|
||||
labels: Array.from([...labels, ...newLabels])
|
||||
});
|
||||
} catch (error) {
|
||||
core.setFailed(error.message);
|
||||
}
|
||||
})()
|
||||
12
head.html
12
head.html
@@ -444,7 +444,7 @@ pre{ white-space:pre }
|
||||
}
|
||||
</style>
|
||||
<script>
|
||||
<!-- Google Analytics, AKA selling my soul to Google for some backlinks. -->
|
||||
<!-- GitHub Google Analytics, AKA selling my soul to Google for some backlinks. -->
|
||||
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
|
||||
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
|
||||
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
|
||||
@@ -452,6 +452,16 @@ m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
|
||||
ga('create', 'UA-47867706-1', 'auto');
|
||||
ga('send', 'pageview');
|
||||
</script>
|
||||
|
||||
<!-- Google Analytics GitLab Universal + GA4 https://webapps.stackexchange.com/questions/154503/how-to-enable-universal-analytics-on-existing-google-analytics-4-property -->
|
||||
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-47867706-2"></script>
|
||||
<script>
|
||||
window.dataLayer = window.dataLayer || [];
|
||||
function gtag(){dataLayer.push(arguments);}
|
||||
gtag('js', new Date());
|
||||
|
||||
gtag('config', 'UA-47867706-2');
|
||||
</script>
|
||||
</head>
|
||||
<body class="article">
|
||||
<div id="header">
|
||||
|
||||
50
images.js
Executable file
50
images.js
Executable file
@@ -0,0 +1,50 @@
|
||||
#!/usr/bin/env node
|
||||
|
||||
const fs = require('fs');
|
||||
const readline = require('readline');
|
||||
|
||||
// https://stackoverflow.com/questions/19269545/how-to-get-a-number-of-random-elements-from-an-array/19270021#19270021
|
||||
function getRandom(arr, n) {
|
||||
var result = new Array(n),
|
||||
len = arr.length,
|
||||
taken = new Array(len);
|
||||
if (n > len)
|
||||
throw new RangeError("getRandom: more elements taken than available");
|
||||
while (n--) {
|
||||
var x = Math.floor(Math.random() * len);
|
||||
result[n] = arr[x in taken ? taken[x] : x];
|
||||
taken[x] = --len in taken ? taken[len] : len;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
(async () => {
|
||||
|
||||
// Get images.
|
||||
let imageRe = /^image::{china-dictatorship-media-base}\/([^/[]+)/;
|
||||
let images = new Set();
|
||||
const fileStream = fs.createReadStream('README.adoc');
|
||||
const rl = readline.createInterface({
|
||||
input: fileStream,
|
||||
crlfDelay: Infinity
|
||||
});
|
||||
for await (const line of rl) {
|
||||
let match = imageRe.exec(line);
|
||||
if (match !== null) {
|
||||
images.add(match[1]);
|
||||
}
|
||||
}
|
||||
images = Array.from(images);
|
||||
if (process.argv.length > 2) {
|
||||
images = getRandom(images, parseInt(process.argv[2]));
|
||||
} else {
|
||||
images.sort();
|
||||
}
|
||||
full_images = []
|
||||
for (const image of images) {
|
||||
const url = `https://raw.githubusercontent.com/cirosantilli/china-dictatorship-media/master/${image}`;
|
||||
full_images.push(image.replace(/[_.]/g, ' '));
|
||||
full_images.push(`<img src="${url}" width="600">`);
|
||||
}
|
||||
console.log(full_images.join('\n\n'));
|
||||
})()
|
||||
170
package-lock.json
generated
Normal file
170
package-lock.json
generated
Normal file
@@ -0,0 +1,170 @@
|
||||
{
|
||||
"name": "china-dictatorship",
|
||||
"version": "0.0.70",
|
||||
"lockfileVersion": 1,
|
||||
"requires": true,
|
||||
"dependencies": {
|
||||
"@actions/core": {
|
||||
"version": "1.2.7",
|
||||
"resolved": "https://registry.npmjs.org/@actions/core/-/core-1.2.7.tgz",
|
||||
"integrity": "sha512-kzLFD5BgEvq6ubcxdgPbRKGD2Qrgya/5j+wh4LZzqT915I0V3rED+MvjH6NXghbvk1MXknpNNQ3uKjXSEN00Ig=="
|
||||
},
|
||||
"@actions/github": {
|
||||
"version": "4.0.0",
|
||||
"resolved": "https://registry.npmjs.org/@actions/github/-/github-4.0.0.tgz",
|
||||
"integrity": "sha512-Ej/Y2E+VV6sR9X7pWL5F3VgEWrABaT292DRqRU6R4hnQjPtC/zD3nagxVdXWiRQvYDh8kHXo7IDmG42eJ/dOMA==",
|
||||
"requires": {
|
||||
"@actions/http-client": "^1.0.8",
|
||||
"@octokit/core": "^3.0.0",
|
||||
"@octokit/plugin-paginate-rest": "^2.2.3",
|
||||
"@octokit/plugin-rest-endpoint-methods": "^4.0.0"
|
||||
}
|
||||
},
|
||||
"@actions/http-client": {
|
||||
"version": "1.0.11",
|
||||
"resolved": "https://registry.npmjs.org/@actions/http-client/-/http-client-1.0.11.tgz",
|
||||
"integrity": "sha512-VRYHGQV1rqnROJqdMvGUbY/Kn8vriQe/F9HR2AlYHzmKuM/p3kjNuXhmdBfcVgsvRWTz5C5XW5xvndZrVBuAYg==",
|
||||
"requires": {
|
||||
"tunnel": "0.0.6"
|
||||
}
|
||||
},
|
||||
"@octokit/auth-token": {
|
||||
"version": "2.4.5",
|
||||
"resolved": "https://registry.npmjs.org/@octokit/auth-token/-/auth-token-2.4.5.tgz",
|
||||
"integrity": "sha512-BpGYsPgJt05M7/L/5FoE1PiAbdxXFZkX/3kDYcsvd1v6UhlnE5e96dTDr0ezX/EFwciQxf3cNV0loipsURU+WA==",
|
||||
"requires": {
|
||||
"@octokit/types": "^6.0.3"
|
||||
}
|
||||
},
|
||||
"@octokit/core": {
|
||||
"version": "3.4.0",
|
||||
"resolved": "https://registry.npmjs.org/@octokit/core/-/core-3.4.0.tgz",
|
||||
"integrity": "sha512-6/vlKPP8NF17cgYXqucdshWqmMZGXkuvtcrWCgU5NOI0Pl2GjlmZyWgBMrU8zJ3v2MJlM6++CiB45VKYmhiWWg==",
|
||||
"requires": {
|
||||
"@octokit/auth-token": "^2.4.4",
|
||||
"@octokit/graphql": "^4.5.8",
|
||||
"@octokit/request": "^5.4.12",
|
||||
"@octokit/request-error": "^2.0.5",
|
||||
"@octokit/types": "^6.0.3",
|
||||
"before-after-hook": "^2.2.0",
|
||||
"universal-user-agent": "^6.0.0"
|
||||
}
|
||||
},
|
||||
"@octokit/endpoint": {
|
||||
"version": "6.0.11",
|
||||
"resolved": "https://registry.npmjs.org/@octokit/endpoint/-/endpoint-6.0.11.tgz",
|
||||
"integrity": "sha512-fUIPpx+pZyoLW4GCs3yMnlj2LfoXTWDUVPTC4V3MUEKZm48W+XYpeWSZCv+vYF1ZABUm2CqnDVf1sFtIYrj7KQ==",
|
||||
"requires": {
|
||||
"@octokit/types": "^6.0.3",
|
||||
"is-plain-object": "^5.0.0",
|
||||
"universal-user-agent": "^6.0.0"
|
||||
}
|
||||
},
|
||||
"@octokit/graphql": {
|
||||
"version": "4.6.1",
|
||||
"resolved": "https://registry.npmjs.org/@octokit/graphql/-/graphql-4.6.1.tgz",
|
||||
"integrity": "sha512-2lYlvf4YTDgZCTXTW4+OX+9WTLFtEUc6hGm4qM1nlZjzxj+arizM4aHWzBVBCxY9glh7GIs0WEuiSgbVzv8cmA==",
|
||||
"requires": {
|
||||
"@octokit/request": "^5.3.0",
|
||||
"@octokit/types": "^6.0.3",
|
||||
"universal-user-agent": "^6.0.0"
|
||||
}
|
||||
},
|
||||
"@octokit/openapi-types": {
|
||||
"version": "6.0.0",
|
||||
"resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-6.0.0.tgz",
|
||||
"integrity": "sha512-CnDdK7ivHkBtJYzWzZm7gEkanA7gKH6a09Eguz7flHw//GacPJLmkHA3f3N++MJmlxD1Fl+mB7B32EEpSCwztQ=="
|
||||
},
|
||||
"@octokit/plugin-paginate-rest": {
|
||||
"version": "2.13.3",
|
||||
"resolved": "https://registry.npmjs.org/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-2.13.3.tgz",
|
||||
"integrity": "sha512-46lptzM9lTeSmIBt/sVP/FLSTPGx6DCzAdSX3PfeJ3mTf4h9sGC26WpaQzMEq/Z44cOcmx8VsOhO+uEgE3cjYg==",
|
||||
"requires": {
|
||||
"@octokit/types": "^6.11.0"
|
||||
}
|
||||
},
|
||||
"@octokit/plugin-rest-endpoint-methods": {
|
||||
"version": "4.15.0",
|
||||
"resolved": "https://registry.npmjs.org/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-4.15.0.tgz",
|
||||
"integrity": "sha512-1AF9GM/Ywk8ukUM5seDRj286GdFpdfsHeOrOPBV2rVtRN7MQNzRIcw8W5sb4JPerjQ0WcRRwAwQyufg64BxJkA==",
|
||||
"requires": {
|
||||
"@octokit/types": "^6.13.0",
|
||||
"deprecation": "^2.3.1"
|
||||
}
|
||||
},
|
||||
"@octokit/request": {
|
||||
"version": "5.4.15",
|
||||
"resolved": "https://registry.npmjs.org/@octokit/request/-/request-5.4.15.tgz",
|
||||
"integrity": "sha512-6UnZfZzLwNhdLRreOtTkT9n57ZwulCve8q3IT/Z477vThu6snfdkBuhxnChpOKNGxcQ71ow561Qoa6uqLdPtag==",
|
||||
"requires": {
|
||||
"@octokit/endpoint": "^6.0.1",
|
||||
"@octokit/request-error": "^2.0.0",
|
||||
"@octokit/types": "^6.7.1",
|
||||
"is-plain-object": "^5.0.0",
|
||||
"node-fetch": "^2.6.1",
|
||||
"universal-user-agent": "^6.0.0"
|
||||
}
|
||||
},
|
||||
"@octokit/request-error": {
|
||||
"version": "2.0.5",
|
||||
"resolved": "https://registry.npmjs.org/@octokit/request-error/-/request-error-2.0.5.tgz",
|
||||
"integrity": "sha512-T/2wcCFyM7SkXzNoyVNWjyVlUwBvW3igM3Btr/eKYiPmucXTtkxt2RBsf6gn3LTzaLSLTQtNmvg+dGsOxQrjZg==",
|
||||
"requires": {
|
||||
"@octokit/types": "^6.0.3",
|
||||
"deprecation": "^2.0.0",
|
||||
"once": "^1.4.0"
|
||||
}
|
||||
},
|
||||
"@octokit/types": {
|
||||
"version": "6.13.0",
|
||||
"resolved": "https://registry.npmjs.org/@octokit/types/-/types-6.13.0.tgz",
|
||||
"integrity": "sha512-W2J9qlVIU11jMwKHUp5/rbVUeErqelCsO5vW5PKNb7wAXQVUz87Rc+imjlEvpvbH8yUb+KHmv8NEjVZdsdpyxA==",
|
||||
"requires": {
|
||||
"@octokit/openapi-types": "^6.0.0"
|
||||
}
|
||||
},
|
||||
"before-after-hook": {
|
||||
"version": "2.2.1",
|
||||
"resolved": "https://registry.npmjs.org/before-after-hook/-/before-after-hook-2.2.1.tgz",
|
||||
"integrity": "sha512-/6FKxSTWoJdbsLDF8tdIjaRiFXiE6UHsEHE3OPI/cwPURCVi1ukP0gmLn7XWEiFk5TcwQjjY5PWsU+j+tgXgmw=="
|
||||
},
|
||||
"deprecation": {
|
||||
"version": "2.3.1",
|
||||
"resolved": "https://registry.npmjs.org/deprecation/-/deprecation-2.3.1.tgz",
|
||||
"integrity": "sha512-xmHIy4F3scKVwMsQ4WnVaS8bHOx0DmVwRywosKhaILI0ywMDWPtBSku2HNxRvF7jtwDRsoEwYQSfbxj8b7RlJQ=="
|
||||
},
|
||||
"is-plain-object": {
|
||||
"version": "5.0.0",
|
||||
"resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-5.0.0.tgz",
|
||||
"integrity": "sha512-VRSzKkbMm5jMDoKLbltAkFQ5Qr7VDiTFGXxYFXXowVj387GeGNOCsOH6Msy00SGZ3Fp84b1Naa1psqgcCIEP5Q=="
|
||||
},
|
||||
"node-fetch": {
|
||||
"version": "2.6.1",
|
||||
"resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.1.tgz",
|
||||
"integrity": "sha512-V4aYg89jEoVRxRb2fJdAg8FHvI7cEyYdVAh94HH0UIK8oJxUfkjlDQN9RbMx+bEjP7+ggMiFRprSti032Oipxw=="
|
||||
},
|
||||
"once": {
|
||||
"version": "1.4.0",
|
||||
"resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
|
||||
"integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=",
|
||||
"requires": {
|
||||
"wrappy": "1"
|
||||
}
|
||||
},
|
||||
"tunnel": {
|
||||
"version": "0.0.6",
|
||||
"resolved": "https://registry.npmjs.org/tunnel/-/tunnel-0.0.6.tgz",
|
||||
"integrity": "sha512-1h/Lnq9yajKY2PEbBadPXj3VxsDDu844OnaAo52UVmIzIvwwtBPIuNvkjuzBlTWpfJyUbG3ez0KSBibQkj4ojg=="
|
||||
},
|
||||
"universal-user-agent": {
|
||||
"version": "6.0.0",
|
||||
"resolved": "https://registry.npmjs.org/universal-user-agent/-/universal-user-agent-6.0.0.tgz",
|
||||
"integrity": "sha512-isyNax3wXoKaulPDZWHQqbmIx1k2tb9fb3GGDBRxCscfYV2Ch7WxPArBsFEG8s/safwXTT7H4QGhaIkTp9447w=="
|
||||
},
|
||||
"wrappy": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
|
||||
"integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8="
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -4,7 +4,10 @@
|
||||
},
|
||||
"dependencies": {},
|
||||
"description": "2018新疆改造中心,1989六四事件,1999法轮功 ,2019 996.ICU, 2018包子露宪,2015 710律师劫,2015巴拿马文件 邓家贵,2017低端人口,2008西藏骚乱",
|
||||
"devDependencies": {},
|
||||
"devDependencies": {
|
||||
"@actions/core": "^1.2.7",
|
||||
"@actions/github": "^4.0.0"
|
||||
},
|
||||
"files": [
|
||||
"index.js",
|
||||
"china-dictatorship",
|
||||
@@ -22,5 +25,5 @@
|
||||
"scripts": {
|
||||
"prepublishOnly": "cp README.adoc README.md;make"
|
||||
},
|
||||
"version": "0.0.69"
|
||||
"version": "0.0.71"
|
||||
}
|
||||
|
||||
36
push
Executable file
36
push
Executable file
@@ -0,0 +1,36 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# https://github.com/cirosantilli/china-dictatorship#mirrors
|
||||
|
||||
set -eux
|
||||
make
|
||||
git push --follow-tags
|
||||
git push git@gitlab.com:cirosantilli/china-dictatorship.git
|
||||
|
||||
# GitHub pages.
|
||||
# One time initial setup.
|
||||
# git checkout --orphan gh-pages
|
||||
# and copy over https://github.com/cirosantilli/jekyll-min
|
||||
gh_pages_dir=out/gh-pages
|
||||
if [ ! -d "$gh_pages_dir" ]; then
|
||||
mkdir -p "$gh_pages_dir"
|
||||
git clone --branch gh-pages --depth 1 "$(git remote get-url origin)" "$gh_pages_dir"
|
||||
fi
|
||||
cp README.html "${gh_pages_dir}/index.html"
|
||||
git -C "$gh_pages_dir" add .
|
||||
if git -C "$gh_pages_dir" commit -m "$(git log -1 --format="%H")"; then
|
||||
git -C "$gh_pages_dir" push
|
||||
fi
|
||||
|
||||
# GitLab pages
|
||||
gl_pages_dir=out/gl-pages
|
||||
if [ ! -d "$gl_pages_dir" ]; then
|
||||
mkdir -p "${gl_pages_dir}/public"
|
||||
git clone --branch gl-pages --depth 1 git@gitlab.com:cirosantilli/china-dictatorship.git remote get-url origin "$gl_pages_dir"
|
||||
fi
|
||||
make MEDIA=https://gitlab.com/cirosantilli/china-dictatorship-media/-/raw/master OUT="${gl_pages_dir}/public/index.html"
|
||||
cp .gitlab-ci.yml "${gl_pages_dir}"
|
||||
git -C "$gl_pages_dir" add .
|
||||
if git -C "$gl_pages_dir" commit -m "$(git log -1 --format="%H")"; then
|
||||
git -C "$gl_pages_dir" push
|
||||
fi
|
||||
@@ -1,22 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# https://github.com/cirosantilli/china-dictatorship#mirrors
|
||||
|
||||
set -eux
|
||||
make
|
||||
git push --follow-tags
|
||||
|
||||
# GitHub pages.
|
||||
# One time initial setup.
|
||||
# git checkout --orphan gh-pages
|
||||
# and copy over https://github.com/cirosantilli/jekyll-min
|
||||
gh_pages_dir=out/gh-pages
|
||||
if [ ! -d "$gh_pages_dir" ]; then
|
||||
mkdir -p "$gh_pages_dir"
|
||||
git clone --branch gh-pages "$(git remote get-url origin)"
|
||||
fi
|
||||
cp README.html "${gh_pages_dir}/index.html"
|
||||
git -C "$gh_pages_dir" add index.html
|
||||
if git -C "$gh_pages_dir" commit -m "$(git log -1 --format="%H")"; then
|
||||
git -C "$gh_pages_dir" push
|
||||
fi
|
||||
@@ -1,5 +1,6 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Create a tag and push to EVERY supported mirror.
|
||||
# https://github.com/cirosantilli/china-dictatorship#mirrors
|
||||
|
||||
set -eux
|
||||
@@ -11,7 +12,7 @@ git add package.json
|
||||
git add setup.py
|
||||
git commit -m 'bump package version'
|
||||
git tag -m "$new_version" "$new_version"
|
||||
./push-gh-pages
|
||||
./push
|
||||
|
||||
# NPM package.
|
||||
# Updates package.json version, which other systems read if possible.
|
||||
@@ -31,8 +32,8 @@ python setup.py sdist bdist_wheel
|
||||
twine upload dist/*
|
||||
rm -rf build dist *.egg-info
|
||||
|
||||
# Push to git mirrors.
|
||||
git push git@gitlab.com:cirosantilli/china-dictatorship.git
|
||||
# Push to other git mirrors.
|
||||
git push git@bitbucket.org:cirosantilli/china-dictatorship.git
|
||||
git push git@gitlab.binets.fr:ciro.duran-santilli/china-dictatorship.git
|
||||
# Nah.
|
||||
#git push https://gitee.com/cirosantilli/china-dictatorship.git
|
||||
|
||||
2
setup.py
2
setup.py
@@ -16,7 +16,7 @@ with open(path.join(this_directory, 'README.adoc')) as f:
|
||||
|
||||
setup(
|
||||
name='china-dictatorship',
|
||||
version='0.0.69',
|
||||
version='0.0.71',
|
||||
description='2018新疆改造中心,1989六四事件,1999法轮功 ,2019 996.ICU, 2018包子露宪,2015 710律师劫,2015巴拿马文件 邓家贵,2017低端人口,2008西藏骚乱',
|
||||
long_description=long_description,
|
||||
# Otherwise upload fails with: "The description failed to render in the default format of reStructuredText."
|
||||
|
||||
Reference in New Issue
Block a user