Path to your journal file (leave blank for C:\Users\83493\.local\share\jrnl\journal.txt):
Do you want to encrypt your journal? You can always change this later [y/N] n
PS G:\push> jrnl -to today
2021-02-01 09:00 Called in sick.
| Used the time to clean and spent 4h on writing my book.
2021-02-01 09:00 2月初.
| 2月的第一天,祝大家2月万事如意,快快乐乐。
2021-02-02 00:21 第一次使用.
| 我擦,这玩意儿真的好用吗?
当然,不使用冒号也是可以记笔记的:
PS G:\push> jrnl 不用冒号也能记笔记吗?
[Entry added to default journal]
3.2 标签功能
jrnl 支持标签功能。默认标记符号为@(不用#号是因为它是保留字符)。
要使用标签,请在所需标记的文字前面加上@符号:
jrnl Had a wonderful day at the @beach with @Tom and @Anna.
尽管可以在标记条目时使用大写字母,但按标记搜索时不区分大小写。
条目中可以使用多个标签没有限制。
3.3 重点笔记
要将笔记标记为重点项,只需使用星号(*)对它进行“星标” :
jrnl last sunday *: Best day of my life.
如果你不想添加日期,则以下选项是等效的(确保*号后面没有空格):
jrnl *: Best day of my life.
jrnl *Best day of my life.
jrnl Best day of my life.*
from jinja2 import Template
name = 'Peter'
age = 34
tm = Template("My name is {{ name }} and I am {{ age }}")
msg = tm.render(name=name, age=age)
print(msg)
tm = Template(open('./index.html', encoding="utf-8").read())
for mail in bless_info:
msg = tm.render(bless_info[mail])
Mail().sendmail(html=msg, title=bless_info[mail]["title"], receivers=[mail])
The Fuck 是一款功能强大的、Python编写的应用程序,其灵感来自@liamosaur推文,可用于纠正控制台命令中的错误,如下图所示:
更多示例如:
自动识别没有权限,在命令前面添加 sudo:
➜ apt-get install vim
E: Could not open lock file /var/lib/dpkg/lock - open (13: Permission denied)
E: Unable to lock the administration directory (/var/lib/dpkg/), are you root?
➜ fuck
sudo apt-get install vim [enter/↑/↓/ctrl+c]
[sudo] password for nvbn:
Reading package lists... Done
...
识别到没有推送到远程分支,自动追加:
➜ git push
fatal: The current branch master has no upstream branch.
To push the current branch and set the remote as upstream, use
git push --set-upstream origin master
➜ fuck
git push --set-upstream origin master [enter/↑/↓/ctrl+c]
Counting objects: 9, done.
...
识别到拼写错误:
➜ puthon
No command 'puthon' found, did you mean:
Command 'python' from package 'python-minimal' (main)
Command 'python' from package 'python3' (main)
zsh: command not found: puthon
➜ fuck
python [enter/↑/↓/ctrl+c]
Python 3.4.2 (default, Oct 8 2014, 13:08:17)
...
➜ apt-get install vim
E: Could not open lock file /var/lib/dpkg/lock - open (13: Permission denied)
E: Unable to lock the administration directory (/var/lib/dpkg/), are you root?
➜ fuck
sudo apt-get install vim
[sudo] password for nvbn:
Reading package lists... Done
...