()
| 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 | |
| 863 | def _configured_reading_notes_git_remote() -> str: |
| 864 | return _normalize_reading_notes_git_remote(_env_text("PAPERFLOW_READING_NOTES_GIT_REMOTE", "")) |
| 865 | |
| 866 | |
| 867 | def _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 = [] |
no test coverage detected