Skip to content

Commit

Permalink
knausj: rebrand, honor original creator (talonhub#1231)
Browse files Browse the repository at this point in the history
talonhub#935. We're not in ~Kansas~
knausj anymore...

This updates:

- The main title of the README (as well as most references therein) and
adds a note about our origins. [View here](
https://github.com/talonhub/community/tree/rebrand)
    - The cloning instructions in the README.
- (This might be up for debate; do we want people to `git clone
https://github.com/talonhub/community community`? Some users might end
up with two copies. I think @lunixbochs had a plan to check for if
people have both knausj and community cloned duplicative side by side by
mistake.)
- GitHub's web UI recommends `https://github.com/talonhub/community.git`
as the HTTPS URL, but our old instructions did not include the `.git`
suffix. What do we want to do?
- All GitHub links in the form of
`https://github.com/knausj85/knausj_talon/`, such as to issues.
- A few manual references in text files, such as in the deprecation
process.

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Jeff Knaus <[email protected]>
  • Loading branch information
3 people authored and MartinRykfors committed Jul 27, 2023
1 parent cf76e8a commit 5ff9a3f
Show file tree
Hide file tree
Showing 18 changed files with 62 additions and 56 deletions.
2 changes: 1 addition & 1 deletion BREAKING_CHANGES.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
This file lists known changes to knausj_talon that are likely to have broken existing
This file lists known changes to `community` that are likely to have broken existing
functionality. The file is sorted by date with the newest entries up the top.

Be aware there may be some difference between the date in this file and when the change was
Expand Down
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
This document attempts to list a set of principles for contributors to the knausj_talon repository to consider. The idea is to document some agreed upon approaches toward reviewing and including code so we can all more easily make consistent decisions.
This document attempts to list a set of principles for contributors to the `community` repository to consider. The idea is to document some agreed upon approaches toward reviewing and including code so we can all more easily make consistent decisions.

Each of the principles is numbered for easy referencing. The body is formatted as a short single-line summary of the principle followed by elaboration and discussion links.

# Voice command principles

- P01 - Prefer [object][verb] rather than [verb][object] for new commands. For example 'file save' is better than 'save file'. It may not sound as natural, but it helps for grouping related commands in lists and avoiding conflicting names.
- P02 - Use `browser.host` matcher for web apps. Though this matcher requires a [browser extension](https://github.com/knausj85/knausj_talon/blob/main/apps/README.md) on some operating systems it is the only unambiguous way of referring to a web app.
- P02 - Use `browser.host` matcher for web apps. Though this matcher requires a [browser extension](https://github.com/talonhub/community/blob/main/apps/README.md) on some operating systems it is the only unambiguous way of referring to a web app.

# Coding principles

Expand Down
72 changes: 37 additions & 35 deletions README.md

Large diffs are not rendered by default.

4 changes: 3 additions & 1 deletion apps/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# Web apps and browser extensions

Some of the Talon files for web apps (e.g. `apps/github/github_web.talon`) use a `browser.host` matcher. These talon files should work out of the box for Safari, Chrome, Brave, on Mac, but require additional configuration on other browsers/operating systems. `knausj_talon` is set up so that if a URL is found in the titlebar of an application matching the 'browser' tag it will be used to populate the browser.host matcher (see `code/browser.py`). This probably means that you will need an extension to make the browser.host based scripts work.
Some of the Talon files for web apps (e.g. `apps/github/github_web.talon`) use a `browser.host` matcher. These talon files should work out of the box for Safari, Chrome, Brave, on Mac, but require additional configuration on other browsers/operating systems.

`community` is set up so that if a URL is found in the titlebar of an application matching the 'browser' tag it will be used to populate the browser.host matcher (see `code/browser.py`). This probably means that you will need an extension to make the browser.host based scripts work.

Browser extensions that can add the protocol and hostname or even the entire URL to the window title:

Expand Down
2 changes: 1 addition & 1 deletion apps/talon_repl/talon_repl.talon
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ tag(): user.talon_python
# uncomment user.talon_populate_lists tag to activate talon-specific lists of actions, scopes, modes etcetera.
# Do not enable this tag with dragon, as it will be unusable.
# with conformer, the latency increase may also be unacceptable depending on your cpu
# see https://github.com/knausj85/knausj_talon/issues/600
# see https://github.com/talonhub/community/issues/600
# tag(): user.talon_populate_lists

^test last$:
Expand Down
6 changes: 4 additions & 2 deletions apps/vscode/command_client/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,11 @@ This directory contains the client code for communicating with the [VSCode comma

## Contributing

The source of truth is in https://github.com/knausj85/knausj_talon/tree/main/apps/vscode/command_client, but the code is also maintained as a subtree at https://github.com/pokey/talon-vscode-command-client.
The source of truth is in https://github.com/talonhub/community/tree/main/apps/vscode/command_client, but the code is also maintained as a subtree at https://github.com/pokey/talon-vscode-command-client.

To contribute, first open a PR on knausj. Once the PR is merged, you can push the changes to the subtree by running the following commands on an up-to-date knausj main: (need write access)
To contribute, first open a PR on `community`.

Once the PR is merged, you can push the changes to the subtree by running the following commands on an up-to-date `community` main: (need write access)

```sh
git subtree split --prefix=apps/vscode/command_client --annotate="[split] " -b split
Expand Down
2 changes: 1 addition & 1 deletion core/app_switcher/app_switcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
# Construct at startup a list of overides for application names (similar to how homophone list is managed)
# ie for a given talon recognition word set `one note`, recognized this in these switcher functions as `ONENOTE`
# the list is a comma seperated `<Recognized Words>, <Overide>`
# TODO: Consider put list csv's (homophones.csv, app_name_overrides.csv) files together in a seperate directory,`knausj_talon/lists`
# TODO: Consider put list csv's (homophones.csv, app_name_overrides.csv) files together in a seperate directory,`community/lists`
overrides_directory = os.path.dirname(os.path.realpath(__file__))
override_file_name = f"app_name_overrides.{talon.app.platform}.csv"
override_file_path = os.path.join(overrides_directory, override_file_name)
Expand Down
4 changes: 2 additions & 2 deletions core/deprecations.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
be an important part of people's workflows providing a warning before removing
functionality is encouraged.
The normal deprecation process in knausj_talon is as follows:
The normal deprecation process in `community` is as follows:
1. For 6 months from deprecation a deprecated action or command should
continue working. Put an entry in the BREAKING_CHANGES.txt file in the
Expand Down Expand Up @@ -46,7 +46,7 @@ def legacy_capture(m) -> str:
actions.user.deprecate_capture("2023-09-03", "user.legacy_capture")
# implement capture
See https://github.com/knausj85/knausj_talon/issues/940 for original discussion
See https://github.com/talonhub/community/issues/940 for original discussion
"""

import datetime
Expand Down
2 changes: 1 addition & 1 deletion core/edit/edit.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def line_clone():
actions.edit.paste()

# # This simpler implementation of select_word mostly works, but in some apps it doesn't.
# # See https://github.com/knausj85/knausj_talon/issues/1084.
# # See https://github.com/talonhub/community/issues/1084.
# def select_word():
# actions.edit.right()
# actions.edit.word_left()
Expand Down
2 changes: 1 addition & 1 deletion core/edit_text_file.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

from talon import Context, Module, app

# path to knausj root directory
# path to community/knausj root directory
REPO_DIR = os.path.dirname(os.path.dirname(__file__))
SETTINGS_DIR = os.path.join(REPO_DIR, "settings")

Expand Down
2 changes: 1 addition & 1 deletion core/user_settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from talon import resource

# NOTE: This method requires this module to be one folder below the top-level
# knausj folder.
# community/knausj folder.
SETTINGS_DIR = Path(__file__).parents[1] / "settings"

if not SETTINGS_DIR.is_dir():
Expand Down
2 changes: 1 addition & 1 deletion lang/talon/talon.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
# is active to prevent them from being active in contexts where they are not wanted.
# Do not enable this tag with dragon, as it will be unusable.
# with conformer, the latency increase may also be unacceptable depending on your cpu
# see https://github.com/knausj85/knausj_talon/issues/600
# see https://github.com/talonhub/community/issues/600
ctx_talon_lists.matches = r"""
tag: user.talon_populate_lists
"""
Expand Down
2 changes: 1 addition & 1 deletion lang/talon/talon.talon
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ tag(): user.code_functions_common
# uncomment user.talon_populate_lists tag to activate talon-specific lists of actions, scopes, modes etcetera.
# Do not enable this tag with dragon, as it will be unusable.
# with conformer, the latency increase may also be unacceptable depending on your cpu
# see https://github.com/knausj85/knausj_talon/issues/600
# see https://github.com/talonhub/community/issues/600
# tag(): user.talon_populate_lists

dot talon: insert(".talon")
Expand Down
4 changes: 2 additions & 2 deletions plugin/talon_draft_window/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ An session might go like this for example:

# Start with the text "this is a sentence with an elephant." in your editor or other textbox
draft edit all # Select all the text in your editor and moves it to the draft window
replace gust with error # Replaces the word corresponding with the red anchor 'g' (gust in knausj_talon) with the word 'error'
replace gust with error # Replaces the word corresponding with the red anchor 'g' (gust in community) with the word 'error'
period # Add a full stop
select each through fine # Select the words starting at the 'e' anchor and ending at 'f'
say without # Insert the word 'without' (knausj_talon)
say without # Insert the word 'without' (community)
title word air # Make the word corresponding to the 'a' anchor capitalised
draft submit # Type the text in your draft window back into your editor
# End with the text "This is a sentence without error." in your editor or other textbox
Expand Down
2 changes: 1 addition & 1 deletion plugin/talon_draft_window/draft_talon_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ def _update_draft_style(*args):
class ContextSensitiveDictationActions:
"""
Override these actions to assist 'Smart dictation mode'.
see https://github.com/knausj85/knausj_talon/pull/356
see https://github.com/talonhub/community/pull/356
"""

def dictation_peek(left, right):
Expand Down
2 changes: 1 addition & 1 deletion plugin/talon_draft_window/draft_window.talon
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: Talon Draft
-
settings():
# Enable 'Smart dictation mode', see https://github.com/knausj85/knausj_talon/pull/356
# Enable 'Smart dictation mode', see https://github.com/talonhub/community/pull/356
user.context_sensitive_dictation = 1

# Replace a single word with a phrase
Expand Down
2 changes: 1 addition & 1 deletion plugin/talon_helpers/talon_helpers.talon
Original file line number Diff line number Diff line change
Expand Up @@ -51,4 +51,4 @@ talon dump context:
clip.set_text(result)

talon (bug report | report bug):
user.open_url("https://github.com/knausj85/knausj_talon/issues")
user.open_url("https://github.com/talonhub/community/issues")
2 changes: 1 addition & 1 deletion test/stubs/talon/grammar.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# This is a class in the Talon runtime, but is only used as a type in knausj. We
# This is a class in the Talon runtime, but is only used as a type in `community`. We
# stub it here as a blank class, since there are (for example) functions which
# check isinstance(some_input, Phrase), and for testing we want these tests to
# return False.
Expand Down

0 comments on commit 5ff9a3f

Please sign in to comment.