mirror of https://github.com/placeAtlas/atlas.git
Add more community entries, add a donate button to main page
This commit is contained in:
parent
5b4b931060
commit
d8ae2db9a3
|
@ -7,11 +7,11 @@ credentials = open('credentials', 'r')
|
|||
client_id = credentials.readline().strip(' \t\n\r')
|
||||
client_secret = credentials.readline().strip(' \t\n\r')
|
||||
|
||||
startId = 1492
|
||||
startId = 1778
|
||||
|
||||
reddit = praw.Reddit(client_id=client_id, client_secret=client_secret, user_agent='atlas_bot')
|
||||
|
||||
for submission in reddit.subreddit('placeAtlas').new(limit=15):
|
||||
for submission in reddit.subreddit('placeAtlas').new(limit=220):
|
||||
#print(dir(submission))
|
||||
if(submission.link_flair_text == "New Entry"):
|
||||
text = submission.selftext
|
||||
|
|
|
@ -0,0 +1,9 @@
|
|||
|
||||
|
||||
Find all stuff between json objects:
|
||||
|
||||
\}[^\{\}]*?[^\s,][^\{\}]*?\{
|
||||
|
||||
Find all entries not separated by commas:
|
||||
|
||||
\}[^\{\},]*?[^,][^\{\},]*?\{
|
|
@ -1,6 +1,4 @@
|
|||
|
||||
#6y7LtOjoNEfe72g62kZfwtFHMWkQ8XsZvcQ8xZDe
|
||||
|
||||
import praw
|
||||
|
||||
outfile = open('users.html', 'w')
|
||||
|
|
|
@ -599,6 +599,8 @@ input[type="checkbox"]{
|
|||
right: 0px;
|
||||
bottom: 0px;
|
||||
background-color: rgba(0, 0, 0, 0.8);
|
||||
display: none;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
#exportWindow{
|
||||
|
@ -756,24 +758,39 @@ button#zoomResetButton{
|
|||
}
|
||||
|
||||
#entriesListContainer > nav{
|
||||
text-align: center;
|
||||
margin: 10px 0px;
|
||||
display: flex;
|
||||
flex-shrink: 0;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
#entriesListContainer > nav > a{
|
||||
#entriesListContainer > nav > a,
|
||||
#entriesListContainer > nav > button{
|
||||
background-image: linear-gradient(to bottom, #888888, #666666);
|
||||
border: 1px #000000 solid;
|
||||
color: #FFFFFF;
|
||||
text-align: center;
|
||||
display: inline-block;
|
||||
padding: 5px;
|
||||
display: block;
|
||||
padding: 4px;
|
||||
cursor: pointer;
|
||||
width: 130px;
|
||||
width: 120px;
|
||||
height: 30px;
|
||||
margin-right: 10px;
|
||||
text-shadow: 1px 1px 0px #444444;
|
||||
}
|
||||
|
||||
#entriesListContainer > nav > a:last-child{
|
||||
#entriesListContainer > nav > button{
|
||||
width: 30px;
|
||||
padding: 2px;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
#entriesListContainer > nav > button > img{
|
||||
height: 22px;
|
||||
width: 22px;
|
||||
}
|
||||
|
||||
#entriesListContainer > nav > button:last-child{
|
||||
margin-right: 0px;
|
||||
}
|
||||
|
||||
|
@ -782,6 +799,22 @@ button#zoomResetButton{
|
|||
background-image: linear-gradient(to bottom, #999999, #777777);
|
||||
}
|
||||
|
||||
#entriesListContainer > nav > button:hover{
|
||||
background-image: none;
|
||||
background: transparent;
|
||||
border-color: transparent;
|
||||
}
|
||||
|
||||
#entriesListContainer > nav > button:hover > img{
|
||||
text-decoration: none;
|
||||
background-image: linear-gradient(to bottom, #FFAA00, #FFAA00);
|
||||
border-radius: 15px;
|
||||
padding: 3px;
|
||||
margin: -3px;
|
||||
height: 28px;
|
||||
width: 28px;
|
||||
}
|
||||
|
||||
#entriesListBackground{
|
||||
position: absolute;
|
||||
left: 0px;
|
||||
|
@ -968,28 +1001,47 @@ button#zoomResetButton{
|
|||
cursor: pointer;
|
||||
}
|
||||
|
||||
#bitcoinWindow{
|
||||
display: none;
|
||||
position: absolute;
|
||||
#bitcoinWindow,
|
||||
#donateWindow{
|
||||
display: inline-block;
|
||||
z-index: 2000;
|
||||
max-width: 400px;
|
||||
left: calc(50% - 200px);
|
||||
background-color: #444444;
|
||||
border: 1px #000000 solid;
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
top: 70px;
|
||||
bottom: 10px;
|
||||
min-height: 50px;
|
||||
max-height: 500px;
|
||||
overflow: auto;
|
||||
height: auto;
|
||||
align-self: center;
|
||||
}
|
||||
|
||||
#bitcoinWindow > *{
|
||||
#donateWindow{
|
||||
top: 20px;
|
||||
max-height: 100%;
|
||||
max-width: 800px;
|
||||
}
|
||||
|
||||
#donateWindow > #bitcoinQR{
|
||||
|
||||
}
|
||||
|
||||
#donateWindow > p{
|
||||
margin: 2px 0px;
|
||||
padding: 0px 20px;
|
||||
text-align: left;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
#bitcoinWindow > *,
|
||||
#donateWindow > *{
|
||||
display: inline-block;
|
||||
margin: 5px 0px;
|
||||
}
|
||||
|
||||
#bitcoinWindow > h2{
|
||||
#bitcoinWindow > h2,
|
||||
#donateWindow > h2{
|
||||
font-weight: 200;
|
||||
background-color: #555555;
|
||||
width: 100%;
|
||||
|
@ -998,17 +1050,19 @@ button#zoomResetButton{
|
|||
text-shadow: 1px 1px 0px #000000;
|
||||
}
|
||||
|
||||
#bitcoinWindow input{
|
||||
#bitcoinWindow input,
|
||||
#donateWindow input{
|
||||
width: 100%;
|
||||
max-width: 350px;
|
||||
font-size: 14px;
|
||||
background-color: #666666;
|
||||
padding: 15px 3px;
|
||||
text-align: center;
|
||||
cursor: text;
|
||||
color: #FFFFFF;
|
||||
}
|
||||
|
||||
#bitcoinWindow button{
|
||||
#bitcoinWindow button,
|
||||
#donateWindow button{
|
||||
padding: 10px 20px;
|
||||
margin-bottom: 20px;
|
||||
margin-top: 10px;
|
||||
|
|
|
@ -0,0 +1,36 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
version="1.1"
|
||||
width="63.97776"
|
||||
height="63.985764"
|
||||
id="svg2">
|
||||
<defs
|
||||
id="defs4" />
|
||||
<metadata
|
||||
id="metadata7">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title></dc:title>
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<g
|
||||
transform="translate(-239.44047,-363.22698)"
|
||||
id="layer1">
|
||||
<path
|
||||
d="m 290.96332,384.19885 c -0.59424,-6.27896 -6.01049,-8.39164 -12.8518,-9.00126 l 0.0128,-8.70824 -5.30062,-0.007 -0.0123,8.47872 c -1.39346,-0.002 -2.81788,0.0235 -4.23308,0.0496 l 0.0135,-8.53485 -5.29778,-0.008 -0.0149,8.70575 c -1.14765,0.0217 -2.27469,0.0414 -3.3736,0.0405 l -5.3e-4,-0.0271 -7.31086,-0.0134 -0.007,5.66124 c 0,0 3.91442,-0.0688 3.84925,0.003 2.14703,0.004 2.84397,1.25133 3.04562,2.32724 l -0.0143,9.92049 c 0.14815,0.001 0.34143,0.008 0.56022,0.0378 -0.17659,-3e-5 -0.36561,-0.002 -0.55995,-1.2e-4 l -0.022,13.89765 c -0.0952,0.67556 -0.49402,1.75232 -1.99407,1.75269 0.0678,0.0602 -3.85316,-0.007 -3.85316,-0.007 l -1.06259,6.32874 6.89801,0.01 c 1.28367,0.003 2.54669,0.0271 3.78665,0.0368 l -0.0109,8.80736 5.29494,0.009 0.0128,-8.71427 c 1.45379,0.0322 2.86073,0.0459 4.23429,0.0466 l -0.0152,8.67412 5.30061,0.007 0.0147,-8.79173 c 8.91219,-0.49805 15.1527,-2.73385 15.93965,-11.10113 0.63533,-6.73752 -2.53,-9.74895 -7.5868,-10.97123 3.07554,-1.56033 5.00104,-4.31475 4.55848,-8.90928 z m -7.44387,18.82121 c -0.007,6.58182 -11.27551,5.81643 -14.86789,5.81449 l 0.0187,-11.66923 c 3.59343,0.006 14.85983,-1.01023 14.84919,5.85474 z m -2.44078,-16.46738 c -0.0106,5.98811 -9.40836,5.27536 -12.40064,5.27116 l 0.016,-10.58348 c 2.99229,0.004 12.39322,-0.93337 12.38461,5.31232 z"
|
||||
id="path3010"
|
||||
style="fill:#ffffff" />
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 2.2 KiB |
22731
web/_js/atlas.js
22731
web/_js/atlas.js
File diff suppressed because it is too large
Load Diff
|
@ -224,7 +224,7 @@ function initDraw(){
|
|||
jsonString = " "+jsonString;
|
||||
textarea.value = jsonString;
|
||||
|
||||
exportOverlay.style.display = "block";
|
||||
exportOverlay.style.display = "flex";
|
||||
|
||||
textarea.focus();
|
||||
textarea.select();
|
||||
|
|
|
@ -46,6 +46,15 @@ var lastPosition = [0, 0];
|
|||
|
||||
var viewportSize = [0, 0];
|
||||
|
||||
document.getElementById("donateButton").addEventListener("click", function(e){
|
||||
document.getElementById("bitcoinQR").src = "./_img/bitcoinQR.png?from=index";
|
||||
document.getElementById("donateOverlay").style.display = "flex";
|
||||
});
|
||||
|
||||
document.getElementById("closeBitcoinButton").addEventListener("click", function(e){
|
||||
document.getElementById("donateOverlay").style.display = "none";
|
||||
});
|
||||
|
||||
function applyView(){
|
||||
|
||||
//console.log(zoomOrigin, scaleZoomOrigin);
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -38,7 +38,7 @@
|
|||
|
||||
<meta name="viewport" content="width=device-width, height=device-height, initial-scale=1">
|
||||
|
||||
<link href="./_css/style.css?version=1.0.31" rel="stylesheet" type="text/css" media="all">
|
||||
<link href="./_css/style.css?version=1.0.32" rel="stylesheet" type="text/css" media="all">
|
||||
</head>
|
||||
<body>
|
||||
<div id="wrapper">
|
||||
|
@ -58,12 +58,14 @@
|
|||
Code by <a href="/" target="_blank" rel="author">Roland Rytz</a>. Source on <a target="_blank" href="https://github.com/RolandR/place-atlas">GitHub</a>.
|
||||
</div>
|
||||
|
||||
<div id="bitcoinWindow">
|
||||
<h2>My Bitcoin Address</h2>
|
||||
<img src="./_img/bitcoinQR.png" height="300" width="300">
|
||||
<input type="text" onclick="this.select();" readonly value="1DnBGYpH6HZYHvpCq3QqqtH1HxwwVe2QxN">
|
||||
<br>
|
||||
<button id="closeBitcoinButton">Close</button>
|
||||
<div class="overlay" id="bitcoinOverlay">
|
||||
<div id="bitcoinWindow">
|
||||
<h2>My Bitcoin Address</h2>
|
||||
<img src="./_img/bitcoinQR.png" height="300" width="300">
|
||||
<input type="text" onclick="this.select();" readonly value="1DnBGYpH6HZYHvpCq3QqqtH1HxwwVe2QxN">
|
||||
<br>
|
||||
<button id="closeBitcoinButton">Close</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="aboutContainer">
|
||||
|
@ -73,7 +75,7 @@
|
|||
<p>This is an Atlas aiming to chart all the artworks created during the <a href="https://www.reddit.com/r/place/">/r/place</a> April's fools event on <a href="https://www.reddit.com/" target="_blank">Reddit</a> in 2017.</p>
|
||||
<p>The code was developed by <a href="/" target="_blank" rel="author">Roland Rytz</a> (<a href="mailto:roland.rytz@gmail.com" target="_blank">mail</a>, <a href="https://reddit.com/user/draemmli/" target="_blank">reddit</a>) and is available under the free <a href="https://www.gnu.org/licenses/agpl-3.0.en.html" target="_blank">AGPL license</a> on <a target="_blank" href="https://github.com/RolandR/place-atlas">GitHub</a>.</p>
|
||||
<br>
|
||||
<p>I have worked on the Atlas full-time (and more!) for almost two weeks.</p>
|
||||
<p>I have worked on the Atlas full-time (and more!) for over two weeks.</p>
|
||||
<p>If you'd like to support me, you can do so by <a target="_blank" href="https://paypal.me/draemmli">PayPal</a> or <a title="Click to see my address." id="bitcoinButton" role="button">Bitcoin</a>.</p>
|
||||
<p>If you donate more than 10(€/$/CHF/mBTC), I'll send you a nice sticker of the Place canvas!</p>
|
||||
<p id="bitcoinNotice">If you donate by Bitcoin and want a sticker, please send me a<br>message with your Bitcoin address <i>before</i> you make the transaction!</a>
|
||||
|
@ -869,11 +871,11 @@
|
|||
<script type="text/javascript">
|
||||
|
||||
document.getElementById("closeBitcoinButton").addEventListener("click", function(e){
|
||||
document.getElementById("bitcoinWindow").style.display = "none";
|
||||
document.getElementById("bitcoinOverlay").style.display = "none";
|
||||
});
|
||||
|
||||
document.getElementById("bitcoinButton").addEventListener("click", function(e){
|
||||
document.getElementById("bitcoinWindow").style.display = "block";
|
||||
document.getElementById("bitcoinOverlay").style.display = "flex";
|
||||
});
|
||||
|
||||
</script>
|
||||
|
|
|
@ -41,7 +41,7 @@
|
|||
<meta name="viewport" content="width=device-width, height=device-height, initial-scale=1, minimum-scale=1, maximum-scale=1, user-scalable=no, shrink-to-fit=no">
|
||||
<meta name="mobile-web-app-capable" content="yes">
|
||||
|
||||
<link href="./_css/style.css?version=1.0.31" rel="stylesheet" type="text/css" media="all">
|
||||
<link href="./_css/style.css?version=1.0.32" rel="stylesheet" type="text/css" media="all">
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
@ -81,6 +81,12 @@
|
|||
<nav>
|
||||
<a id="aboutLink" href="./about.html">About</a>
|
||||
<a id="drawLink" href="./?mode=draw">Contribute</a>
|
||||
<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="./_img/bitcoin.svg">
|
||||
-->
|
||||
</button>
|
||||
</nav>
|
||||
<div id="entriesListControls">
|
||||
<input autofocus id="searchList" type="text" placeholder="Search...">
|
||||
|
@ -156,6 +162,23 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<div id="donateOverlay" class="overlay">
|
||||
<div id="donateWindow">
|
||||
<h2>Donations</h2>
|
||||
<p>I have worked on the Atlas full-time (and more!) for over two weeks.</p>
|
||||
<p>If you'd like to support me, you can do so by <a target="_blank" href="https://paypal.me/draemmli">PayPal</a> or Bitcoin.</p>
|
||||
<p>If you donate more than 10(€/$/CHF/mBTC), I'll send you a nice sticker of the Place canvas!</p>
|
||||
<p id="bitcoinNotice">If you donate by Bitcoin and want a sticker, please send me a<br>message with your Bitcoin address <i>before</i> you make the transaction!</a>
|
||||
|
||||
<h2>My Bitcoin Address</h2>
|
||||
<img id="bitcoinQR" alt="QR Code of Bitcoin Address" height="300" width="300">
|
||||
<br>
|
||||
<input type="text" onclick="this.select();" readonly value="1DnBGYpH6HZYHvpCq3QqqtH1HxwwVe2QxN">
|
||||
<br>
|
||||
<button id="closeBitcoinButton">Close</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="author">
|
||||
Code by <a href="/" target="_blank" rel="author">Roland Rytz</a>. Source on <a target="_blank" href="https://github.com/RolandR/place-atlas">GitHub</a>.
|
||||
</div>
|
||||
|
@ -164,20 +187,20 @@
|
|||
|
||||
|
||||
|
||||
<!--
|
||||
<script type="text/javascript" src="./_js/pointInPolygon.js?version=1.0"></script>
|
||||
<script type="text/javascript" src="./_js/atlas.js?version=1.0.50"></script>
|
||||
<script type="text/javascript" src="./_js/view.js?version=1.0.4"></script>
|
||||
<script type="text/javascript" src="./_js/overlap.js?version=1.0.4"></script>
|
||||
<script type="text/javascript" src="./_js/draw.js?version=1.0.3"></script>
|
||||
<script type="text/javascript" src="./_js/main.js?version=1.0.3"></script>
|
||||
-->
|
||||
|
||||
<!--
|
||||
<script type="text/javascript" src="./_js/stats.js?version=1.0.0"></script>
|
||||
-->
|
||||
|
||||
<!--
|
||||
<script type="text/javascript" src="./_js/minified.js?version=1.0.99"></script>
|
||||
-->
|
||||
<script type="text/javascript" src="./_js/minified.js?version=1.0.101"></script>
|
||||
|
||||
|
||||
</body>
|
||||
|
|
Loading…
Reference in New Issue