Skip to main content

A tool to index files and recreate directory structures with symlinks.

Project description

recreate

recreate is a tool to automatically recreate a directory from an index by symlinking to files found elsewhere on your system.

Motivating image

recreate is useful for reproducible data science projects where authors somehow never have the time to describe the directory structure for their experiments. With recreate, the authors only have to run a single-line command to create an index for their data directory (a JSON file with paths and file hashes) and users can recreate the exact file structure without having to move files manually. It is sufficient to specify the directory in which the files can be found somewhere.

Installation

pip install recreate

Creating the index

Create index.json from files found in in data/.

recreate --index index.json data/

Using the index

Recreate the file structure defined in index.json by linking files found anywhere in source/.

recreate --recreate index.json source/

You can also specify multiple source directories, which is a common use case for deep learning projects, where multiple datasets have to be placed at the right location. recreate makes this easy. You only have to point it to the datasets and it will link the files to the appropriate location.

recreate --recreate index.json dataset1/ dataset2/ dataset3/ # and so on...

Or let recreate search through the current directory.

recreate --recreate index.json .

For more options, see recreate --help

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

recreate-0.2.0.tar.gz (5.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

recreate-0.2.0-py3-none-any.whl (6.7 kB view details)

Uploaded Python 3

File details

Details for the file recreate-0.2.0.tar.gz.

File metadata

  • Download URL: recreate-0.2.0.tar.gz
  • Upload date:
  • Size: 5.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.4

File hashes

Hashes for recreate-0.2.0.tar.gz
Algorithm Hash digest
SHA256 379a03c9e7b9a91b55e6dd3c0c9824bb1510b2fd707f9ba18e423d7f134450d7
MD5 e6e03012dffc394cfc728573d3d7cdd0
BLAKE2b-256 d57714578f4d7a9f3470d6c22b7360ff0b51327d542c504bfc403cd923b0f5f1

See more details on using hashes here.

File details

Details for the file recreate-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: recreate-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 6.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.4

File hashes

Hashes for recreate-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8b8261d985035a71029154e98d6bf4ee9c43bb21aae62454c03f3353fa904c48
MD5 fa3e5550b861974e3aee95047926c5e1
BLAKE2b-256 85b6c581e391617f8cadf2644aa3cdc204afe22a1feb4fc5ce25757d45a3d1b6

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page