aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/filters/about-formatting.sh
blob: d0242047c1007e01b911853827db292bfbcfbd40 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#!/bin/sh

# This may be used with the about-filter or repo.about-filter setting in cgitrc.
# It passes formatting of about pages to differing programs, depending on the usage.

# Markdown support requires perl.
# RestructuredText support requires python and docutils.
# Man page support requires groff.

# The following environment variables can be used to retrieve the configuration
# of the repository for which this script is called:
# CGIT_REPO_URL        ( = repo.url       setting )
# CGIT_REPO_NAME       ( = repo.name      setting )
# CGIT_REPO_PATH       ( = repo.path      setting )
# CGIT_REPO_OWNER      ( = repo.owner     setting )
# CGIT_REPO_DEFBRANCH  ( = repo.defbranch setting )
# CGIT_REPO_SECTION    ( = section        setting )
# CGIT_REPO_CLONE_URL  ( = repo.clone-url setting )

cd "$(dirname $0)/html-converters/"
case "$(printf '%s' "$1" | tr '[:upper:]' '[:lower:]')" in
	*.markdown|*.mdown|*.md|*.mkd) exec ./md2html; ;;
	*.rst) exec ./rst2html; ;;
	*.[1-9]) exec ./man2html; ;;
	*.htm|*.html) exec cat; ;;
	*.txt|*) exec ./txt2html; ;;
esac
= 0x800 (default) # heap_size = 0x5000 (changed) # mem_left = sram_size - (stack_size + heap_size) = 0x3c800 # We still have to factor in global variables, so this is not precise. The best place for information seems to be the pico-wath.elf.map file. # Small size used for testing, seems to work fine. add_compile_definitions(PICO_HEAP_SIZE=0x200) # Initialise the Pico SDK pico_sdk_init() # Add OLED library add_library(Oled oled/BitBang_I2C.c oled/BitBang_I2C.h oled/ss_oled.c oled/ss_oled.h ) target_link_libraries(Oled pico_stdlib hardware_i2c) # Main code add_executable(pico-watch pico-watch.cpp init.cpp init.hpp buttons.cpp buttons.hpp api.cpp api.hpp apps/home_menu.cpp apps/home_menu.hpp apps/main_clock.cpp apps/main_clock.hpp apps/settings/main.cpp apps/settings/main.hpp ) pico_set_program_name(pico-watch "pico-watch") pico_set_program_version(pico-watch "0.1") # To access uart on a Pico connected directly to a Raspberry Pi (4 B): `minicom -b 115200 -o -D /dev/ttyS0` pico_enable_stdio_uart(pico-watch 1) # Add the standard library to the build target_link_libraries(pico-watch pico_stdlib) # Add any user requested libraries target_link_libraries(pico-watch Oled hardware_rtc hardware_sync # For use of __wfi() ) pico_add_extra_outputs(pico-watch)