Giter Club home page Giter Club logo

dirsnapshot's People

Contributors

rhettbull avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

dirsnapshot's Issues

Add user_data column to snapshot table

Add a user_data column to snapshot table and also a user_data param to create_snapshot so user can pass a Callable to add arbitrary data for comparison (e.g. extended attributes, MD5, etc). The user would then need to pass a compare_function to diff() that would look at this data.

Allow snapshot_db to be None in create_snapshot

Consolidate create_snapshot and create_snapshot_in_memory by allowing snapshot_db arg to be None. If None, creates in memory.

e.g.

snapshot_on_disk = create_snapshot("/path/to/dir", "dir.snapshot")
snapshot_in_memory = create_snapshot("/path/to/dir", None)

Add dirs arg to diff()

Add dirs: bool=True arg to DirDiff().diff() that, if False, skips dirs that change (as dirs will always change if files contained in the dirs changed).

Also add --no-dirs to the CLI to use this option.

Error when following certain links

Links inside sandbox containers cause an error:

dirsnap --snapshot /Users/rhet/Library/Containers/com.apple.Photos/ checked.db

When encountering this type of link:

lrwxr-xr-x rhet staff 19 B Sun Aug 20 12:48:03 2023 Filters โ‡’ ../../../../Filters

Causes this:

Traceback (most recent call last):
  File "/Users/rhet/.local/bin/dirsnap", line 8, in <module>
    sys.exit(cli())
             ^^^^^
  File "/Users/rhet/.local/pipx/venvs/dirsnapshot/lib/python3.11/site-packages/dirsnapshot/__main__.py", line 90, in cli
    create_snapshot(
  File "/Users/rhet/.local/pipx/venvs/dirsnapshot/lib/python3.11/site-packages/dirsnapshot/dirsnapshot.py", line 78, in create_snapshot
    snapshot.init_from_dir(dirpath, snapshot_db, walk, description, filter_function)
  File "/Users/rhet/.local/pipx/venvs/dirsnapshot/lib/python3.11/site-packages/dirsnapshot/dirsnapshot.py", line 185, in init_from_dir
    self._snapshot(dirpath, walk, conn, cursor, filter_function)
  File "/Users/rhet/.local/pipx/venvs/dirsnapshot/lib/python3.11/site-packages/dirsnapshot/dirsnapshot.py", line 384, in _snapshot
    statinfo = osstat(pathstr)
               ^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: '/Users/rhet/Library/Containers/com.apple.Photos/Data/Library/Filters'

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.