Introduction
WARNING - BETA! PROCEED AT YOUR OWN RISK!
This guide should walk you through the process of getting one of your modules, PCBs, or stripboard designs listed on kosmodulargrid.com . It assumes no prior knowledge of any of the software tools or websites needed to upload your module. It tries to be as comprehensive as possible for popular operating systems. If there’s something you feel is missing, doesn’t make sense, or needs clarified, please feel free to edit this wiki and add it.
The Process
The basic process for adding your module is as follows:
- Create a GitHub account and generate an API key.
- Install Python, Git, and other dependencies on your computer.
- Download and configure a copy of the module generator script.
- Run the generator script.
Don’t worry if you don’t understand some of these steps - I’ll explain them in due course.
1. GitHub Setup
This step will give you the necessary credentials to connect with the kosmodulargrid database*. We’ll make a GitHub account and generate something called a ‘key’ or ‘token’ which is basically a unique password that lets a third party program log in to your account and carry out tasks on your behalf. In this case those tasks will be copying your module details into the online database and applying for permission from @jackb to make those changes go live on the site for the world to see. Let’s get started!
-
Go to github.com and either create an account or login. This is a fairly standard sign up process. Make sure you verify your email as some of the later steps won’t work if your account is unverified.
-
Once your account is set up, click your profile picture in the top right corner.
-
Click Settings.
-
At the bottom of the left panel, click Developer settings.
-
Click Personal access tokens.
-
Click Generate new token.
-
Set the Note to anything you like. This is a reference for you. I’m setting mine to
kmg
.
-
Set the token to never expire. GitHub will complain about this - ignore the warning.
-
Tick the boxes for
repo
,admin:repo_hook
, andread:user
. -
Click the Generate token button.
-
Click the blue copy icon and paste the clipboard into a text file somewhere. Having access to this file gives anyone full write permissions to all your repositories and profile information. Keep this file safe and never share it with anyone. Make sure you copy the key now as you won’t be able to access it later on.
-
You’ve done the first stage! Take some time to sit back, relax, and grab a coffee, before we move on to step 2.
2. Python and Git.
This part is probably the most involved for those new to programming. We’ll need to download some software packages onto your computer. These packages will be:
- Git - this lets us copy the kosmodulargrid database and record our changes to it.
- Python - this is the programming language that we need to be able to run the script to modify the database.
I’ll split these instructions into sections for Windows and Linux. Unfortunately I don’t have a Mac to test the program on so I can’t write detailed instructions for you. Anyone with a Mac and knowledge of this process is welcome to contribute. Also, if you’re running a non Debian version of Linux, you’ll need to fend for yourself.
Installing on Windows
-
Go to Git - Downloading Package and download the latest version of Git for Windows.
-
Run the installer file.
-
Keep the default settings for most options and click Next. The options you should pay attention to are:
- Change the default editor to “Use Notepad as Git’s default editor”
- Make sure “Use Git from the command line and 3rd party software” is checked. This is very important.
- Change the default terminal emulator to “Use Windows’ default console window”
a
-
Git should now be installed. To double check this, press the Windows key + R.
-
Type
cmd
and press return. -
Type
git --version
. The terminal should respond with something likegit version 2.34.1
. -
Now Git is installed we need to download and install Python.
-
Go to Python Releases for Windows | Python.org. At the time of writing, you’ll need to click on “Latest Python 3 release” then scroll down to the “Files” section, where you can then download either the 32-bit or 64-bit installer. (If you’re unsure, use this guide to help you.)
9.Run the installer file. Make sure you tick both of the boxes at the bottom of the window before clicking “Install Now”.
-
Python should now be set up. To test this, press Win+R then type
cmd
and press enter. Typepy
into the command window. It should return a screen like this:
This verifies that Python is working and installed correctly.
Typequit()
and press return to get back to the command prompt. -
Now, we need to use the
cd
command to change directory (switch folder) into our Documents folder, where our module files will be located.
To do this, type in the commandcd %homedrive%%homepath%\Documents
, pressing return afterwards.
Installing on Linux(Debian based distros)
Hey, fellow Linuxians! You’ve got a much easier job than on Windows.
-
Open a terminal and type this command:
sudo apt update && sudo apt install python3 python3-dev git python3-pip
-
Press
y
and enter when prompted. -
Use the cd command to move into your Documents folder.
3. Configure the Module Generator
In this step we’ll download a copy of my module generator script that does a lot of complicated work behind the scenes so you don’t have to. You should open the command window you used earlier (you kept it open right?) and paste in each of these commands one by one, pressing enter after each one.
-
git clone https://github.com/sonosus/kmgenerator.git
-
cd kmgenerator
-
pip install -r requirements.txt
(On some systems you may need to use pip3 instead of pip.) -
Next, in your file manager, navigate to your Documents folder and open the kmgenerator folder.
-
Make a new file named key.txt and paste the token you generated earlier into it. Save this file.
After this, if you need to update the script to the latest version it should be sufficient to navigate to the kmgenerator folder and do:
-
git pull
-
pip install -r requirements.txt
(On some systems you may need to use pip3 instead of pip.)
4. Run the Module Generator
Now we’re ready to run the generator script.
-
In the command prompt window (still open? good!), on Windows enter
py fetchuuid.py
and on Linux enterpython3 fetchuuid.py
. -
If your name is listed in the terminal next to a long string of characters, enter it EXACTLY as it is shown on screen. Make sure you match upper and lower case characters and pay attention to spacing.
2b. If you haven’t got a name then enter your maker name here. This will appear on kosmodulargrid.com next to all your modules and will allow people to apply filters to find said modules. The script will ask you to enter your maker name again. Do so.
It will then ask for a short maker description for example LMNC forum user Analog Output
.
After this is will ask for a maker website. If you don’t have a website then add your forum profile page or your GitHub profile. Make sure you add https://
to the start of the URL.
Press return to continue.
-
Enter the name of your module for example
Kosmic Superspreader
or1222 VCO
. This should be short. You’ll have an opportunity to elaborate on your module later on. -
Enter a longer description of your module. This should be no longer than 2 lines and describe the function of your module, for example
Dual voltage-controlled panner/crossfader with internal LFOs
orSuper simple noise generator with the Electric Druid Noise2 chip.
(note: should we edit the modules that say “Kosmo format…” at the start seeing as it’s implied through the site name?) -
Next enter the width of your module in centimetres, excluding the unit - enter
5
instead of5cm
. -
Now we need a link to your module’s website.You could link to its GitHub page or your own website. MAKE SURE you add
https://
to the start of the link else it might not work on all computers. -
Add a link to the image for your module. If it’s hosted on GitHub, add
?raw=true
to the end of the image address (which can be found through right click->copy image address on most browsers). -
Now scroll back through the terminal and select your module’s function by entering the corresponding number from the list.
-
Choose the number that corresponds to your module’s type. (note: should we merge protoboard into stripboard?)
-
Press return 4 times until a prompt appears that asks if you want to create a second module. If you do, type
Y
and repeat steps 3–10 for the next module. If not, typeN
and the script will proceed to upload this data to GitHub and send a request to @jackb so he can add your changes to the main database. Unless you are using GitHub CLI or Git Credential Manager, you will be asked to authenticate by entering a username and “password”. Use the username you chose when you set up your GitHub account; for the “password” you actually need to enter the personal access token you generated. (It’s easiest to copy and paste it from thekey.txt
file.)
Code feedback and contributions are also much appreciated - I’m not a professional programmer so please don’t be too harsh
Source: GitHub - Sonosus/kmgenerator
*yeah I know it’s not an actual database but it’s the easiest way to describe it for non-coders.