xclip -sel c < text.txthttps://stackoverflow.com/a/2718203
#!/usr/bin/env python
import rs
sample = "I am from 美国。We should be friends. 朋友。"
for n in re.findall(r'[\u4e00-\u9fff]+', sample):
print(n)
#!/bin/bash
CURRENTDATE=`date +"%Y-%m-%d"`
echo -n "Enter the Article Name: "
read -r a
echo "---
layout: post
title:
tags:
-
description:
---" >> content/posts/"${CURRENTDATE}-$a.md"
# 问题:
# 如果文章名字含有空格,能够新建文章,但同时会新建其他文档
# 如果 文件名字有 /,无法创建另一种需求:
#!/bin/bash
CURRENTDATE=`date +"%Y-%m-%d"`
echo -n "Enter the Article Name: "
read -r a
echo "---
title: ''
tags:
-
description: '用几个精确的字词概括文章内容,方便查找使用'
date: $CURRENTDATE
slug: $a
---" > ~/repo/note/content/posts/"$a.md"
emacs -nw ~/repo/note/content/posts/"$a.md"
# 问题:
# 如果文章名字含有空格,能够新建文章,但同时会新建其他文档
# 如果 文件名字有 /,无法创建pandoc -f org -t markdown original_org_file -s -o converted_md_file在 ~/.zshrc 文件中创建以下函数:
mkcd () {
mkdir "$1"
cd "$1"
}
使用:
$ mkcd demo
/demo $curl -H "Authorization: ${{ secrets.EUDIC_TOKEN }}" -A "Mozilla/5.0 (X11; Linux x86_64; rv:100.0) Gecko/20100101 Firefox/100.0" https://api.frdic.com/api/open/v1/studylist/words?language=en