MCPcopy Create free account
hub / github.com/OpenRaiser/PaperFlow / _default_reading_notes_git_dir

Function _default_reading_notes_git_dir

deployments/desktop/shared/agents.py:857–872  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

855 remote = str(remote_url or "").strip()
856 match = re.fullmatch(r"https://github\.com/([^/\s]+)/([^/\s]+?)(?:\.git)?/?", remote)
857 if not match:
858 return remote
859 owner, repo = match.groups()
860 return f"git@github.com:{owner}/{repo}.git"
861
862
863def _configured_reading_notes_git_remote() -> str:
864 return _normalize_reading_notes_git_remote(_env_text("PAPERFLOW_READING_NOTES_GIT_REMOTE", ""))
865
866
867def _default_reading_notes_git_dir() -> Optional[Path]:
868 current_year = datetime.now().year
869 notes_root = _configured_notes_root_dir()
870 if notes_root is not None:
871 if notes_root.name == f"Daily Note {current_year}":
872 return notes_root.resolve()
873 return (notes_root / f"Daily Note {current_year}").resolve()
874 for root in _daily_note_roots():
875 candidates = []

Callers 1

Calls 3

_daily_note_rootsFunction · 0.85
nowMethod · 0.80

Tested by

no test coverage detected