Comments (4)
Hi @aisneto, based on that log, it looks like the color codes in the output from jrnl --short
might be messing with your next call to jrnl, or the other commands in your piped chain. It's sending a bunch of color codes and a tag to your final jrnl -on
call:
on_date='\x1b[1m\x1b[30m2022-11-16 09:45:00 AM\x1b[0m \x1b[1m\x1b[33m@phil\x1b[0m'
If you first pipe its output to a color remover like ansi2txt
before processing the output, does that help? You'll need to strip out that tag (@phil
) also.
from jrnl.
I've tried your recommendation using "aha", like this: jrnl -on "$(jrnl --short | shuf -n 1 | cut -d' ' -f1 | aha --black)"
Now I got it working. However, strangely enough, some tries did return "no entries". Still, I would say that the command this way works 9 of 10 times.
from jrnl.
Hi @aisneto, I think the issue that your script is clearing the formatting with aha
at the end when instead it'd be better off clearing the formatting at the beginning, before shuf
and cut
work on it, like so:
jrnl -on "$(jrnl --short | aha --black | shuf -n 1 | cut -d' ' -f1)"
from jrnl.
I'm closing this to clear off my list, though feel free to tag me with a comment back here if you need any more help.
from jrnl.
Related Issues (20)
- Ignore color when used in a pipeline HOT 1
- How can I set macOS TextEdit as external editor? HOT 3
- Add 1password support for saving and retrieving jrnl passwords
- Linewrap works incorrectly for mixed CJK and English text HOT 1
- Feature: Import from org-journal
- How to update jrnl from the version 2.8.4 to the last one (4.1) HOT 2
- Bug Report HOT 1
- Feature Report Add a config option to output any new entries to the terminal after submission.
- Tests failing on develop branch starting with pytest-bdd 7.1.2 HOT 4
- -contains doesn't accept multiple search terms, doesn't work with -and HOT 2
- Tests are failing with pytest 8.1 HOT 3
- [Bug Report] AttributeError: '_PasswordRetriever' object has no attribute 'encode' HOT 10
- Compatibility with VJOURNAL standard HOT 2
- Remove documentation recommendation to install pipx through brew or pip HOT 1
- No module named 'pygments' after pygments upgrade HOT 1
- Recommend pipx as default installation method
- Feature Report : Custom save location HOT 2
- Add Python 3.13 support HOT 2
- Can't write first entry in directory journal when directory doesn't exist HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jrnl.