papis: Improve tui rendering and add priority maps
We render the priority of an entry in both table and multiline mode,
with priority >=1 being highest, >=3 being medium and everything
>5 being low priority.
We also have some maps for quickly setting the priority of an entry
from the tui:
`,ph` | `,pm` | `,pl` (for high, medium, low - so 1,3,5).
Lastly, I quickly added some to-dos that require the input of the
maintainer or some work in a fork, so I don't forget.
I also should not forget that I implemented some of them locally already
and am using them.
2023-09-16 09:23:23 +00:00
|
|
|
# current issues/requests
|
|
|
|
# - [ ] call arbitrary shell command
|
|
|
|
# - [ ] non-blocking opening of files
|
|
|
|
# - [ ] distinguish in config between aliases for multiline/table
|
|
|
|
# - [ ] update view after more operations
|
|
|
|
# - if I call an 'update' command (e.g. set new tag or read status), it will not update in list until 'edit' command invoked and rebuilding the list
|
|
|
|
# - two selection additions:
|
|
|
|
# - [ ] select all in view
|
|
|
|
# - [ ] limit view to currently selected
|
|
|
|
#
|
2023-10-02 19:58:38 +00:00
|
|
|
# for papis itself:
|
|
|
|
# - [ ] I can not search custom numeric fields in whoosh? i.e. 'priority:1' will not give results. 'priority:high' will
|
2023-08-29 20:44:55 +00:00
|
|
|
base:
|
|
|
|
vimflavour: nvim
|
2023-03-19 13:50:25 +00:00
|
|
|
documentlist:
|
|
|
|
defaultstyle: multiline
|
papis: Improve tui rendering and add priority maps
We render the priority of an entry in both table and multiline mode,
with priority >=1 being highest, >=3 being medium and everything
>5 being low priority.
We also have some maps for quickly setting the priority of an entry
from the tui:
`,ph` | `,pm` | `,pl` (for high, medium, low - so 1,3,5).
Lastly, I quickly added some to-dos that require the input of the
maintainer or some work in a fork, so I don't forget.
I also should not forget that I implemented some of them locally already
and am using them.
2023-09-16 09:23:23 +00:00
|
|
|
marked-icon: ""
|
2023-03-19 13:50:25 +00:00
|
|
|
multilinestyle:
|
|
|
|
rows:
|
2023-08-31 10:20:08 +00:00
|
|
|
# TODO: show if already note attached; have info window display note content?
|
2023-10-02 19:58:38 +00:00
|
|
|
- "{' ' if 'priority' not in doc or doc['priority'] == 'low' else '<red> </red>' if doc['priority'] == 'high' else '<yellow> </yellow>'}<cyan>{doc.alias('type')} {doc['ref']}</cyan> {doc.alias('readstatus')} {' ' if doc['notes'] else ''}"
|
2023-08-29 20:44:55 +00:00
|
|
|
- "<white><bold>{doc.html_escape['title']}</bold></white>"
|
|
|
|
- "<blue>{doc.html_escape['author']}</blue>"
|
2023-08-31 10:20:08 +00:00
|
|
|
- "{doc.foreach('tags', '<lightgray>(</lightgray><gray><dim>{}</dim></gray><lightgray>)</lightgray>', split = ', ', sep = ' ')}"
|
2023-03-19 13:50:25 +00:00
|
|
|
tablestyle:
|
2023-08-29 20:44:55 +00:00
|
|
|
separator: " "
|
|
|
|
headerstyle: "underline|bold"
|
|
|
|
rowstyle: "white_bg"
|
|
|
|
cursorrowstyle: "black_white|bold"
|
2023-03-19 13:50:25 +00:00
|
|
|
columns:
|
papis: Improve tui rendering and add priority maps
We render the priority of an entry in both table and multiline mode,
with priority >=1 being highest, >=3 being medium and everything
>5 being low priority.
We also have some maps for quickly setting the priority of an entry
from the tui:
`,ph` | `,pm` | `,pl` (for high, medium, low - so 1,3,5).
Lastly, I quickly added some to-dos that require the input of the
maintainer or some work in a fork, so I don't forget.
I also should not forget that I implemented some of them locally already
and am using them.
2023-09-16 09:23:23 +00:00
|
|
|
- {
|
|
|
|
header: "",
|
2023-10-02 19:58:38 +00:00
|
|
|
content: "{'' if 'priority' not in doc or doc['priority'] == 'low' else '' if doc['priority'] == 'high' else ''}",
|
papis: Improve tui rendering and add priority maps
We render the priority of an entry in both table and multiline mode,
with priority >=1 being highest, >=3 being medium and everything
>5 being low priority.
We also have some maps for quickly setting the priority of an entry
from the tui:
`,ph` | `,pm` | `,pl` (for high, medium, low - so 1,3,5).
Lastly, I quickly added some to-dos that require the input of the
maintainer or some work in a fork, so I don't forget.
I also should not forget that I implemented some of them locally already
and am using them.
2023-09-16 09:23:23 +00:00
|
|
|
width: 1,
|
|
|
|
}
|
2023-08-29 20:44:55 +00:00
|
|
|
- {
|
2023-08-31 10:20:08 +00:00
|
|
|
header: "",
|
|
|
|
content: "{'' if doc['readstatus'] == 'read' else '' if doc['readstatus'] == 'skimmed' else ' '}",
|
|
|
|
width: 1,
|
2023-08-29 20:44:55 +00:00
|
|
|
}
|
2023-08-31 10:20:08 +00:00
|
|
|
- {
|
|
|
|
header: "",
|
|
|
|
content: "{'' if doc['notes'] else '' if doc['note'] else ' '}",
|
|
|
|
width: 1,
|
|
|
|
}
|
|
|
|
- {
|
|
|
|
header: "",
|
|
|
|
content: "{doc.alias('type')}",
|
|
|
|
width: 1,
|
|
|
|
}
|
|
|
|
- { header: "Authors", content: "{doc['author']}", width: 25 }
|
2023-08-29 20:44:55 +00:00
|
|
|
- { header: "Year", content: "{str(doc['year'])}", width: 4 }
|
2023-08-31 10:20:08 +00:00
|
|
|
- { header: "Title", content: "{doc['title']}", width: 125 }
|
|
|
|
- { header: "Reference", content: "{doc['ref']}", width: 15 }
|
|
|
|
- {
|
|
|
|
header: "",
|
|
|
|
content: "{str(len(doc.get_files()) if len(doc.get_files()) > 0 else '')}",
|
|
|
|
width: 1,
|
|
|
|
}
|
|
|
|
- { header: "Tags", content: "{doc['tags'] if isinstance(doc['tags'], str) else doc.foreach('tags', '{}', sep=', ')}", width: 35 }
|
2023-08-29 20:44:55 +00:00
|
|
|
aliases:
|
|
|
|
type:
|
|
|
|
{
|
|
|
|
article: "",
|
|
|
|
book: "",
|
2023-08-31 10:20:08 +00:00
|
|
|
inbook: "",
|
papis: Improve tui rendering and add priority maps
We render the priority of an entry in both table and multiline mode,
with priority >=1 being highest, >=3 being medium and everything
>5 being low priority.
We also have some maps for quickly setting the priority of an entry
from the tui:
`,ph` | `,pm` | `,pl` (for high, medium, low - so 1,3,5).
Lastly, I quickly added some to-dos that require the input of the
maintainer or some work in a fork, so I don't forget.
I also should not forget that I implemented some of them locally already
and am using them.
2023-09-16 09:23:23 +00:00
|
|
|
incollection: "",
|
|
|
|
software: "",
|
2023-08-29 20:44:55 +00:00
|
|
|
presentation: "",
|
|
|
|
thesis: "",
|
papis: Improve tui rendering and add priority maps
We render the priority of an entry in both table and multiline mode,
with priority >=1 being highest, >=3 being medium and everything
>5 being low priority.
We also have some maps for quickly setting the priority of an entry
from the tui:
`,ph` | `,pm` | `,pl` (for high, medium, low - so 1,3,5).
Lastly, I quickly added some to-dos that require the input of the
maintainer or some work in a fork, so I don't forget.
I also should not forget that I implemented some of them locally already
and am using them.
2023-09-16 09:23:23 +00:00
|
|
|
techreport: "",
|
2023-08-31 10:20:08 +00:00
|
|
|
_default_: "",
|
|
|
|
}
|
|
|
|
readstatus:
|
|
|
|
{
|
|
|
|
read: "<green></green>",
|
|
|
|
skimmed: "<yellow></yellow>"
|
2023-08-29 20:44:55 +00:00
|
|
|
}
|
2023-08-31 10:20:08 +00:00
|
|
|
|
2023-03-19 13:50:25 +00:00
|
|
|
keymappings:
|
2023-08-29 20:44:55 +00:00
|
|
|
q: quit
|
|
|
|
"?": help
|
2023-08-31 10:23:34 +00:00
|
|
|
T: toggle_style
|
|
|
|
S: cmd "sort "
|
2023-03-19 13:50:25 +00:00
|
|
|
/: search_mode
|
|
|
|
<key_down>: scroll_down
|
|
|
|
<key_up>: scroll_up
|
2023-08-25 14:31:09 +00:00
|
|
|
<ctrl-f>: page_down
|
|
|
|
<ctrl-b>: page_up
|
2023-03-19 13:50:25 +00:00
|
|
|
G: jump_to_bottom
|
|
|
|
gg: jump_to_top
|
|
|
|
j: scroll_down
|
|
|
|
k: scroll_up
|
2023-08-29 20:44:55 +00:00
|
|
|
o: open -r "pdf$"
|
|
|
|
O: open -d
|
2023-08-31 10:23:34 +00:00
|
|
|
b: browse
|
2023-10-02 19:58:38 +00:00
|
|
|
B: papis browse -k doi papis_id:{doc['papis_id']}
|
2023-08-31 10:23:34 +00:00
|
|
|
R: view_reset
|
|
|
|
<c-r>: reload
|
|
|
|
e:
|
|
|
|
- edit
|
|
|
|
- edit info
|
|
|
|
n:
|
|
|
|
- papis edit -n papis_id:{doc['papis_id']}
|
|
|
|
- edit notes
|
|
|
|
"'n":
|
|
|
|
- search "notes:.+"
|
|
|
|
- limit to entries with notes
|
|
|
|
"'u":
|
|
|
|
- search "readstatus:read OR readstatus:skimmed"
|
papis: Improve tui rendering and add priority maps
We render the priority of an entry in both table and multiline mode,
with priority >=1 being highest, >=3 being medium and everything
>5 being low priority.
We also have some maps for quickly setting the priority of an entry
from the tui:
`,ph` | `,pm` | `,pl` (for high, medium, low - so 1,3,5).
Lastly, I quickly added some to-dos that require the input of the
maintainer or some work in a fork, so I don't forget.
I also should not forget that I implemented some of them locally already
and am using them.
2023-09-16 09:23:23 +00:00
|
|
|
- limit to read entries
|
2023-08-31 10:23:34 +00:00
|
|
|
"'r":
|
|
|
|
- search "NOT readstatus:read AND NOT readstatus:skimmed"
|
papis: Improve tui rendering and add priority maps
We render the priority of an entry in both table and multiline mode,
with priority >=1 being highest, >=3 being medium and everything
>5 being low priority.
We also have some maps for quickly setting the priority of an entry
from the tui:
`,ph` | `,pm` | `,pl` (for high, medium, low - so 1,3,5).
Lastly, I quickly added some to-dos that require the input of the
maintainer or some work in a fork, so I don't forget.
I also should not forget that I implemented some of them locally already
and am using them.
2023-09-16 09:23:23 +00:00
|
|
|
- limit to unread entries
|
2023-08-29 20:44:55 +00:00
|
|
|
" ": mark_selected
|
|
|
|
mm: mark_selected
|
|
|
|
M: mark_down
|
2023-08-31 10:23:34 +00:00
|
|
|
J: mark_down
|
2023-08-29 20:44:55 +00:00
|
|
|
mu: unmark_all
|
|
|
|
mv: mark_view
|
papis: Improve tui rendering and add priority maps
We render the priority of an entry in both table and multiline mode,
with priority >=1 being highest, >=3 being medium and everything
>5 being low priority.
We also have some maps for quickly setting the priority of an entry
from the tui:
`,ph` | `,pm` | `,pl` (for high, medium, low - so 1,3,5).
Lastly, I quickly added some to-dos that require the input of the
maintainer or some work in a fork, so I don't forget.
I also should not forget that I implemented some of them locally already
and am using them.
2023-09-16 09:23:23 +00:00
|
|
|
",t": cmd "tag "
|
2023-08-31 10:23:34 +00:00
|
|
|
",r":
|
|
|
|
- papis update -s readstatus read papis_id:{doc['papis_id']}
|
|
|
|
- set readstatus read
|
|
|
|
",k":
|
|
|
|
- papis update -s readstatus skimmed papis_id:{doc['papis_id']}
|
|
|
|
- set readstatus skimmed
|
|
|
|
",u":
|
|
|
|
- papis update -s readstatus "" papis_id:{doc['papis_id']}
|
|
|
|
- set readstatus unread
|
papis: Improve tui rendering and add priority maps
We render the priority of an entry in both table and multiline mode,
with priority >=1 being highest, >=3 being medium and everything
>5 being low priority.
We also have some maps for quickly setting the priority of an entry
from the tui:
`,ph` | `,pm` | `,pl` (for high, medium, low - so 1,3,5).
Lastly, I quickly added some to-dos that require the input of the
maintainer or some work in a fork, so I don't forget.
I also should not forget that I implemented some of them locally already
and am using them.
2023-09-16 09:23:23 +00:00
|
|
|
",ph":
|
2023-10-02 19:58:38 +00:00
|
|
|
- papis update -s priority high papis_id:{doc['papis_id']}
|
papis: Improve tui rendering and add priority maps
We render the priority of an entry in both table and multiline mode,
with priority >=1 being highest, >=3 being medium and everything
>5 being low priority.
We also have some maps for quickly setting the priority of an entry
from the tui:
`,ph` | `,pm` | `,pl` (for high, medium, low - so 1,3,5).
Lastly, I quickly added some to-dos that require the input of the
maintainer or some work in a fork, so I don't forget.
I also should not forget that I implemented some of them locally already
and am using them.
2023-09-16 09:23:23 +00:00
|
|
|
- set priority high
|
|
|
|
",pm":
|
2023-10-02 19:58:38 +00:00
|
|
|
- papis update -s priority medium read papis_id:{doc['papis_id']}
|
papis: Improve tui rendering and add priority maps
We render the priority of an entry in both table and multiline mode,
with priority >=1 being highest, >=3 being medium and everything
>5 being low priority.
We also have some maps for quickly setting the priority of an entry
from the tui:
`,ph` | `,pm` | `,pl` (for high, medium, low - so 1,3,5).
Lastly, I quickly added some to-dos that require the input of the
maintainer or some work in a fork, so I don't forget.
I also should not forget that I implemented some of them locally already
and am using them.
2023-09-16 09:23:23 +00:00
|
|
|
- set priority medium
|
|
|
|
",pl":
|
2023-10-02 19:58:38 +00:00
|
|
|
- papis update -s priority low read papis_id:{doc['papis_id']}
|
papis: Improve tui rendering and add priority maps
We render the priority of an entry in both table and multiline mode,
with priority >=1 being highest, >=3 being medium and everything
>5 being low priority.
We also have some maps for quickly setting the priority of an entry
from the tui:
`,ph` | `,pm` | `,pl` (for high, medium, low - so 1,3,5).
Lastly, I quickly added some to-dos that require the input of the
maintainer or some work in a fork, so I don't forget.
I also should not forget that I implemented some of them locally already
and am using them.
2023-09-16 09:23:23 +00:00
|
|
|
- set priority low
|
2023-08-29 20:44:55 +00:00
|
|
|
i:
|
2023-08-25 14:31:09 +00:00
|
|
|
- info_toggle
|
|
|
|
- "Toggle info window"
|
2023-08-29 20:44:55 +00:00
|
|
|
I:
|
2023-08-25 14:31:09 +00:00
|
|
|
- info_cycle
|
|
|
|
- "Cycle info windows"
|
2023-08-31 10:23:34 +00:00
|
|
|
<ctrl-p>: info_scroll_up
|
|
|
|
<ctrl-n>: info_scroll_down
|
|
|
|
# all require 'clip' script to be available on PATH
|
|
|
|
yy:
|
|
|
|
- copy_to_clipboard "[@{doc['ref']}]"
|
|
|
|
- yank pandoc-styled reference
|
|
|
|
ss:
|
|
|
|
- vim_send "[@{doc['ref']}]"
|
|
|
|
- send vim pandoc-styled reference
|
|
|
|
yl:
|
|
|
|
- copy_to_clipboard "\\cite\{{doc['ref']}\}"
|
|
|
|
- yank latex-styled reference
|
|
|
|
sl:
|
|
|
|
- vim_send "\\cite\{{doc['ref']}\}"
|
|
|
|
- send vim latex-styled reference
|
|
|
|
yr:
|
|
|
|
- copy_to_clipboard "{format_reference(doc,style='apa')}"
|
|
|
|
- yank apa-styled reference
|
|
|
|
sr:
|
|
|
|
- vim_send "{format_reference(doc,style='apa')}"
|
|
|
|
- send vim apa-styled reference
|
|
|
|
yt:
|
|
|
|
- copy_to_clipboard "{doc['title']}"
|
|
|
|
- yank title
|
|
|
|
yu:
|
|
|
|
- copy_to_clipboard "{doc['url']}"
|
|
|
|
- yank url
|
|
|
|
yd:
|
|
|
|
- copy_to_clipboard "{doc['doi']}"
|
|
|
|
- yank doi
|
2023-08-29 20:44:55 +00:00
|
|
|
# TODO look into https://github.com/supersambo/papis-tui vim-send mappings
|
|
|
|
|
2023-08-25 14:31:09 +00:00
|
|
|
infowindow:
|
|
|
|
default_on: False
|
|
|
|
views:
|
2023-08-31 10:23:34 +00:00
|
|
|
doc:
|
|
|
|
content: "author: {doc['author'].strip()}\n title: {doc['title'].strip()}\n tags:{doc['tags'] if isinstance(doc['tags'], str) else doc.foreach('tags', '{}', sep=', ')}"
|
|
|
|
height: 8
|
2023-08-25 14:31:09 +00:00
|
|
|
apa:
|
2023-08-31 10:23:34 +00:00
|
|
|
content: "{format_reference(doc,style='apa')}"
|
2023-08-25 14:31:09 +00:00
|
|
|
abstract:
|
|
|
|
content: "{doc['abstract']}"
|
|
|
|
linewrap: True
|
|
|
|
height: 8
|
2023-08-29 20:44:55 +00:00
|
|
|
|
|
|
|
commandline:
|
|
|
|
search:
|
2023-08-31 10:20:08 +00:00
|
|
|
keyword_aliases: { a: "author:", t: "title:", y: "year:", k: "tags:" }
|
2023-08-29 20:44:55 +00:00
|
|
|
|
2023-03-19 13:50:25 +00:00
|
|
|
statusbar:
|
|
|
|
left:
|
2023-08-29 20:44:55 +00:00
|
|
|
default: "<black_green><bold> {info['mode_upper']} </black_green></bold><green_bg></green_bg>"
|
|
|
|
normal: "<black_green><bold> {info['mode_upper']} </black_green></bold><green_bg></green_bg>"
|
|
|
|
command: "<black_cyan><bold> {info['mode_upper']} </black_cyan></bold><cyan_bg></cyan_bg>"
|
|
|
|
select: "<black_red><bold> {info['mode_upper']} </black_red></bold><red_bg></red_bg>"
|
|
|
|
search: "<black_magenta><bold> {info['mode_upper']} </black_magenta></bold><magenta_bg></magenta_bg>"
|
2023-03-19 13:50:25 +00:00
|
|
|
right:
|
2023-08-29 20:44:55 +00:00
|
|
|
default: "<green>{info['sortkeys']} </green><cyan_bg></cyan_bg><black_cyan> {info['idx']} < {info['marked']} < {info['view']} < {info['items']} </black_cyan>"
|