Generate a 3D Skyline in STL format and a OpenSCAD file from Gitlab contributions

Overview

Your Gitlab's contributions in a 3D Skyline

gitlab-skyline is a Python command to generate a skyline figure from Gitlab contributions as Github did at https://skyline.github.com/

~ usage: gitlab-skyline [-h] [--domain [DOMAIN]] [--max_requests [MAX_REQUESTS]] username [year]

Create STL from Gitlab contributions

positional arguments:
  username              Gitlab username (without @)
  year                  Year of contributions to fetch

optional arguments:
  -h, --help            show this help message and exit
  --domain [DOMAIN]     GitlabEE/CE custom domain
  --max_requests [MAX_REQUESTS]
                        Max. simultaneous requests to Gitlab. Don't mess with their server!

Enjoy!

View a sample result of the preview at samples/gitlab_felixgomez_2020.stl and OpenSCAD generated code at samples/gitlab_felixgomez_2020.scad.

Requirements and installation

gitlab-skyline requires python3 and OpenSCAD. (need Python version >= 3.7)

Create your virtual environment as usual and install dependencies with

pip install -r requirements.txt

Install OpenSCAD from https://www.openscad.org/downloads.html and ensure that openSCAD executable is working with

openscad --version

Quickstart

python gitlab-skyline felixgomez 2020

or

./gitlab-skyline felixgomez 2020

if file has execution permissions.

If you want to get contributions from a custom installation you can use

./gitlab-skyline felixgomez 2020 --domain="https://customdomain.dev:8080"

Docker Usage

For convience, a docker image is produced to generate the stl image file for you:

docker run -v $PWD:/data registry.gitlab.com/felixgomez/gitlab-skyline []

Example: docker run -v $PWD:/data registry.gitlab.com/felixgomez/gitlab-skyline felixgomez

To use any custom parameters, simply append to the docker run command.

Using it in private/custom Gitlab installations

As said before, you can use it in custom installations through the --domain modifier.

Don't forget to make your contributions public in your user profile settings.

Motivation

A few days ago I came across the Github skyline web application and it seemed like a good idea to be able to export the activity in skyline format to STL.

It quickly became viral among my friends, but in my daily work I use Gitlab more. That's when I came up with the idea to replicate it for Gitlab: I needed to have my own contribution skyline!

Some details

The project was developed on a Friday afternoon, although I had consulted some information previously, so do not expect quality code and wonders. As always pull requests are welcome! 😍

At first I was thinking to use the well known Gitlab endpoint https://gitlab.com/users/username/calendar.json but the information it provides is for one year back from now.

As far as I know Gitlab does not provide an endpoint to obtain contribution information by year but digging a bit I found that a call to https://gitlab.com/users/username/calendar_activities?date=2021-02-01 returns an HTML response easy to scrape.

I made use of classic BeautifulSoup for scraping, aiohttp and asyncio to go asynchronous and speed up the scraping process.

There is an extra option (--max-requests) to the gitlab-skyline command to control concurrent requests to Github to avoid the "Too many requests" message from their server.

SolidPython is a beautiful piece of code allowing to generate OpenSCAD code from Python.

Inkscape was used to vectorize the Gitlab logo for extrusion (pending to correct the Viewbox due to lack of time).

Mesh optimization

I love openSCAD for a long time but there are some old well known issues related with errors in the generated geometry. If you detect some on the final STL you could use https://www.meshlab.net/ to correct them.

Thanks!

I hope you like it!

Owner
Félix Gómez
Senior developer at @ultreia_es Degree in Physics.
Félix Gómez
The Timescale NFT Starter Kit is a step-by-step guide to get up and running with collecting, storing, analyzing and visualizing NFT data from OpenSea, using PostgreSQL and TimescaleDB.

Timescale NFT Starter Kit The Timescale NFT Starter Kit is a step-by-step guide to get up and running with collecting, storing, analyzing and visualiz

Timescale 102 Dec 24, 2022
Yata is a fast, simple and easy Data Visulaization tool, running on python dash

Yata is a fast, simple and easy Data Visulaization tool, running on python dash. The main goal of Yata is to provide a easy way for persons with little programming knowledge to visualize their data e

Cybercreek 3 Jun 28, 2021
A simple interpreted language for creating basic mathematical graphs.

graphr Introduction graphr is a small language written to create basic mathematical graphs. It is an interpreted language written in python and essent

2 Dec 26, 2021
An interactive GUI for WhiteboxTools in a Jupyter-based environment

whiteboxgui An interactive GUI for WhiteboxTools in a Jupyter-based environment GitHub repo: https://github.com/giswqs/whiteboxgui Documentation: http

Qiusheng Wu 105 Dec 15, 2022
eoplatform is a Python package that aims to simplify Remote Sensing Earth Observation by providing actionable information on a wide swath of RS platforms and provide a simple API for downloading and visualizing RS imagery

An Earth Observation Platform Earth Observation made easy. Report Bug | Request Feature About eoplatform is a Python package that aims to simplify Rem

Matthew Tralka 4 Aug 11, 2022
Comparing USD and GBP Exchange Rates

Currency Data Visualization Comparing USD and GBP Exchange Rates This is a bar graph comparing GBP and USD exchange rates. I chose blue for the UK bec

5 Oct 28, 2021
Visualizations of some specific solutions of different differential equations.

Diff_sims Visualizations of some specific solutions of different differential equations. Heat Equation in 1 Dimension (A very beautiful and elegant ex

2 Jan 13, 2022
Use Perspective to create the chart for the trader’s dashboard

Task Overview | Installation Instructions | Link to Module 3 Introduction Experience Technology at JP Morgan Chase Try out what real work is like in t

Abdulazeez Jimoh 1 Jan 22, 2022
Peloton Stats to Google Sheets with Data Visualization through Seaborn and Plotly

Peloton Stats to Google Sheets with Data Visualization through Seaborn and Plotly Problem: 2 peloton users were looking for a way to track their metri

9 Jul 22, 2022
kyle's vision of how datadog's python client should look

kyle's datadog python vision/proposal not for production use See examples/comprehensive.py for a mostly working example of the proposed API. 📈 🐶 ❤️

Kyle Verhoog 2 Nov 21, 2021
An animation engine for explanatory math videos

Powered By: An animation engine for explanatory math videos Hi there, I'm Zheer 👋 I'm a Software Engineer and student!! 🌱 I’m currently learning eve

Zaheer ud Din Faiz 2 Nov 04, 2021
Flipper Zero documentation repo

Flipper Zero Docs Participation To fix a bug or add something new to this repository, you need to open a pull-request. Also, on every page of the site

Flipper Zero (All Repositories will be public soon) 114 Dec 30, 2022
Simple function to plot multiple barplots in the same figure.

Simple function to plot multiple barplots in the same figure. Supports padding and custom color.

Matthias Jakobs 2 Feb 21, 2022
Pglive - Pglive package adds support for thread-safe live plotting to pyqtgraph

Live pyqtgraph plot Pglive package adds support for thread-safe live plotting to

Martin Domaracký 15 Dec 10, 2022
Sky attention heatmap of submissions to astrometry.net

astroheat Installation Requires Python 3.6+, Tested with Python 3.9.5 Install library dependencies pip install -r requirements.txt The program require

4 Jun 20, 2022
An interactive dashboard for visualisation, integration and classification of data using Active Learning.

AstronomicAL An interactive dashboard for visualisation, integration and classification of data using Active Learning. AstronomicAL is a human-in-the-

45 Nov 28, 2022
A concise grammar of interactive graphics, built on Vega.

Vega-Lite Vega-Lite provides a higher-level grammar for visual analysis that generates complete Vega specifications. You can find more details, docume

Vega 4k Jan 08, 2023
Interactive chemical viewer for 2D structures of small molecules

👀 mols2grid mols2grid is an interactive chemical viewer for 2D structures of small molecules, based on RDKit. ➡️ Try the demo notebook on Google Cola

Cédric Bouysset 154 Dec 26, 2022
view cool stats related to your discord account.

DiscoStats cool statistics generated using your discord data. How? DiscoStats is not a service that breaks the Discord Terms of Service or Community G

ibrahim hisham 5 Jun 02, 2022
The interactive graphing library for Python (includes Plotly Express) :sparkles:

plotly.py Latest Release User forum PyPI Downloads License Data Science Workspaces Our recommended IDE for Plotly’s Python graphing library is Dash En

Plotly 12.7k Jan 05, 2023