GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Star on GitHub: quiet links with the live count, one nudge after the … · jetzhu/MorseCodeAudioCoder@0826879

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • README.md
  • docs
    • INTERFACES.md
    • PROMOTION.md
  • morse
    • __init__.py
    • ui.py
  • tests
    • test_ui_offscreen.py
  • web
    • css
      • app.css
    • index.html
    • js
      • app.js
    • test
      • seo.test.mjs
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎README.md‎

Copy file name to clipboardExpand all lines: README.md
+4Lines changed: 4 additions & 0 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Beeper Morse Console: Morse code simulator, decoder and trainer
22

3+
[![GitHub stars](https://img.shields.io/github/stars/jetzhu/MorseCodeAudioCoder?style=social)](https://github.com/jetzhu/MorseCodeAudioCoder/stargazers)
4+
[![Latest release](https://img.shields.io/github/v/release/jetzhu/MorseCodeAudioCoder?display_name=tag)](https://github.com/jetzhu/MorseCodeAudioCoder/releases/latest)
5+
[![CI](https://github.com/jetzhu/MorseCodeAudioCoder/actions/workflows/ci.yml/badge.svg)](https://github.com/jetzhu/MorseCodeAudioCoder/actions/workflows/ci.yml)
6+
37
Live page: <https://jetzhu.github.io/MorseCodeAudioCoder/> (browser, nothing
48
uploaded). Windows desktop app on the [releases page](https://github.com/jetzhu/MorseCodeAudioCoder/releases/latest).
59

Collapse file

‎docs/INTERFACES.md‎

Copy file name to clipboardExpand all lines: docs/INTERFACES.md
+7Lines changed: 7 additions & 0 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -491,6 +491,13 @@ Behavioural requirements
491491
decoder's input bus like Play does. A Sent line decodes the operator's own
492492
keying locally (an adaptive `MorseDecoder` fed from the keyer's transition
493493
log) with a Clear button.
494+
- Star on GitHub (2026-09-23, v0.1.12): a quiet link in the page footer and
495+
download panel with the live star count (one `GET` of the repository from
496+
api.github.com, named in the About privacy sentence), and in the desktop
497+
status bar; a one-time nudge ("Useful? Star it on GitHub") after the first
498+
decoded word or the first correct practice target, remembered in
499+
localStorage `morse.star.nudged` / QSettings `star/nudged`. No third-party
500+
scripts. README carries shields.io badges.
494501
- Reference chart (2026-09-23, v0.1.11): section G in both apps, built from
495502
`morse/reference.py` / `web/js/reference.js` (`chart_entries(table)`:
496503
letters, digits, then punctuation by code length, code, character;
Collapse file

‎docs/PROMOTION.md‎

Copy file name to clipboardExpand all lines: docs/PROMOTION.md
+7Lines changed: 7 additions & 0 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,13 @@ Other places that fit: the Hackaday tip line (the beeper angle), the
9898
awesome-ham-radio lists on GitHub (open a pull request adding the link), QRZ
9999
and eHam forums, and your radio club's newsletter.
100100

101+
## 4b. Stars from the page itself
102+
103+
The page and the desktop app carry a quiet "Star on GitHub" link (footer,
104+
download panel, status bar) and ask once, after the first decoded word or the
105+
first correct practice target. Nothing pushier: no popups, no repeats, no
106+
third-party button scripts.
107+
101108
## 5. Watch and adjust
102109

103110
After a few weeks, Search Console's Performance report shows impressions per
Collapse file

‎morse/__init__.py‎

Copy file name to clipboard
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
"""Morse code audio decoder for a PC beeper."""
22

3-
__version__ = "0.1.11"
3+
__version__ = "0.1.12"
Collapse file

‎morse/ui.py‎

Copy file name to clipboardExpand all lines: morse/ui.py
+32Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -827,6 +827,9 @@ def set_value(self, text: str, unit: str = "") -> None:
827827
"""QSettings key: weight in percent."""
828828
SETTINGS_REF_OPEN = "reference/open"
829829
"""QSettings key: whether the Morse chart (section G) is shown."""
830+
SETTINGS_STAR_NUDGED = "star/nudged"
831+
"""QSettings key: the one-time request to star the repository has been shown."""
832+
REPO_URL = "https://github.com/jetzhu/MorseCodeAudioCoder"
830833
DEFAULT_SIDETONE_HZ = 600
831834
"""A comfortable pitch to key with; the beeper's 2491 Hz is shrill to sit next to."""
832835
SIDETONE_MAX_HZ = 4000
@@ -2014,6 +2017,7 @@ def _pr_check(self, auto: bool) -> None:
20142017
self.pr_readouts["Timing error"].set_value(f"{round(rep.error_pct)}" if rep.marks + rep.gaps else "\u2014", "%")
20152018
t = self.theme
20162019
if result.perfect:
2020+
self._maybe_star_nudge()
20172021
self.pr_result_label.setText("Correct. Press Next target to continue.")
20182022
self.pr_result_label.setStyleSheet(f"color: {t.good}; font-weight: 600;")
20192023
self.pr_target_label.setStyleSheet(f"color: {t.good};")
@@ -2057,8 +2061,34 @@ def _build_statusbar(self) -> QtWidgets.QWidget:
20572061
self.status_error.setFont(font)
20582062
lay.addStretch(1)
20592063
lay.addWidget(self.status_error)
2064+
# A quiet, permanent link; a one-time nudge makes it bold after the first success.
2065+
self.status_star = QtWidgets.QLabel()
2066+
self.status_star.setFont(font)
2067+
self.status_star.setTextFormat(Qt.TextFormat.RichText)
2068+
self.status_star.setOpenExternalLinks(True)
2069+
self.status_star.setToolTip("Stars are how projects like this get found")
2070+
self._star_nudged = str(self.settings.value(SETTINGS_STAR_NUDGED, "0")).strip() in ("1", "true")
2071+
self._set_star_text(nudge=False)
2072+
lay.addWidget(self.status_star)
20602073
return bar
20612074

2075+
def _set_star_text(self, nudge: bool) -> None:
2076+
t = self.theme
2077+
if nudge:
2078+
self.status_star.setText(f'Useful? <a href="{REPO_URL}" style="color:{t.ink}; font-weight:600;">'
2079+
f'\u2605 Star it on GitHub</a>')
2080+
else:
2081+
self.status_star.setText(f'<a href="{REPO_URL}" style="color:{t.ink3}; text-decoration:none;">'
2082+
f'\u2605 Star on GitHub</a>')
2083+
2084+
def _maybe_star_nudge(self) -> None:
2085+
"""Ask once, at a moment the app has just done something for the person."""
2086+
if self._star_nudged:
2087+
return
2088+
self._star_nudged = True
2089+
self.settings.setValue(SETTINGS_STAR_NUDGED, "1")
2090+
self._set_star_text(nudge=True)
2091+
20622092
def _apply_stylesheet(self) -> None:
20632093
t = self.theme
20642094
self.setStyleSheet(f"""
@@ -2598,6 +2628,8 @@ def _log_emit(self, text: str) -> None:
25982628
self._log.add(text, self.pipeline.elapsed_ms, time.time())
25992629
if hasattr(self, "log_button"):
26002630
self.log_button.setEnabled(True)
2631+
if " " in text and self._log.text.strip() and hasattr(self, "status_star"):
2632+
self._maybe_star_nudge() # a whole word decoded
26012633

26022634
def log_header(self) -> list[tuple[str, str]]:
26032635
"""The lines above the table in an exported log."""
Collapse file

‎tests/test_ui_offscreen.py‎

Copy file name to clipboardExpand all lines: tests/test_ui_offscreen.py
+16Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -653,3 +653,19 @@ def test_reference_chart_toggles_lights_and_plays(qapp, window: ui.MainWindow, s
653653
assert not other._ref_open
654654
finally:
655655
other.close()
656+
657+
658+
def test_star_link_and_one_time_nudge(qapp, window: ui.MainWindow, settings) -> None:
659+
assert ui.REPO_URL in window.status_star.text()
660+
assert "Useful?" not in window.status_star.text()
661+
drive_replay(window) # decodes SOS and, at the flush, the word space
662+
assert "Useful?" in window.status_star.text()
663+
assert str(settings.value(ui.SETTINGS_STAR_NUDGED)) == "1"
664+
settings.sync()
665+
other = ui.make_window(replay_args(), settings=settings)
666+
try:
667+
assert "Useful?" not in other.status_star.text(), "asked once per install"
668+
other._log_emit("A ")
669+
assert "Useful?" not in other.status_star.text()
670+
finally:
671+
other.close()
Collapse file

‎web/css/app.css‎

Copy file name to clipboardExpand all lines: web/css/app.css
+7Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,13 @@ button.ctl.start.running { background: var(--panel); border-color: var(--ink-3);
167167
}
168168
.msgbar button.x:hover { color: var(--ink); background: var(--panel); }
169169
.msgbar.note { background: var(--panel-2); }
170+
.msgbar.star { background: var(--panel-2); }
171+
.msgbar.star .icon { color: var(--trace); }
172+
.msgbar.star a { color: var(--ink); font-weight: 600; }
173+
a.star { color: var(--ink-2); text-decoration: none; white-space: nowrap; }
174+
a.star:hover { color: var(--ink); text-decoration: underline; }
175+
a.star .starcount:not(:empty)::before { content: " · "; }
176+
.foot a.star { margin-left: 8px; }
170177

171178
.body { display: grid; grid-template-columns: minmax(0, 1fr) 232px; }
172179
.main { display: grid; grid-template-rows: 212px 232px minmax(168px, auto); border-right: 1px solid var(--line); min-width: 0; }
Collapse file

‎web/index.html‎

Copy file name to clipboardExpand all lines: web/index.html
+10-2Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -245,6 +245,12 @@ <h1>Beeper Morse Console</h1>
245245
<button class="x" id="noteDismiss" aria-label="Dismiss" title="Dismiss">×</button>
246246
</div>
247247

248+
<div class="msgbar star" id="starNudge" role="status" hidden>
249+
<span class="icon" aria-hidden="true">★</span>
250+
<span class="txt">Useful? <a id="starNudgeLink" href="https://github.com/jetzhu/MorseCodeAudioCoder" target="_blank" rel="noopener">Star it on GitHub</a>. Shown once; nothing is tracked.</span>
251+
<button class="x" id="starNudgeDismiss" aria-label="Dismiss" title="Dismiss">×</button>
252+
</div>
253+
248254
<div class="body">
249255
<div class="main">
250256
<section class="panel" aria-label="Spectrum">
@@ -492,6 +498,7 @@ <h2>Morse Console for Windows</h2>
492498
works on machines where the browser only gets a processed signal, and it needs no browser and no
493499
internet connection.</p>
494500
<p class="muted" id="dlNote">Looking up the latest release…</p>
501+
<p class="muted"><a class="star" href="https://github.com/jetzhu/MorseCodeAudioCoder" target="_blank" rel="noopener">★ Star on GitHub<span class="starcount" data-starcount></span></a> if the page or the app is useful to you: stars are how projects like this get found.</p>
495502
</div>
496503
<div class="assets" id="dlAssets">
497504
<span class="k">Downloads</span>
@@ -550,8 +557,8 @@ <h3>Encoder, hand key and practice</h3>
550557
you can rebind. The Practice strip hands out words, call signs and number groups and grades your
551558
copy and rhythm. The decoded log, with the time each word arrived, can be downloaded. A Morse code chart at the bottom of the console lists the 26 letters, 10 digits and the punctuation marks . , ? / = ' ( ) : ; + - _ " @ ! with their codes; the letter being keyed or decoded lights up in it, and clicking a character plays it.</p>
552559
<h3>Privacy</h3>
553-
<p>Everything runs in this browser tab. No audio, text or settings are sent anywhere; the only network
554-
requests are for the fonts and the release list of the desktop app on GitHub.</p>
560+
<p>Everything runs in this browser tab. No audio, text or settings are sent anywhere; the only network requests are for the fonts and, from GitHub, the release list of the desktop app and the
561+
repository's star count.</p>
555562
<h3>Browsers and the desktop app</h3>
556563
<p>Chrome and Edge give the page the raw microphone signal. Firefox on Windows supplies a processed
557564
signal that suppresses steady tones, so the desktop app, which reads the raw endpoint and needs no
@@ -575,6 +582,7 @@ <h2 id="faqTitle">Frequently asked questions</h2>
575582
<div class="foot">
576583
Chrome or Edge recommended. Source and issues: <a href="https://github.com/jetzhu/MorseCodeAudioCoder">github.com/jetzhu/MorseCodeAudioCoder</a>.
577584
The <a href="mock.html">design mock</a> shows the same window on simulated audio.
585+
<a class="star" id="starLink" href="https://github.com/jetzhu/MorseCodeAudioCoder" target="_blank" rel="noopener">★ Star on GitHub<span class="starcount" data-starcount></span></a>
578586
</div>
579587
</div>
580588

Collapse file

‎web/js/app.js‎

Copy file name to clipboardExpand all lines: web/js/app.js
+41-1Lines changed: 41 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,8 @@ const HIST_MARKS = 30;
4545
/** Auto-detect accepts a peak only this far above the band median. */
4646
const AUTO_MIN_PROMINENCE_DB = 10;
4747
const RELEASES_API = "https://api.github.com/repos/jetzhu/MorseCodeAudioCoder/releases/latest";
48+
const REPO_API = "https://api.github.com/repos/jetzhu/MorseCodeAudioCoder";
49+
const STORE_STAR_NUDGE = "morse.star.nudged";
4850
const RELEASES_PAGE = "https://github.com/jetzhu/MorseCodeAudioCoder/releases";
4951
const REPO_GIT = "https://github.com/jetzhu/MorseCodeAudioCoder.git";
5052
const STORAGE = { device: "morse.deviceId", f0: "morse.f0", micProc: "morse.micProcessing" };
@@ -85,6 +87,7 @@ const el = {
8587
msgBar: $("msgBar"), msgText: $("msgText"), msgDismiss: $("msgDismiss"),
8688
chopHint: $("chopHint"), chopDismiss: $("chopDismiss"),
8789
noteBar: $("noteBar"), noteText: $("noteText"), noteDismiss: $("noteDismiss"),
90+
starNudge: $("starNudge"), starNudgeLink: $("starNudgeLink"), starNudgeDismiss: $("starNudgeDismiss"),
8891
f0Label: $("f0Label"), specInfo: $("specInfo"),
8992
sym: $("symBuf"), hint: $("symHint"), text: $("textOut"),
9093
dit: $("ditV"), dah: $("dahV"), lgap: $("lgapV"), off: $("offV"),
@@ -221,7 +224,40 @@ const log = new DecodedLog();
221224

222225
/** Stamp newly decoded text with the audio clock and the computer clock. */
223226
function logEmit(text) {
224-
if (text) log.add(text, state.blocks * state.blockMs, Date.now());
227+
if (!text) return;
228+
log.add(text, state.blocks * state.blockMs, Date.now());
229+
if (text.includes(" ") && log.text.trim()) maybeStarNudge(); // a whole word decoded
230+
}
231+
232+
// ------------------------------------------------------------------- stars
233+
234+
/**
235+
* One quiet request to star the repository, at a moment the page has just
236+
* done something for the person (first decoded word, first correct practice
237+
* target). Shown once per browser; dismissing or following the link ends it.
238+
*/
239+
function maybeStarNudge() {
240+
if (store.get(STORE_STAR_NUDGE) === "1" || !el.starNudge.hidden) return;
241+
el.starNudge.hidden = false;
242+
}
243+
244+
function endStarNudge() {
245+
store.set(STORE_STAR_NUDGE, "1");
246+
el.starNudge.hidden = true;
247+
}
248+
249+
/** Read the repository's star count from GitHub and show it next to the star links. */
250+
async function loadStarCount() {
251+
try {
252+
const r = await fetch(REPO_API, { headers: { Accept: "application/vnd.github+json" } });
253+
if (!r.ok) return;
254+
const info = await r.json();
255+
const n = Number(info.stargazers_count);
256+
if (!Number.isFinite(n)) return;
257+
for (const span of document.querySelectorAll("[data-starcount]")) span.textContent = `${n} ${n === 1 ? "star" : "stars"}`;
258+
} catch {
259+
/* offline or rate-limited: the link stands without a count */
260+
}
225261
}
226262

227263
/** The `Pipeline.process_block` order: detector, decoder feed, idle, then the display buffers. */
@@ -1626,6 +1662,7 @@ function practiceCheck(auto = false) {
16261662
if (auto && !s.perfect) return;
16271663
pr.checked = true;
16281664
practice.record(s);
1665+
if (s.perfect) maybeStarNudge();
16291666
const r = rhythm(keyedRuns(), sent.dec.ditMs);
16301667
el.prAcc.innerHTML = `${Math.round(100 * s.accuracy)}<small>%</small>`;
16311668
el.prWpm.innerHTML = `${sent.dec.timingReady || sent.runs.length >= 3 ? sent.dec.wpm.toFixed(1) : "—"}<small>WPM</small>`;
@@ -1802,6 +1839,9 @@ function wire() {
18021839
el.chopHint.hidden = true;
18031840
state.chopDismissed = true;
18041841
});
1842+
el.starNudgeDismiss.addEventListener("click", endStarNudge);
1843+
el.starNudgeLink.addEventListener("click", endStarNudge);
1844+
loadStarCount();
18051845
el.noteDismiss.addEventListener("click", () => {
18061846
el.noteBar.hidden = true;
18071847
});
Collapse file

‎web/test/seo.test.mjs‎

Copy file name to clipboardExpand all lines: web/test/seo.test.mjs
+7Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,3 +70,10 @@ test("the chart is in the HTML and matches the shared table", () => {
7070
assert.ok(html.includes("Morse code simulator"));
7171
assert.ok(/<h3>Is this a Morse code simulator\?<\/h3>/.test(html));
7272
});
73+
74+
test("the star links and the one-time nudge are in the page", () => {
75+
assert.ok(html.includes('id="starLink"'));
76+
assert.ok(html.includes('id="starNudge"') && html.includes("hidden"));
77+
assert.equal((html.match(/data-starcount/g) || []).length, 2, "footer and download panel");
78+
assert.ok(html.includes("repository's star count"), "the privacy sentence names the extra request");
79+
});

0 commit comments

Comments
0 (0)
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.