Merge branch 'master' into fix_url_id_param

This commit is contained in:
Stefano 2022-04-05 21:52:52 +02:00 committed by GitHub
commit 50603f7be4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
14 changed files with 2003 additions and 2011 deletions

BIN
.DS_Store vendored

Binary file not shown.

View file

@ -1,13 +0,0 @@
---
name: New Submission
about: Add a new submission
title: 'New Submission: [title]'
labels: new submission
assignees: ''
---
Paste the atlas code output in the codeblock below:
```
```

View file

@ -0,0 +1,16 @@
---
name: Update request
about: Change/Add additional info to an existing entry on this/main repo
title: 'Update request: [title]'
labels: entry update
assignees: ''
---
- Summary of changes:
- Paste inside codeblock here:
```
```

View file

@ -1,5 +1,11 @@
name: Validate JSON name: Validate JSON
on: [push, pull_request] on:
push:
paths:
- web/atlas.json
pull_request:
paths:
- web/atlas.json
jobs: jobs:
Validate-JSON: Validate-JSON:
runs-on: ubuntu-latest runs-on: ubuntu-latest

4
.gitignore vendored
View file

@ -9,4 +9,6 @@ users.html
oldusers.html oldusers.html
web/_js/minified.js web/_js/minified.js
allCharacters.txt allCharacters.txt
combined.js combined.js
*.DS_Store
.vscode/

View file

@ -35,7 +35,7 @@ To contribute to the map, we require a certain format for artwork region and lab
### Map Edits ### Map Edits
1. Create a fork of our repo. 1. Create a fork of our repo.
2. Enter your data into the `web/_js/atlas.json` file, with the correct format and ID number. 2. Enter your data into the `web/atlas.json` file, with the correct format and ID number.
3. Create a Pull Request against the `/cleanup` branch. 3. Create a Pull Request against the `/cleanup` branch.
### Cleaning Contributions ### Cleaning Contributions

23
tools/less-md-links.py Normal file
View file

@ -0,0 +1,23 @@
#!/usr/bin/python
import re
pattern = re.compile(r'\[(.+?)\]\((.+?)\)')
def go(path):
with open(path, "r+", encoding='UTF-8') as f1:
contents = f1.read()
for match in pattern.finditer(contents):
if match.group(1) == match.group(2):
contents = contents.replace(match.group(0), match.group(2), 1)
for match in pattern.finditer(contents):
if match.group(1) == match.group(2):
contents = contents.replace(match.group(0), match.group(2), 1)
with open(path, "w", encoding='UTF-8') as f2:
f2.write(contents)
go("../web/atlas.json")
go("../web/atlas-before-ids-migration.json")

38
tools/subreddit-format.py Normal file
View file

@ -0,0 +1,38 @@
#!/usr/bin/python
import re
pattern1 = re.compile(r'"subreddit": "\/r\/(.+?)/?"')
pattern2 = re.compile(r'"subreddit": "r\/(.+?)/?"')
pattern3 = re.compile(r'"subreddit": "\/?r(?!\/)(.+?)/?"')
pattern4 = re.compile(r'"subreddit": "(?:(?:https:\/\/)?www.)?reddit.com\/r\/(.+?)(/[^"]*)*"')
pattern5 = re.compile(r'"subreddit": "\[(?:(?:https:\/\/)?www.)?reddit.com\/r\/(.+?)(/[^"]*)*\]\((?:(?:https:\/\/)?www.)?reddit.com\/r\/(.+?)(/[^"]*)*\)"')
def go(path):
with open(path, "r+", encoding='UTF-8') as f1:
contents = f1.read()
for match in pattern5.finditer(contents):
contents = contents.replace(match.group(0), '"subreddit": "r/' + match.group(2) + '"', 1)
for match in pattern4.finditer(contents):
contents = contents.replace(match.group(0), '"subreddit": "r/' + match.group(1) + '"', 1)
for match in pattern1.finditer(contents):
contents = contents.replace(match.group(0), '"subreddit": "r/' + match.group(1) + '"', 1)
for match in pattern2.finditer(contents):
contents = contents.replace(match.group(0), '"subreddit": "r/' + match.group(1) + '"', 1)
for match in pattern3.finditer(contents):
contents = contents.replace(match.group(0), '"subreddit": "r/' + match.group(1) + '"', 1)
# # r/... to /r/.. (comment if not needed)
for match in pattern2.finditer(contents):
contents = contents.replace(match.group(0), '"subreddit": "/r/' + match.group(1) + '"', 1)
with open(path, "w", encoding='UTF-8') as f2:
f2.write(contents)
go("../web/atlas.json")
go("../web/atlas-before-ids-migration.json")

BIN
web/.DS_Store vendored

Binary file not shown.

View file

@ -79,7 +79,7 @@ init();
async function init(){ async function init(){
let resp = await fetch("/atlas.json"); let resp = await fetch("./atlas.json");
atlas = await resp.json(); atlas = await resp.json();
atlas.sort(function (a, b) { atlas.sort(function (a, b) {
if (a.center[1] < b.center[1]) { if (a.center[1] < b.center[1]) {

View file

@ -703,6 +703,8 @@ function initView(){
}); });
container.addEventListener("touchend", function(e){ container.addEventListener("touchend", function(e){
e.preventDefault()
//console.log(e); //console.log(e);
//console.log(e.changedTouches[0].clientX); //console.log(e.changedTouches[0].clientX);
if(e.changedTouches.length == 1){ if(e.changedTouches.length == 1){

File diff suppressed because it is too large Load diff

File diff suppressed because one or more lines are too long

View file

@ -25,7 +25,6 @@
<head> <head>
<meta charset="UTF-8"> <meta charset="UTF-8">
<title>The /r/place Atlas</title> <title>The /r/place Atlas</title>
<meta name="description" content="An interactive map of Reddit's /r/place, with information to each artwork of the canvas."> <meta name="description" content="An interactive map of Reddit's /r/place, with information to each artwork of the canvas.">
<meta name="author" content="Roland Rytz (2022 by Stefano#7366)"> <meta name="author" content="Roland Rytz (2022 by Stefano#7366)">
<meta name="keywords" content="reddit, /r/place 2022"> <meta name="keywords" content="reddit, /r/place 2022">
@ -82,6 +81,7 @@
smaller by reducing the actualy size. --> smaller by reducing the actualy size. -->
<h1 id="title">The /r/place Atlas</h1> <h1 id="title">The /r/place Atlas</h1>
</a> </a>
</header> </header>
<div id="container"> <div id="container">
@ -107,14 +107,12 @@ <h1 id="title">The /r/place Atlas</h1>
<nav> <nav>
<a id="aboutLink" href="./about.html">About</a> <a id="aboutLink" href="./about.html">About</a>
<a id="drawLink" href="./index.html?mode=draw">Contribute</a> <a id="drawLink" href="./index.html?mode=draw">Contribute</a>
<a id="overlapLink" href="./index.html?mode=overlap">Overlap</a>
<button title="Discord" onclick="window.location.href='https://discord.gg/pJkm23b2nA'"> <button title="Discord" onclick="window.location.href='https://discord.gg/pJkm23b2nA'">
<img class="Discord" alt="Discord Logo" src="./_img/discord.svg"> <img class="Discord" alt="Discord Logo" src="./_img/discord.svg">
</button> </button>
<button title="Donate!" id="donateButton"> <button title="Donate!" id="donateButton">
<img alt="Donate" src="data:image/svg+xml;utf8,%3Csvg%0A%20%20%20xmlns%3Adc%3D%22http%3A//purl.org/dc/elements/1.1/%22%0A%20%20%20xmlns%3Acc%3D%22http%3A//creativecommons.org/ns%23%22%0A%20%20%20xmlns%3Ardf%3D%22http%3A//www.w3.org/1999/02/22-rdf-syntax-ns%23%22%0A%20%20%20xmlns%3Asvg%3D%22http%3A//www.w3.org/2000/svg%22%0A%20%20%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%0A%20%20%20version%3D%221.1%22%0A%20%20%20width%3D%2263.97776%22%0A%20%20%20height%3D%2263.985764%22%0A%20%20%20id%3D%22svg2%22%3E%0A%20%20%3Cdefs%0A%20%20%20%20%20id%3D%22defs4%22%20/%3E%0A%20%20%3Cmetadata%0A%20%20%20%20%20id%3D%22metadata7%22%3E%0A%20%20%20%20%3Crdf%3ARDF%3E%0A%20%20%20%20%20%20%3Ccc%3AWork%0A%20%20%20%20%20%20%20%20%20rdf%3Aabout%3D%22%22%3E%0A%20%20%20%20%20%20%20%20%3Cdc%3Aformat%3Eimage/svg+xml%3C/dc%3Aformat%3E%0A%20%20%20%20%20%20%20%20%3Cdc%3Atype%0A%20%20%20%20%20%20%20%20%20%20%20rdf%3Aresource%3D%22http%3A//purl.org/dc/dcmitype/StillImage%22%20/%3E%0A%20%20%20%20%20%20%20%20%3Cdc%3Atitle%3E%3C/dc%3Atitle%3E%0A%20%20%20%20%20%20%3C/cc%3AWork%3E%0A%20%20%20%20%3C/rdf%3ARDF%3E%0A%20%20%3C/metadata%3E%0A%20%20%3Cg%0A%20%20%20%20%20transform%3D%22translate%28-239.44047%2C-363.22698%29%22%0A%20%20%20%20%20id%3D%22layer1%22%3E%0A%20%20%20%20%3Cpath%0A%20%20%20%20%20%20%20d%3D%22m%20290.96332%2C384.19885%20c%20-0.59424%2C-6.27896%20-6.01049%2C-8.39164%20-12.8518%2C-9.00126%20l%200.0128%2C-8.70824%20-5.30062%2C-0.007%20-0.0123%2C8.47872%20c%20-1.39346%2C-0.002%20-2.81788%2C0.0235%20-4.23308%2C0.0496%20l%200.0135%2C-8.53485%20-5.29778%2C-0.008%20-0.0149%2C8.70575%20c%20-1.14765%2C0.0217%20-2.27469%2C0.0414%20-3.3736%2C0.0405%20l%20-5.3e-4%2C-0.0271%20-7.31086%2C-0.0134%20-0.007%2C5.66124%20c%200%2C0%203.91442%2C-0.0688%203.84925%2C0.003%202.14703%2C0.004%202.84397%2C1.25133%203.04562%2C2.32724%20l%20-0.0143%2C9.92049%20c%200.14815%2C0.001%200.34143%2C0.008%200.56022%2C0.0378%20-0.17659%2C-3e-5%20-0.36561%2C-0.002%20-0.55995%2C-1.2e-4%20l%20-0.022%2C13.89765%20c%20-0.0952%2C0.67556%20-0.49402%2C1.75232%20-1.99407%2C1.75269%200.0678%2C0.0602%20-3.85316%2C-0.007%20-3.85316%2C-0.007%20l%20-1.06259%2C6.32874%206.89801%2C0.01%20c%201.28367%2C0.003%202.54669%2C0.0271%203.78665%2C0.0368%20l%20-0.0109%2C8.80736%205.29494%2C0.009%200.0128%2C-8.71427%20c%201.45379%2C0.0322%202.86073%2C0.0459%204.23429%2C0.0466%20l%20-0.0152%2C8.67412%205.30061%2C0.007%200.0147%2C-8.79173%20c%208.91219%2C-0.49805%2015.1527%2C-2.73385%2015.93965%2C-11.10113%200.63533%2C-6.73752%20-2.53%2C-9.74895%20-7.5868%2C-10.97123%203.07554%2C-1.56033%205.00104%2C-4.31475%204.55848%2C-8.90928%20z%20m%20-7.44387%2C18.82121%20c%20-0.007%2C6.58182%20-11.27551%2C5.81643%20-14.86789%2C5.81449%20l%200.0187%2C-11.66923%20c%203.59343%2C0.006%2014.85983%2C-1.01023%2014.84919%2C5.85474%20z%20m%20-2.44078%2C-16.46738%20c%20-0.0106%2C5.98811%20-9.40836%2C5.27536%20-12.40064%2C5.27116%20l%200.016%2C-10.58348%20c%202.99229%2C0.004%2012.39322%2C-0.93337%2012.38461%2C5.31232%20z%22%0A%20%20%20%20%20%20%20id%3D%22path3010%22%0A%20%20%20%20%20%20%20style%3D%22fill%3A%23ffffff%22%20/%3E%0A%20%20%3C/g%3E%0A%3C/svg%3E"> <img alt="Donate" src="data:image/svg+xml;utf8,%3Csvg%0A%20%20%20xmlns%3Adc%3D%22http%3A//purl.org/dc/elements/1.1/%22%0A%20%20%20xmlns%3Acc%3D%22http%3A//creativecommons.org/ns%23%22%0A%20%20%20xmlns%3Ardf%3D%22http%3A//www.w3.org/1999/02/22-rdf-syntax-ns%23%22%0A%20%20%20xmlns%3Asvg%3D%22http%3A//www.w3.org/2000/svg%22%0A%20%20%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%0A%20%20%20version%3D%221.1%22%0A%20%20%20width%3D%2263.97776%22%0A%20%20%20height%3D%2263.985764%22%0A%20%20%20id%3D%22svg2%22%3E%0A%20%20%3Cdefs%0A%20%20%20%20%20id%3D%22defs4%22%20/%3E%0A%20%20%3Cmetadata%0A%20%20%20%20%20id%3D%22metadata7%22%3E%0A%20%20%20%20%3Crdf%3ARDF%3E%0A%20%20%20%20%20%20%3Ccc%3AWork%0A%20%20%20%20%20%20%20%20%20rdf%3Aabout%3D%22%22%3E%0A%20%20%20%20%20%20%20%20%3Cdc%3Aformat%3Eimage/svg+xml%3C/dc%3Aformat%3E%0A%20%20%20%20%20%20%20%20%3Cdc%3Atype%0A%20%20%20%20%20%20%20%20%20%20%20rdf%3Aresource%3D%22http%3A//purl.org/dc/dcmitype/StillImage%22%20/%3E%0A%20%20%20%20%20%20%20%20%3Cdc%3Atitle%3E%3C/dc%3Atitle%3E%0A%20%20%20%20%20%20%3C/cc%3AWork%3E%0A%20%20%20%20%3C/rdf%3ARDF%3E%0A%20%20%3C/metadata%3E%0A%20%20%3Cg%0A%20%20%20%20%20transform%3D%22translate%28-239.44047%2C-363.22698%29%22%0A%20%20%20%20%20id%3D%22layer1%22%3E%0A%20%20%20%20%3Cpath%0A%20%20%20%20%20%20%20d%3D%22m%20290.96332%2C384.19885%20c%20-0.59424%2C-6.27896%20-6.01049%2C-8.39164%20-12.8518%2C-9.00126%20l%200.0128%2C-8.70824%20-5.30062%2C-0.007%20-0.0123%2C8.47872%20c%20-1.39346%2C-0.002%20-2.81788%2C0.0235%20-4.23308%2C0.0496%20l%200.0135%2C-8.53485%20-5.29778%2C-0.008%20-0.0149%2C8.70575%20c%20-1.14765%2C0.0217%20-2.27469%2C0.0414%20-3.3736%2C0.0405%20l%20-5.3e-4%2C-0.0271%20-7.31086%2C-0.0134%20-0.007%2C5.66124%20c%200%2C0%203.91442%2C-0.0688%203.84925%2C0.003%202.14703%2C0.004%202.84397%2C1.25133%203.04562%2C2.32724%20l%20-0.0143%2C9.92049%20c%200.14815%2C0.001%200.34143%2C0.008%200.56022%2C0.0378%20-0.17659%2C-3e-5%20-0.36561%2C-0.002%20-0.55995%2C-1.2e-4%20l%20-0.022%2C13.89765%20c%20-0.0952%2C0.67556%20-0.49402%2C1.75232%20-1.99407%2C1.75269%200.0678%2C0.0602%20-3.85316%2C-0.007%20-3.85316%2C-0.007%20l%20-1.06259%2C6.32874%206.89801%2C0.01%20c%201.28367%2C0.003%202.54669%2C0.0271%203.78665%2C0.0368%20l%20-0.0109%2C8.80736%205.29494%2C0.009%200.0128%2C-8.71427%20c%201.45379%2C0.0322%202.86073%2C0.0459%204.23429%2C0.0466%20l%20-0.0152%2C8.67412%205.30061%2C0.007%200.0147%2C-8.79173%20c%208.91219%2C-0.49805%2015.1527%2C-2.73385%2015.93965%2C-11.10113%200.63533%2C-6.73752%20-2.53%2C-9.74895%20-7.5868%2C-10.97123%203.07554%2C-1.56033%205.00104%2C-4.31475%204.55848%2C-8.90928%20z%20m%20-7.44387%2C18.82121%20c%20-0.007%2C6.58182%20-11.27551%2C5.81643%20-14.86789%2C5.81449%20l%200.0187%2C-11.66923%20c%203.59343%2C0.006%2014.85983%2C-1.01023%2014.84919%2C5.85474%20z%20m%20-2.44078%2C-16.46738%20c%20-0.0106%2C5.98811%20-9.40836%2C5.27536%20-12.40064%2C5.27116%20l%200.016%2C-10.58348%20c%202.99229%2C0.004%2012.39322%2C-0.93337%2012.38461%2C5.31232%20z%22%0A%20%20%20%20%20%20%20id%3D%22path3010%22%0A%20%20%20%20%20%20%20style%3D%22fill%3A%23ffffff%22%20/%3E%0A%20%20%3C/g%3E%0A%3C/svg%3E">
<!--
<img alt="Donate" src="./_img/bitcoin.svg">
-->
</button> </button>
</nav> </nav>
<div id="entriesListControls"> <div id="entriesListControls">