find_datalad_repos/diff.py
def main(
    from_point: str,
    to_point: Optional[str],
    repo: Path,
    readme_file: Path,
    readme_dir: Path,
) -> None:
    """
    Generate READMEs listing datasets added between two points in time.

    This script examines the history of the datalad-repos.json file in a local
    clone of the datalad/datalad-usage-dashboard repository and creates a
    README and sub-READMEs for all datasets added to the file between two given
    points in time.

    The FROM and TO arguments can be either a date in the form "YYYY-MM-DD"
    (indicating midnight at that date in the local timezone) or a Git
    commitish.  If the TO argument is not given, it defaults to "HEAD".
    """
    from_commit = dateish2commit(repo, from_point)
    to_commit = "HEAD" if to_point is None else dateish2commit(repo, to_point)
    from_record = RepoRecord.parse_raw(read_record(from_commit, repo))
    to_record = RepoRecord.parse_raw(read_record(to_commit, repo))
    old_github_repos = {r.name for r in from_record.github}
    old_osf_repos = {r.id for r in from_record.osf}
    new_record = RepoRecord()
    for ghr in to_record.github:
        if ghr.name not in old_github_repos:
            new_record.github.append(ghr)
    for osfr in to_record.osf:
        if osfr.id not in old_osf_repos:
            new_record.osf.append(osfr)
    mkreadmes(new_record, filename=readme_file, directory=readme_dir)

    Generate READMEs listing datasets added between two points in time.

    This script examines the history of the datalad-repos.json file in a local
    clone of the datalad/datalad-usage-dashboard repository and creates a
    README and sub-READMEs for all datasets added to the file between two given
    points in time.

    The FROM and TO arguments can be either a date in the form "YYYY-MM-DD"
    (indicating midnight at that date in the local timezone) or a Git
    commitish.  If the TO argument is not given, it defaults to "HEAD".
    
Generate READMEs listing datasets added between two points in time.
This script examines the history of the datalad-repos.json file in a local
clone of the datalad/datalad-usage-dashboard repository and creates a
README and sub-READMEs for all datasets added to the file between two given
points in time.

The FROM and TO arguments can be either a date in the form "YYYY-MM-DD"
(indicating midnight at that date in the local timezone) or a Git
commitish.  If the TO argument is not given, it defaults to "HEAD".
Generate READMEs listing datasets added between two points in time . This script examines the history of the datalad - repos . json file in a local clone of the datalad / datalad - usage - dashboard repository and creates a README and sub - READMEs for all datasets added to the file between two given points in time . The FROM and TO arguments can be either a date in the form " YYYY - MM - DD " ( indicating midnight at that date in the local timezone ) or a Git commitish . If the TO argument is not given it defaults to " HEAD " .
def main(
    from_point: str,
    to_point: Optional[str],
    repo: Path,
    readme_file: Path,
    readme_dir: Path,
) -> None:
    from_commit = dateish2commit(repo, from_point)
    to_commit = "HEAD" if to_point is None else dateish2commit(repo, to_point)
    from_record = RepoRecord.parse_raw(read_record(from_commit, repo))
    to_record = RepoRecord.parse_raw(read_record(to_commit, repo))
    old_github_repos = {r.name for r in from_record.github}
    old_osf_repos = {r.id for r in from_record.osf}
    new_record = RepoRecord()
    for ghr in to_record.github:
        if ghr.name not in old_github_repos:
            new_record.github.append(ghr)
    for osfr in to_record.osf:
        if osfr.id not in old_osf_repos:
            new_record.osf.append(osfr)
    mkreadmes(new_record, filename=readme_file, directory=readme_dir)
def main ( from_point : str , to_point : Optional [ str ] , repo : Path , readme_file : Path , readme_dir : Path , ) -> None : from_commit = dateish2commit ( repo , from_point ) to_commit = "HEAD" if to_point is None else dateish2commit ( repo , to_point ) from_record = RepoRecord . parse_raw ( read_record ( from_commit , repo ) ) to_record = RepoRecord . parse_raw ( read_record ( to_commit , repo ) ) old_github_repos = { r . name for r in from_record . github } old_osf_repos = { r . id for r in from_record . osf } new_record = RepoRecord ( ) for ghr in to_record . github : if ghr . name not in old_github_repos : new_record . github . append ( ghr ) for osfr in to_record . osf : if osfr . id not in old_osf_repos : new_record . osf . append ( osfr ) mkreadmes ( new_record , filename = readme_file , directory = readme_dir )
Generate READMEs listing datasets added between two points in time.
Generate READMEs listing datasets added between two points in time .
"""
    Generate READMEs listing datasets added between two points in time.

    This script examines the history of the datalad-repos.json file in a local
    clone of the datalad/datalad-usage-dashboard repository and creates a
    README and sub-READMEs for all datasets added to the file between two given
    points in time.

    The FROM and TO arguments can be either a date in the form "YYYY-MM-DD"
    (indicating midnight at that date in the local timezone) or a Git
    commitish.  If the TO argument is not given, it defaults to "HEAD".
    """
from_point
str
to_point
Optional[str]
repo
Path
readme_file
Path
readme_dir
Path