diff --git a/README.md b/README.md index e41b221..aa52d6a 100644 --- a/README.md +++ b/README.md @@ -324,7 +324,7 @@ merged = list(merge_visits([ ])) ``` -If this doesn't support a browser and you wish to quickly extend without maintaining a fork (or contributing back to this repo), you can pass a `Browser` implementation (see [browsers/all.py](./browserexport/browsers/all.py) and [browsers/common.py](./browserexport/browsers/common.py) for more info) to `browserexport.parse.read_visits` or programatically override/add your own browsers as part of the [`browserexport.browsers` namespace package](https://github.com/seanbreckenridge/browserexport/blob/0705629e1dc87fe47d6f731018d26dc3720cf2fe/browserexport/browsers/all.py#L15-L24) +If this doesn't support a browser and you wish to quickly extend without maintaining a fork (or contributing back to this repo), you can pass a `Browser` implementation (see [browsers/all.py](./browserexport/browsers/all.py) and [browsers/common.py](./browserexport/browsers/common.py) for more info) to `browserexport.parse.read_visits` or programmatically override/add your own browsers as part of the [`browserexport.browsers` namespace package](https://github.com/seanbreckenridge/browserexport/blob/0705629e1dc87fe47d6f731018d26dc3720cf2fe/browserexport/browsers/all.py#L15-L24) #### Comparisons with Promnesia diff --git a/browserexport/browsers/common.py b/browserexport/browsers/common.py index 714406e..72989aa 100644 --- a/browserexport/browsers/common.py +++ b/browserexport/browsers/common.py @@ -1,4 +1,4 @@ -# ununsed imports here, to bring them into scope for other files +# unused imports here, to bring them into scope for other files import os import sys import sqlite3 @@ -112,7 +112,7 @@ def handle_glob(bases: Sequence[Path], stem: str, recursive: bool = False) -> Pa # found the match! return dbs[0] else: - # if we werent trying to search recursively, try a recursive search as a fallback + # if we weren't trying to search recursively, try a recursive search as a fallback if not recursive: return handle_glob(bases, stem, recursive=True) else: @@ -154,7 +154,7 @@ def windows_appdata_paths(path: str) -> Sequence[PathIsh]: Given a path, return the path with the APPDATA/LOCALAPPDATA environment variables expanded. """ - # normpath converts the path to use the correct path separator for windows incase + # normpath converts the path to use the correct path separator for windows in case # the user provided a path with forward slashes return tuple( os.path.normpath(os.path.expandvars(os.path.join(envvar, path))) @@ -172,7 +172,7 @@ def handle_path( """ Handles the repetitive task of having to resolve/expand a path which describes the location of the data directory on each - opreating system + operating system """ loc: Sequence[PathIsh] # if the user didn't provide a key, assume this is a 'sys.platform' map - using @@ -180,7 +180,7 @@ def handle_path( if key is None: key = determine_operating_system() # use the key provided, or the first item (dicts after python3.7 are ordered) - # in the pathmap if that doesnt exist + # in the pathmap if that doesn't exist maybeloc: Optional[PathMapEntry] = pathmap.get(key) if maybeloc is None: click.echo( diff --git a/browserexport/browsers/firefox.py b/browserexport/browsers/firefox.py index 47d7b4c..ce789db 100644 --- a/browserexport/browsers/firefox.py +++ b/browserexport/browsers/firefox.py @@ -35,7 +35,7 @@ class Firefox(Browser): "P.url", # Hack to tell apart whether timestamp is stored in microseconds (on desktop) or in milliseconds (on mobile) # We set 300_000_000 as threshold, it's year 1979, so definitely before Firefox existed, - # and the same multipied by 1000 is year 11476, also enough time for us not to care. + # and the same multiplied by 1000 is year 11476, also enough time for us not to care. "(CASE WHEN (V.visit_date > 300000000 * 1000000) THEN V.visit_date ELSE V.visit_date * 1000 END) AS visit_date", "V.visit_date", "P.title", diff --git a/browserexport/browsers/palemoon.py b/browserexport/browsers/palemoon.py index 8af8890..fa7bced 100644 --- a/browserexport/browsers/palemoon.py +++ b/browserexport/browsers/palemoon.py @@ -28,7 +28,7 @@ class Palemoon(Browser): @classmethod def detect(cls, path: PathIshOrConn) -> bool: - # if this doesnt have the moz_historyvisits, exit + # if this doesn't have the moz_historyvisits, exit if not super().detect(path): return False try: diff --git a/browserexport/model.py b/browserexport/model.py index 372ada1..c578423 100644 --- a/browserexport/model.py +++ b/browserexport/model.py @@ -59,7 +59,7 @@ class Visit(NamedTuple): dt: datetime # hmm, does this being optional make it more annoying to consume # by other programs? reduces the amount of data that other programs - # need to consume, so theres a tradeoff... + # need to consume, so there's a tradeoff... metadata: Optional[Metadata] = None def serialize(self) -> Dict[str, Any]: diff --git a/browserexport/save.py b/browserexport/save.py index 9acdd45..f5da7d5 100644 --- a/browserexport/save.py +++ b/browserexport/save.py @@ -85,7 +85,7 @@ def _default_pattern( can pass a pattern with a format replacement field (for the timestamp) if you'd rather use a different format - by default, this appends sqlite if thats not already the suffix, + by default, this appends sqlite if that's not already the suffix, adds the name of the browser and a timestamp """ to_p: Path = expand_path(to)