diff --git a/CHANGELOG.md b/CHANGELOG.md index 460b3129..28a0cfc6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -20,7 +20,7 @@ Converting a single-file module to a namespace module [is always a breaking chan A user (or me) may want to write their own module with the same name, meaning they can't use both at the same time if mine is just `my.module_name.py`, since my module existing means any other namespace packages can't have the same base name (see [reorder_editable](https://github.com/seanbreckenridge/reorder_editable) for an explanation) -The one motivating this change is `apple.py`, since the old `apple.py` was parsing the privacy export, but I wanted to add something to parse [`imessage`](https://github.com/seanbreckenridge/HPI/commit/e361ce8182d8be8b331875078ad17605d3f80a50) files. Someone else may want to add other `apple/file.py` files to parse other parts of apple/mac behaviour, but me having the single `apple.py` either means they have to have their repo before mine on their path (but doing so means they overwrite the current `apple.py` file, so they cant use that to parse their privacy export, even if they were trying to do something else entirely), or they have to rename their code to something like `my_apple/file.py` to create a new namespace module +The one motivating this change is `apple.py`, since the old `apple.py` was parsing the privacy export, but I wanted to add something to parse [`imessage`](https://github.com/seanbreckenridge/HPI/commit/e361ce8182d8be8b331875078ad17605d3f80a50) files. Someone else may want to add other `apple/file.py` files to parse other parts of apple/mac behaviour, but me having the single `apple.py` either means they have to have their repo before mine on their path (but doing so means they overwrite the current `apple.py` file, so they can't use that to parse their privacy export, even if they were trying to do something else entirely), or they have to rename their code to something like `my_apple/file.py` to create a new namespace module Possible 'Exceptions' to this: diff --git a/README.md b/README.md index c0b933b4..466d3841 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ This is built on top of [`karlicoss/HPI`](https://github.com/karlicoss/HPI). It - `my.zsh` and `my.bash`, access to my shell history w/ timestamps - `my.mail.imap` and `my.mail.mbox` to parse local IMAP sync's of my mail/mbox files -- see [doc/MAIL_SETUP.md](doc/MAIL_SETUP.md) -- `my.mpv.history_daemon`, accesses movies/music w/ activity/metdata that have played on my machine, facilitated by a [mpv history daemon](https://github.com/seanbreckenridge/mpv-history-daemon) +- `my.mpv.history_daemon`, accesses movies/music w/ activity/metadata that have played on my machine, facilitated by a [mpv history daemon](https://github.com/seanbreckenridge/mpv-history-daemon) - `my.discord.data_export`, parses ~1,000,000 messages/events from the discord data export, parser [here](https://github.com/seanbreckenridge/discord_data) - `my.todotxt.git_history`, to track my to-do list history (using backups of my [`todotxt`](http://todotxt.org/) files in [`git_doc_history`](https://github.com/seanbreckenridge/git_doc_history)) - `my.rss.newsboat`, keeps track of when I added/removed RSS feeds (for [`newsboat`](https://newsboat.org/)) diff --git a/doc/TROUBLESHOOTING_INSTALLS.md b/doc/TROUBLESHOOTING_INSTALLS.md index 3816e2d2..2be0348f 100644 --- a/doc/TROUBLESHOOTING_INSTALLS.md +++ b/doc/TROUBLESHOOTING_INSTALLS.md @@ -4,7 +4,7 @@ If you're having issues -- try doing the following I'll use my promnesia modules (at ) as an example. -Note: though the repository is `promnesia`, the module it installs is `promnesia_sean`. In python packages in general, its not necessary for the module name to match the repository (thats just where its hosted). To figure out what the name of the package is, use `python3 -m pip list`. For this HPI repository, it installs as `HPI-seanbreckenridge`, so its possible to differentiate between this and upstream HPI. +Note: though the repository is `promnesia`, the module it installs is `promnesia_sean`. In python packages in general, its not necessary for the module name to match the repository (that's just where its hosted). To figure out what the name of the package is, use `python3 -m pip list`. For this HPI repository, it installs as `HPI-seanbreckenridge`, so its possible to differentiate between this and upstream HPI. These are directions for installing a package as non-editable (into your python `site-packages`), though it covers uninstalling editable packages -- in case your path is misconfigured in some way. If you want to install as editable, see [reorder_editable](https://github.com/seanbreckenridge/reorder_editable) and the [install section](https://github.com/seanbreckenridge/HPI#install) of the README for issues you may run into, or see the [editable](#editable) section of this doc diff --git a/my/facebook/gdpr.py b/my/facebook/gdpr.py index fa339b0a..b46ad60b 100644 --- a/my/facebook/gdpr.py +++ b/my/facebook/gdpr.py @@ -377,7 +377,7 @@ def _parse_messages_in_conversation( # yikes. this is pretty much whenever I posted *anything*, or a third party app communicated # back to facebook that I listened to something/played a game, so it has like 5000 events # -# not sure if I hit all the types, but this yields RuntimeErrors if it cant parse something, +# not sure if I hit all the types, but this yields RuntimeErrors if it can't parse something, # so just check hpi doctor to make sure its all gooood # or # list(filter(lambda e: isinstance(e, Exception), events())), diff --git a/my/mail/common.py b/my/mail/common.py index e44a26c8..8a4a10f9 100644 --- a/my/mail/common.py +++ b/my/mail/common.py @@ -210,7 +210,7 @@ def describe_person(p: Tuple[str, str]) -> str: ) converts to Person - if theres no 'Person' text, it + if there's no 'Person' text, it just becomes: emailhere@gmail.com """ diff --git a/my/piazza/scraper.py b/my/piazza/scraper.py index 3a42e775..8dfd4cb5 100644 --- a/my/piazza/scraper.py +++ b/my/piazza/scraper.py @@ -47,7 +47,7 @@ def posts() -> Iterator[Post]: """ for exp in classes(): # hmm -- it seems that I'm always the only user in this? - # will check an envvar incase someone else has issues configuring this/has different results + # will check an envvar in case someone else has issues configuring this/has different results # feel free to open an issue user_id: Optional[str] = os.environ.get("PIAZZA_UID") if user_id is None: diff --git a/my/project_euler.py b/my/project_euler.py index 25c9f3b3..cbf46fb9 100644 --- a/my/project_euler.py +++ b/my/project_euler.py @@ -83,7 +83,7 @@ def _parse_file(p: Path) -> Iterator[Solution]: if m: problem, day, month_desc, year_short, hour, minute = m.groups() month_lowered = month_desc.lower() - assert month_lowered in MONTHS, f"Couldnt find {month_lowered} in {MONTHS}" + assert month_lowered in MONTHS, f"Couldn't find {month_lowered} in {MONTHS}" # datetimes in the file are UTC time yield Solution( problem=int(problem), diff --git a/my/spotify/gdpr.py b/my/spotify/gdpr.py index 58c9ea29..f1bfc6fe 100644 --- a/my/spotify/gdpr.py +++ b/my/spotify/gdpr.py @@ -112,7 +112,7 @@ def _filter_playlists(d: Json) -> Iterator[Playlist]: # parse, then filter # make sure this playlist has more than one artist # if its just one artist, its probably just an album - # thats been classified as a playlist + # that's been classified as a playlist for p in _parse_all_playlists(d): if len(set([s.artist for s in p.songs])) > 1: yield p diff --git a/my/zsh.py b/my/zsh.py index 8f379008..0137eaca 100644 --- a/my/zsh.py +++ b/my/zsh.py @@ -128,11 +128,11 @@ def _parse_file(histfile: Path) -> Results: dt: Optional[datetime] = None dur: Optional[int] = None command: str = "" - # cant parse line by line since some commands are multiline + # can't parse line by line since some commands are multiline # sort of structured like a do-while loop for line in histfile.open(encoding="latin-1"): r = _parse_metadata(line) - # if regex didnt match, this is a multi line command string + # if regex didn't match, this is a multi line command string if r is None: command += "\n" + line else: diff --git a/tests/test_commits.py b/tests/test_commits.py index 973cd5ea..876bd45c 100644 --- a/tests/test_commits.py +++ b/tests/test_commits.py @@ -22,7 +22,7 @@ def test_commits() -> None: biggest_repo = r break else: - raise RuntimeError("Couldnt find a repo with more than 100 files!") + raise RuntimeError("Couldn't find a repo with more than 100 files!") commits_for_repo = list(_cached_commits(biggest_repo)) assert len(commits_for_repo) >= 1 assert isinstance(commits_for_repo[0], Commit)