Skip to content

Commit

Permalink
fix(scripts): replace "(" with "(" in zhihu2bib.py
Browse files Browse the repository at this point in the history
  • Loading branch information
jiangyinzuo committed Apr 17, 2024
1 parent 59ac119 commit 9aa5d1a
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 1 deletion.
1 change: 1 addition & 0 deletions .vimrc
Original file line number Diff line number Diff line change
Expand Up @@ -322,6 +322,7 @@ if has('autocmd') " vim-tiny does not have autocmd
" :next 可以打开多个文件
command! -nargs=1 FindFilesToQf call SystemToQf('find . -name "*' . <q-args> . '*" | xargs file | sed "s/:/:1:/"')

" neovim 0.10.0 uses ripgrep as greppg by default
command! -nargs=1 RgToQf call SystemToQf('rg --vimgrep ' . <q-args>)
noremap ]q :call ToggleQuickfix('c')<CR>
noremap ]l :call ToggleQuickfix('l')<CR>
Expand Down
13 changes: 13 additions & 0 deletions root/.vim/doc/command-line-tool.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
*command-line-tool*

命令行软件 vs 图形界面软件 ~

命令行软件
缺点:
上手门槛高(但有望通过ChatGPT缓解)。
不方便编辑、展示多媒体图形资源。
优点:
软件和软件之间可以通过linux管道等方式组合使用,自由组合程度高。
可以自动化批处理。
更适合ChatGPT补全。

-------------------------------------------------------------------------------

*write-maintainable-command-line-tools*
https://github.com/jiangyinzuo/write-maintainable-command-line-tools

Expand Down
1 change: 1 addition & 0 deletions root/.vim/vimrc
Original file line number Diff line number Diff line change
Expand Up @@ -351,6 +351,7 @@ if has('autocmd') " vim-tiny does not have autocmd
" :open 无法使用通配符,不能使用wildmode
" :next 可以打开多个文件
command! -nargs=1 FindFilesToQf call noplug#SystemToQf('find . -name "*' . <q-args> . '*" | xargs file | sed "s/:/:1:/"')
" neovim 0.10.0 uses ripgrep as greppg by default
command! -nargs=1 RgToQf call noplug#SystemToQf('rg --vimgrep ' . <q-args>)

" [[palette]]执行系统命令并输出到quickfix list :SystemToQf
Expand Down
2 changes: 1 addition & 1 deletion root/scripts/zhihu2bib.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
url: str = zhihu_link[1]

# substitute space with underscore
reference: str = title.replace(' ', '_')
reference: str = title.replace(' ', '_').replace('(', '(').replace(')', ')')

print(f"""
@misc{{{reference},
Expand Down

0 comments on commit 9aa5d1a

Please sign in to comment.