Try it... Wait 1 minute after sending your email before clicking on the yellow face
This commit is contained in:
parent
e3f7162432
commit
fe97b57d4f
|
@ -17,9 +17,10 @@ You receive an access to this crypto landing recorded into IPFS.
|
|||
Get Friends.
|
||||
Explore Trust.
|
||||
|
||||
* For LOCALHOST : http://ipfs.localhost:8080/ipfs/Qme4r4fHf6VfaqoXobTnzjWVwBRhRPzMazJyrZ9ubbdJMP/ (PROD)
|
||||
Choose your Astroport style
|
||||
|
||||
* For WAN : https://ipfs.copylaradio.com/ipfs/QmZjtNz7iNgPiULbyT2Zyi6QHGXt8WqKo1DzKkM5EKPLfL/ (DEMO ONLY)
|
||||
* LOCALHOST : http://ipfs.localhost:8080/ipfs/QmYJ2Ri1ygL7ZFTamP3gcc5VZwxhE685bWJnXSVkvNFJfF/ (DEV)
|
||||
* WAN : https://ipfs.copylaradio.com/ipfs/QmZjtNz7iNgPiULbyT2Zyi6QHGXt8WqKo1DzKkM5EKPLfL/ (DEMO SNAPSHOT)
|
||||
|
||||
|
||||
Enjoy Life
|
||||
|
|
|
@ -0,0 +1,16 @@
|
|||
const puppeteer = require('puppeteer');
|
||||
|
||||
function timeout(ms) {
|
||||
return new Promise(resolve => setTimeout(resolve, ms));
|
||||
};
|
||||
|
||||
(async() => {
|
||||
const browser = await puppeteer.launch();
|
||||
const page = await browser.newPage();
|
||||
await page.setViewport({width: 5960, height: 4209})
|
||||
await page.goto('https://ipfs.copylaradio.com/ipfs/QmYJ2Ri1ygL7ZFTamP3gcc5VZwxhE685bWJnXSVkvNFJfF/Umap.html?southWestLat=0.00&southWestLon=0.00°=0.01', {waitUntil: 'networkidle'});
|
||||
await timeout(10000)
|
||||
await page.screenshot({path: '/tmp/Umap.png'});
|
||||
browser.close();
|
||||
|
||||
})();
|
|
@ -0,0 +1,42 @@
|
|||
#!/usr/bin/python3
|
||||
import argparse
|
||||
import asyncio
|
||||
from pyppeteer import launch
|
||||
|
||||
async def main(zoom_level, tile_lat, tile_lon):
|
||||
browser = await launch(headless=True, executablePath='/usr/bin/chromium')
|
||||
page = await browser.newPage()
|
||||
|
||||
tileSize = 360 / pow(2, zoom_level)
|
||||
tile_count = 1 # In this case, capture a single tile
|
||||
|
||||
tile_increment = tileSize * tile_count
|
||||
|
||||
# Calculate tile coordinates based on input parameters
|
||||
tile_lat = float(tile_lat)
|
||||
tile_lon = float(tile_lon)
|
||||
|
||||
url = f'https://ipfs.copylaradio.com/QmTJt12iDKtc57Gm6sT8VaJoYrLzwUUgxCrsexaouWzRb1/Umap.html?southWestLat={tile_lat}&southWestLon={tile_lon}°=0.01'
|
||||
|
||||
await page.goto(url)
|
||||
|
||||
# Wait for a longer time (e.g., 5 seconds) to ensure the page is fully loaded
|
||||
await asyncio.sleep(5)
|
||||
|
||||
file_name = f'/tmp/Umap_{tile_lat:.3f}_{tile_lon:.3f}.png'
|
||||
|
||||
await page.screenshot({'path': file_name})
|
||||
|
||||
await browser.close()
|
||||
|
||||
if __name__ == "__main__":
|
||||
parser = argparse.ArgumentParser(description="Capture a map tile screenshot with custom parameters")
|
||||
parser.add_argument("--zoom", type=int, help="Zoom level")
|
||||
parser.add_argument("--lat", type=float, help="Tile latitude")
|
||||
parser.add_argument("--lon", type=float, help="Tile longitude")
|
||||
args = parser.parse_args()
|
||||
|
||||
if not args.zoom or not args.lat or not args.lon:
|
||||
print("Please provide valid values for zoom, lat, and lon.")
|
||||
else:
|
||||
asyncio.get_event_loop().run_until_complete(main(args.zoom, args.lat, args.lon))
|
|
@ -64,9 +64,9 @@
|
|||
return results === null ? '' : decodeURIComponent(results[1].replace(/\+/g, ' '));
|
||||
}
|
||||
|
||||
const defaultSouthWestLat = 0.000;
|
||||
const defaultSouthWestLon = 0.000;
|
||||
const defaultOffsetDegrees = 10.000; // 10° offset
|
||||
const defaultSouthWestLat = 0.00;
|
||||
const defaultSouthWestLon = 0.00;
|
||||
const defaultOffsetDegrees = 10.00; // 10° offset
|
||||
|
||||
const southWestLat = parseFloat(getUrlParameter('southWestLat')) || defaultSouthWestLat;
|
||||
console.log('Lat:', southWestLat);
|
||||
|
|
Loading…
Reference in New Issue