line wrapping

Aperta
#1,426 3 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 7 giorni

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
38/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
python
Ambito
cli

Direzione di ricerca

Inizia dal punto di ingresso khal list ed esamina l’uso di color_wrap, insieme al comportamento di textwrap di Python. Riproduci gli esempi Unicode e ASCII dell’issue, quindi verifica che larghezza, rientro delle righe di continuazione, marcatori degli eventi e output allineato si comportino come specificato.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Three-part suggestion.

One, add --width to khal list.

Two, add a configurable continuation indent to the wrapping (textwrap does have subsequent_indent, but the indent should not be highlighted, so you’ll probably wish to do it manually in color_wrap).

Three, make things actually line up. Right now, I have:

Today, 12.08.2025
↔ Urlaub $name
⇥ testgt2 mit einem sehr langen Namen lorem ipsum dolor und so weiter und so fort et cetera etm…
↔ Urlaub $othername
 testgttermin mit einem sehr langen Namen lorem ipsum dolor und so weiter und so fort et cetera etm…
Tomorrow, 13.08.2025
↔ Urlaub $othername
17:00:00-18:00:00 Testtermin mit einem sehr langen Namen lorem ipsum dolor und so weiter und so fort et cetera etm…

I’d suggest adding • before nōn-range whole-day events and • before nōn-whole-day events, so they line up, plus continuation indent:

Today, 12.08.2025
↔ Urlaub $name
⇥ testgt2 mit einem sehr langen Namen lorem ipsum dolor und so weiter
  und so fort et cetera etm…
↔ Urlaub $othername
• testgttermin mit einem sehr langen Namen lorem ipsum dolor und so
  weiter und so fort et cetera etm…
Tomorrow, 13.08.2025
↔ Urlaub $othername
• 17:00:00-18:00:00 Testtermin mit einem sehr langen Namen lorem ipsum
  dolor und so weiter und so fort et cetera etm…

For the ASCII case, of course equivalent, just wider indent.

In this case, you might not even need the continuation indent configurable, but OTOH since people can change the formatting, you may wish to keep it so.

Lingua principale
Python
Stelle
3.1k
Fork
243
Merge medio
12g 8h
PR unite (30g)
6

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di pimutils/khal

Tutte le issue di pimutils/khal

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.