writing: Restructure module layout per-program

Similarly to the qutebrowser module we change the layout to have a
program name at the top-level and all required files for that specific
program within, whether they reside within .config, .local or anywhere
else.
We use dotter mappings to achieve this.
This commit is contained in:
Marty Oehme 2024-09-18 16:43:15 +02:00
parent 0903e7e443
commit 85c152a07c
Signed by: Marty
GPG key ID: EDBF2ED917B2EF6A
19 changed files with 8 additions and 2 deletions

View file

@ -0,0 +1,28 @@
#!/usr/bin/env python
# papis-short-help: Manually rebuild cache for all libraries
#
# This tiny script updates all libraries by rebuilding their caches.
# Useful to invoke after manual edits in one of your library folders
# if you have many 'sub-libraries' (one library location with sub-
# directories).
# You don't have to think about which library you changed stuff in
# and just get everything updated. Might take a little time but
# should generally be a quick process ().
import papis.api
from argparse import ArgumentParser
parser = ArgumentParser()
_ = parser.add_argument(
"--all", "-a", help="reload all libraries not just current", action="store_true"
)
args = parser.parse_args()
if args.all:
libs = papis.api.get_libraries()
else:
libs = [papis.api.get_lib_name()]
for lib in libs:
papis.api.clear_lib_cache(lib)
_ = papis.api.get_all_documents_in_lib()