lsq

command module
v0.9.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 20, 2024 License: GPL-3.0 Imports: 8 Imported by: 0

README

lsq

A command-line tool for rapid journal entry creation in Logseq, featuring both TUI and external editor support.

Features

  • External editor integration ($EDITOR by default)
  • Terminal User Interface (TUI) with real-time editing
  • Automatic journal file creation
  • Support for both Markdown and Org formats
  • Configurable file naming format
  • Customizable Logseq directory location
TUI Specific Features
  • File search functionality with prefix matching
  • TODO & priority cycling through keyboard shortcuts
  • Line indentation & unindentation
  • Auto-save when switching files through search

Installation

go install github.com/jrswab/lsq@latest

Usage

Basic usage:

lsq

This opens today's journal in your default editor ($EDITOR environment variable). If no editor is defined in $EDITOR then Vim is will be used.

Command Line Options
  • -a: Append text directly to the current journal page
  • -c: Specify config filename. (default: "config.edn")
  • -d: Specify Logseq directory name. (default: "Logseq")
  • -e: Set editor environment variable. (default: "$EDITOR")
  • -f: Search pages and aliases. Must be followed by a string.
  • -l: Specify Logseq config directory name. (default: "logseq")
  • -o: Automatically open the first result from the search.
  • -p: Open a specific page from the Logseq pages directory.
  • -s: Specify the journal date to open. (Must be yyy-MM-dd formatted)
  • -t: Use the built-in TUI instead of external editor.

TUI Controls

  • Ctrl+S: Save current file
  • Ctrl+C: Quit
  • Ctrl+T: Cycle through TODO states on current line
  • Ctrl+P: Cycle through priority states on current line
  • Ctrl+F: Open search modal
  • tab: Indent the entire line from anywhere on the line.
  • shift+tab: Unindent the line from anywhere on te line.
  • Arrow keys: Navigate through text
Search Modal Controls
  • Type to search through files
  • ↑/↓: Navigate through results
  • Enter: Open selected file (current files saves on open)
  • Esc: Close search modal

Configuration

LSQ reads your Logseq configuration from config.edn. Supported settings:

  • meta/version: Configuration version
  • preferred-format: File format ("Markdown" or "Org")
  • journal/file-name-format: Date format for journal files (e.g., "yyyy_MM_dd")

Dependencies

Contributing

First off, thank you for considering contributing to lsq! 🎉

Ways to Contribute
  • Report bugs
  • Suggest new features
  • Improve documentation
  • Submit pull requests
  • Share how you use lsq
  • Star the project on GitHub
Development Setup
  1. Fork the repository
  2. Clone your fork:
git clone https://github.com/your-username/lsq.git
  1. Add the upstream remote:
git remote add upstream https://github.com/jrswab/lsq.git
  1. Create a branch for your work:
git checkout -b your-feature-branch
Pull Request Process
  1. Update the README.md with details of any interface changes if applicable
  2. Keep PRs focused - one feature or fix per PR
  3. Use clear, descriptive commit messages
  4. Make sure your branch is up to date with main before submitting
  5. Include a clear description of the changes in your PR
First Time Contributors

New to contributing? Look for issues tagged with good-first-issue or documentation. These are great starting points!

See CONTRIBUTORS.md for a list of project contributors.

License

GPL v3

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
tests
Package todo provides functionality for cycling through TODO states and priorities in a Logseq-compatible format.
Package todo provides functionality for cycling through TODO states and priorities in a Logseq-compatible format.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL