The semi-complete teardown of Cosmo's Cosmic Adventure.

Overview

Cosmodoc

The Doc for Cosmo.

Build the site

This requires a working hugo binary.

cd src
hugo --path-warnings --templateMetrics

A valid absolute path (with protocol) should be provided for --baseURL in production environments, although this only affects the OpenGraph, wget footer, robots.txt, and sitemap.xml outputs.

Output files are stored in the top-level public/ directory. This is an appropriate place to point an HTTP server's document root.

Renumber the content pages

If there are two pages with weights 10 and 20, a new page can be placed in-between by giving it a weight of 15. After a while there may be a shortage of free weight values to adequately sort new pages. If that happens, run:

scripts/renumber.py

This will renumber all of the pages in even increments of 10.

Build the images

The final images are already committed to the repo to ease deployment. It should not be necessary to do this procedure under normal circumstances unless an image has been changed or added. This requires working inkscape, pngquant, and optipng binaries.

Image source material is in the imgsrc/ directory, which mirrors the naming convention and structure of src/content/topics/. The master list of all source files and the list of resized versions to build are in imgsrc/manifest.txt.

scripts/imgmake.py

The script tries not to rebuild existing files unless the source was modified more recently then the existing destination. This relies on the filesystem having sane mtimes on all the files.

To forcefully delete all builable image versions, run:

scripts/imgmake.py clean

Build the content data files

In the below examples, $FILE and $DIR are things you know how to fill in correctly.

scripts/generate.py actor -c $FILE > src/data/actor.json
scripts/generate.py font > src/data/font.json
scripts/generate.py map -d $DIR > src/data/map.json
scripts/generate.py music -d $DIR > src/data/music.json
scripts/generate.py sound -d $DIR > src/data/sound.json
scripts/generate.py sprite -f ACTRINFO.MNI > src/data/actor_sprite.json
scripts/generate.py sprite -f PLYRINFO.MNI > src/data/player_sprite.json
scripts/generate.py sprite -f CARTINFO.MNI > src/data/cartoon_sprite.json

Audio conversion

Just use whatever FFmpeg generates by default. Quality 4 is "good enough."

ffmpeg -i in.wav -q:a 4 out.mp3
ffmpeg -i in.wav -q:a 4 out.m4a

The M4A/AAC files sometimes sound kinda goofy. There's probably a way to correct that with a command option.

What's the current word count?

It's never going to be exact with this type of writing -- too many symbols and embedded shortcodes. Still, this feels pretty close.

find src/content \( -iname '*.md' -o -iname '*.yml' \) -exec cat {} + | \
    sed "s/[^0-9A-Za-z',]/ /g" | wc -w

or...

find public/ -iname '*.html' -exec html2text --ignore-links \
    --ignore-emphasis --ignore-images {} \; | wc -w

Round it down to the nearest 1,000.

Owner
Scott Smitelli
Web Guy, Sound Guy
Scott Smitelli
An example file showing a simple endpoints like a login/logout function and maybe some others.

Flask API Example An example project showing a simple endpoints like a login/logout function and maybe some others. How to use: Open up your IDE (or u

Kevin 1 Oct 27, 2021
Automatically re-open threads when they get archived, no matter your boost level!

ThreadPersist Automatically re-open threads when they get archived, no matter your boost level! Installation You will need to install poetry to run th

7 Sep 18, 2022
Simple tools to make/dump CPC+ CPR cartridge files

Simple tools to make/dump CPC+ CPR cartridge files mkcpr.py: make a CPR file from files (one chunk per file); see notes cprdump.py: dump the chunks of

Juan J. Martínez 3 May 30, 2022
Vita Specific Patches and Application for Doki Doki Literature Club (Steam Version) using Ren'Py PSVita

Doki-Doki-Literature-Club-Vita Vita Specific Patches and Application for Doki Doki Literature Club (Steam Version) using Ren'Py PSVita Contains: Modif

Jaylon Gowie 25 Dec 30, 2022
Python library for datamining glitch information from Gen 1 Pokémon GameBoy ROMs

g1utils This is a Python library for datamining information about various glitches (glitch Pokémon, glitch maps, etc.) from Gen 1 Pokémon ROMs. TODO A

1 Jan 13, 2022
Stock Monitoring

Stock Monitoring Description It is a stock monitoring script. This repository is still under developing. Getting Started Prerequisites & Installing pi

Sission 1 Feb 03, 2022
A Python application that helps users determine their calorie intake, and automatically generates customized weekly meal and workout plans based on metrics computed using their physical parameters

A Python application that helps users determine their calorie intake, and automatically generates customized weekly meal and workout plans based on metrics computed using their physical parameters

Anam Iqbal 1 Jan 13, 2022
Яндекс тренировки по алгоритмам. Июнь 2021

Young&&Yandex Тренировки по алгоритмам Если вы хотите попасть на летнюю стажировку в Яндекс, но пока не уверены в своих силах, приходите на наши трени

Podlevskiy Viktor 6 Sep 03, 2021
Mechanized literally means automation.

Mechanized literally means automation. And this branch which you are now observing is automated by the python script. This python project actually automates my workflow related to Git & Github.

Shreejan Dolai 4 Nov 11, 2022
For my Philips Airpurifier AC3259/10

Philips-Airpurifier For my Philips Airpurifier AC3259/10 I will try to keep this code

AcidSleeper 7 Feb 26, 2022
A desktop app to check the unlocked courses bases on previously done courses.

Course Picker A desktop app to check the unlocked courses bases on previously done courses. Table of contents About the Project Built with What it doe

Ahmed Symum Swapno 3 Feb 07, 2022
Given an array of integers, calculate the ratios of its elements that are positive, negative, and zero.

Given an array of integers, calculate the ratios of its elements that are positive, negative, and zero. Print the decimal value of each fraction on a new line with places after the decimal.

Shruti Dhave 2 Nov 29, 2021
Home Assistant integration for spanish electrical data providers (e.g., datadis)

homeassistant-edata Esta integración para Home Assistant te permite seguir de un vistazo tus consumos y máximas potencias alcanzadas. Para ello, se ap

VMG 163 Jan 05, 2023
This is the Quiz that I made using Python Programming Language. This can only run in the Terminal

This is the Quiz that I made using Python Programming Language. This can only run in the Terminal

YOSHITHA RATHNAYAKE 1 Apr 08, 2022
Decoupled Smoothing in Probabilistic Soft Logic

Decoupled Smoothing in Probabilistic Soft Logic Experiments for "Decoupled Smoothing in Probabilistic Soft Logic". Probabilistic Soft Logic Probabilis

Kushal Shingote 1 Feb 08, 2022
This speeds up PyCharm's package index processes and avoids CPU & memory overloading

This speeds up PyCharm's package index processes and avoids CPU & memory overloading

1 Feb 09, 2022
Create standalone, installable R Shiny apps using Electron

WARNING This is still very much a work in progress and nothing can be assumed stable in any way Temp notes: Two types of created installer, based on w

Chase Clark 5 Dec 24, 2021
Multtable is a collection of multiplication table generators in various languages.

Multtable Multtable is a collection of multiplication table generators in various languages. This project was created as a joke based on one of my bro

pollen__ 7 Mar 05, 2022
Simple python code for compile brainfuck program.

py-brainf*ck Just a basic compiled that compiles your brainf*ck codes and gives you informations about memory, used cells, dumped version, logs etc...

4 Jun 13, 2021
This is where I learn machine learning

This is where I learn machine learning🤷‍ This means that this repo covers no specific topic of machine learning or a project - I work in here when I want to learn/try something

Wilhelm Berghammer 47 Nov 16, 2022