Skip to content
This repository has been archived by the owner on Jun 14, 2024. It is now read-only.

dev -> 1.2.1 #15

Merged
merged 7 commits into from
Nov 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 10 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
![orbis-unum](https://github.com/rly0nheart/orbis-unum/assets/74001397/e26e1cc5-98bb-4bce-9e0a-0383ba16b4cd)
![orbis-unum](https://github.com/rly0nheart/orbis-unum/assets/74001397/2465159d-fb32-49d2-8fec-8beb974f5a01)


**Orbis Unum** is a cross-platform geolocation tool that transforms raw *IP addresses* and *geographical coordinates* into interactive visualizations on a map. With its intuitive interface, users can effortlessly navigate whether they're operating from the command line or using its web-based instance.
Expand All @@ -7,19 +7,18 @@

## 🔍 What Does Orbis Unum Offer?
### Command-Line Interface
- [x] Accepts either a standalone IP or a file loaded with multiple IP addresses.
- [x] Generates an interactive OpenStreetMap with pinpoint accuracy for each IP's location.
* **Accepts either a standalone IP or a file loaded with multiple IP addresses.**
* **Generates an interactive OpenStreetMap with pinpoint accuracy for each IP's location.**
#### On selecting any pin, you uncover:
- [x] Vital IP/Coordinates metadata.
- [x] Seamless links to:

* Google Earth for a top-down view or the location.
* Google Maps Street View for a closer look at the surroundings of the location.
* Google Image Search to view images of the location and its surroundings.
* **Vital IP/Coordinates metadata**.
* <ins>**Seamless links to**</ins>:
* **Google Earth** for a top-down view or the location.
* **Google Maps Street View** for a closer look at the surroundings of the location.
* **Google Image Search** to view images of the location and its surroundings.

### Web Interface
- [x] Accepts individual or bulk pairs of coordinates.
- [x] Mirrors the CLI's functionality, providing an immersive mapping experience.
* **Accepts individual or bulk pairs of coordinates.**
* **Mirrors the CLI's functionality, providing an immersive mapping experience.**

# Installation
**Orbis Unum** can be installed from PyPI with the following command
Expand Down
2 changes: 1 addition & 1 deletion orbis_unum/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
__author__ = "Richard Mwewa"
__about__ = "https://about.me/rly0nheart"
__version__ = "1.2.0"
__version__ = "1.2.1"

__description__ = """# Orbis Unum
> 🌍 IP Geolocator & Coordinate Mapping tool 📍"""
Expand Down
52 changes: 21 additions & 31 deletions orbis_unum/templates/map.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
<head>
<meta charset="utf-8"/>
<title>🗺️ {{ current_user }}@orbis - {{ map_name }}</title>

<!-- Include the Leaflet CSS library -->
<link rel="stylesheet" href="https://unpkg.com/leaflet@1.9.4/dist/leaflet.css"/>
<style>
Expand All @@ -18,53 +17,44 @@
</style>
</head>
<body>
<!-- Create a div where the map will be placed -->
<div id="map"></div>

<!-- Include the Leaflet JavaScript library -->
<script src="https://unpkg.com/leaflet@1.9.4/dist/leaflet.js"></script>

<script>
// Initialize the map and set its initial view to coordinates [0, 0] at zoom level 2
var map = L.map('map').setView([0, 0], 2);
// Initialize the map and set its initial view to coordinates [0, 0] at zoom level 2
var map = L.map('map').setView([0, 0], 2);

// Add the Esri World Imagery tile layer to the map as the satellite layer
var mapLink = '<a href="http://www.esri.com/">Esri</a>';
var wholink = 'i-cubed, USDA, USGS, AEX, GeoEye, Getmapping, Aerogrid, IGN, IGP, UPR-EGP, and the GIS User Community';
L.tileLayer(
// Add the Esri World Imagery tile layer to the map as the satellite layer
var mapLink = '<a href="http://www.esri.com/">Esri</a>';
var wholink = 'Source: Esri, i-cubed, USDA, USGS, AEX, GeoEye, Getmapping, Aerogrid, IGN, IGP, UPR-EGP, and the GIS User Community';
L.tileLayer(
'https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}', {
attribution: '&copy; '+mapLink+', '+wholink,
maxZoom: 18,
}).addTo(map);
}).addTo(map);

// Create a popup
var popup = L.popup();
// Create a popup
var popup = L.popup();

// Iterate over the list of location data and create a marker for each location
{% for data in map_data %}
L.marker([{{ data.location.lat }}, {{ data.location.lon }}])
{% for data in map_data %}
L.marker([{{ data.location.lat }}, {{ data.location.lon }}])
.bindPopup('<i>{{ data.location.display_name }}</i>' +
'<br><b>🛰️ Earth:</b> <a href="https://earth.google.com/web/@{{ data.location.lat }},{{ data.location.lon }},89.06331136a,12094.0505788d,1y,1.97597436h,60t,-0r/data=KAI" target="_blank">View</a>' +
'<br><b>🏞️ Images:</b> <a href="https://google.com/search?tbm=isch&q={{ data.location.display_name }}" target="_blank">Show</a>' +
'<br><b>🪟 Street View:</b> <a href="https://www.google.com/maps/@?api=1&map_action=pano&viewpoint={{ data.location.lat }},{{ data.location.lon }}" target="_blank">View</a>' +
'{% if data.ip_address %}<br><b>🖥️ IP Address:</b> {{ data.ip_address }}{% endif %}' +
'<br><b>🌐 Latitude:</b> {{ data.location.lat }}' +
'<br><b>🌐 Longitude:</b> {{ data.location.lon }}')
.addTo(map)
.openPopup();
{% endfor %}

// Function to handle clicks on the map
function onMapClick(e) {
popup
.setLatLng(e.latlng)
.setContent("🖱️ You clicked the map at " + e.latlng.toString())
.openOn(map);
}

// Add a click event listener to the map
map.on('click', onMapClick);
.addTo(map);
{% endfor %}

function onMapClick(e) {
popup
.setLatLng(e.latlng)
.setContent("🖱️ You clicked the map at " + e.latlng.toString())
.openOn(map);
}

map.on('click', onMapClick);
</script>
</body>
</html>
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ include = [
{ path = "orbis/templates/index.html" }
]
name = "orbis-unum"
version = "1.2.0"
version = "1.2.1"
description = "🌍 IP Geolocator & Coordinate Mapping tool 📍"
authors = ["Richard Mwewa <rly0nheart@duck.com>"]
readme = "README.md"
Expand Down