markline

markable line picker for stdin line input

https://github.com/sixarm/markline

Science Score: 44.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (10.4%) to scientific vocabulary
Last synced: 8 months ago · JSON representation ·

Repository

markable line picker for stdin line input

Basic Info
  • Host: GitHub
  • Owner: SixArm
  • Language: Rust
  • Default Branch: main
  • Size: 26.4 KB
Statistics
  • Stars: 5
  • Watchers: 2
  • Forks: 0
  • Open Issues: 0
  • Releases: 0
Created over 3 years ago · Last pushed about 1 year ago
Metadata Files
Readme Code of conduct Citation

README.md

markline: markable line picker from stdin to stdout

Example:

sh printf "%s\n%s\n%s\n" alpha bravo charlie > example.txt cat example.txt | markline

You should see each line with a a bullet character that you can edit, and the line text:

txt • alpha • bravo • charlie

Move up and down in the list by typing arrow keys.

Mark any line by typing any alphanumeric character. The character will replace the bullet.

Mark as many lines as you want, such as:

txt 1 alpha 2 bravo 3 charlie

When you're done, type ENTER or ESC to finish.

The command outputs each line:

  • the line's mark character

  • a separator space

  • the line's original text

Example

Suppose you have a text file that is a list of tasks, one per line, and you want to mark each line with "x" meaning done, or "o" meaning "todo".

Then you can pipe the results to any other command, such as a filter, that you can use to show just the tasks that are done.

Run:

sh cat example.txt | markline | grep '^x'

Mark each line with "x" or "o" such as:

txt x alpha o bravo x charlie

Type ENTER or ESC to finish.

Output:

txt x alpha x charlie

Install

Install markline as a typical Rust crate:

sh cargo install markline

If people want other ways, such as with package managers, we welcome help to create these ways.

Purpose

The purpose of this command is a simple marker, that is easy to use, and that work wells in on the command line such as within a pipe.

The purpose isn't intended to handle very long lines, or very long inputs.

Projects with similarities

checkline that's the same kind of tool plus checkboxes: https://github.com/sixarm/checkline

vipe that can pipe in and out of $EDITOR: https://github.com/juliangruber/vipe

peco simplistic interactive filtering tool: https://github.com/peco/peco

percol adds interactive selection to the traditional pipe concept. https://github.com/mooz/percol

canything interactive grep tools: https://github.com/keiji0/canything

zaw zsh-friendly interactive grep tool: https://github.com/zsh-users/zaw

fzf interactive grep tool written in Go language. https://github.com/junegunn/fzf

Settings

On some systems, you may need to set your localization environment variables.

Example:

sh export LC_COLLATE="en_US.UTF-8" export LC_CTYPE="en_US.UTF-8" export LC_MESSAGES="en_US.UTF-8" export LC_MONETARY="en_US.UTF-8" export LC_NUMERIC="en_US.UTF-8" export LC_TIME="en_US.UTF-8" export LC_ALL="en_US.UTF-8"

Feedback

We welcome constructive criticism and ideas for improvements.

Tracking

  • Program: markline
  • Version: 1.1.3
  • License: MIT OR BSD OR GPL-2.0 OR GPL-3.0
  • Created: 2022-10-15T12:24:50Z
  • Updated: 2024-06-07T17:43:21Z
  • Website: https://github.com/sixarm/markline
  • Contact: Joel Parker Henderson (joel@joelparkerhenderson.com)

Owner

  • Name: SixArm
  • Login: SixArm
  • Kind: organization
  • Email: sixarm@sixarm.com
  • Location: San Francisco

SixArm Software

Citation (CITATION.cff)

cff-version: 1.2.0
title: markline: markable line picker from stdin to stdout
message: >-
  If you use this work and you want to cite it,
  then you can use the metadata from this file.
type: software
authors:
  - given-names: Joel Parker
    family-names: Henderson
    email: joel@joelparkerhenderson.com
    affiliation: joelparkerhenderson.com
    orcid: 'https://orcid.org/0009-0000-4681-282X'
identifiers:
  - type: url
    value: 'https://github.com/SixArm/markline/'
    description: markline: markable line picker from stdin to stdout
repository-code: 'https://github.com/SixArm/markline/'
abstract: >-
  markline: markable line picker from stdin to stdout
license: See license file

GitHub Events

Total
  • Push event: 1
Last Year
  • Push event: 1

Committers

Last synced: 12 months ago

All Time
  • Total Commits: 8
  • Total Committers: 1
  • Avg Commits per committer: 8.0
  • Development Distribution Score (DDS): 0.0
Past Year
  • Commits: 3
  • Committers: 1
  • Avg Commits per committer: 3.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
Joel Parker Henderson j****l@j****m 8
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 12 months ago

All Time
  • Total issues: 0
  • Total pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Total issue authors: 0
  • Total pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 0
  • Pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 0
  • Pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
Pull Request Authors
Top Labels
Issue Labels
Pull Request Labels

Dependencies

Cargo.lock cargo
  • ahash 0.8.0
  • aho-corasick 0.7.19
  • atty 0.2.14
  • autocfg 1.1.0
  • bitflags 1.3.2
  • cc 1.0.74
  • cfg-if 1.0.0
  • clap 4.0.18
  • clap_derive 4.0.18
  • clap_lex 0.3.0
  • crossbeam-channel 0.5.6
  • crossbeam-utils 0.8.12
  • cursive 0.20.0
  • cursive_core 0.3.5
  • darling 0.14.2
  • darling_core 0.14.2
  • darling_macro 0.14.2
  • enum-map 2.4.1
  • enum-map-derive 0.10.0
  • enumset 1.0.12
  • enumset_derive 0.6.1
  • env_logger 0.9.1
  • errno 0.2.8
  • errno-dragonfly 0.1.2
  • fnv 1.0.7
  • getrandom 0.2.8
  • heck 0.4.0
  • hermit-abi 0.1.19
  • humantime 2.1.0
  • ident_case 1.0.1
  • io-lifetimes 0.7.4
  • itoa 1.0.4
  • lazy_static 1.4.0
  • libc 0.2.137
  • linux-raw-sys 0.0.46
  • log 0.4.17
  • maplit 1.0.2
  • memchr 2.5.0
  • ncurses 5.101.0
  • num 0.4.0
  • num-complex 0.4.2
  • num-integer 0.1.45
  • num-iter 0.1.43
  • num-rational 0.4.1
  • num-traits 0.2.15
  • num_threads 0.1.6
  • once_cell 1.16.0
  • os_str_bytes 6.3.1
  • owning_ref 0.4.1
  • pkg-config 0.3.26
  • proc-macro-error 1.0.4
  • proc-macro-error-attr 1.0.4
  • proc-macro2 1.0.47
  • quote 1.0.21
  • regex 1.6.0
  • regex-syntax 0.6.27
  • rustix 0.35.12
  • serde 1.0.147
  • signal-hook 0.3.14
  • signal-hook-registry 1.4.0
  • stable_deref_trait 1.2.0
  • strsim 0.10.0
  • syn 1.0.103
  • term_size 0.3.2
  • termcolor 1.1.3
  • terminal_size 0.2.1
  • time 0.3.16
  • time-core 0.1.0
  • time-macros 0.2.5
  • unicase 2.6.0
  • unicode-ident 1.0.5
  • unicode-segmentation 1.10.0
  • unicode-width 0.1.10
  • version_check 0.9.4
  • wasi 0.11.0+wasi-snapshot-preview1
  • winapi 0.3.9
  • winapi-i686-pc-windows-gnu 0.4.0
  • winapi-util 0.1.5
  • winapi-x86_64-pc-windows-gnu 0.4.0
  • windows-sys 0.36.1
  • windows_aarch64_msvc 0.36.1
  • windows_i686_gnu 0.36.1
  • windows_i686_msvc 0.36.1
  • windows_x86_64_gnu 0.36.1
  • windows_x86_64_msvc 0.36.1
  • xi-unicode 0.3.0
Cargo.toml cargo