Giter Site home page Giter Site logo

dtgn's Introduction

Description

Creates folder structures and puts data in it.

Installation

pip install dtgn

Usage

From command line:

python -m dtgn [-h] [--mode {fixed,random}] --path PATH [--rootName ROOTNAME] [--depth DEPTH] [--fileCount FILECOUNT] [--fileMinSize FILEMINSIZE] [--fileMaxSize FILEMAXSIZE] [--purge | --no-purge | -u]

Option Short Type Default Description
--mode -m String fixed Data Creation Mode
fixed: all files will be created the same size. Size is taken fom fileMinSize argument.
random: the files created will have a random size between fileMinSize and fileMaxSize argument.
--path -p String - Path under which the folder structure shall be located
--rootName -r String dtgn The name of the root folder created under path argument
--depth -d Integer 1 The depth of the folder structure
--fileCount -f Integer 1 Nr. of files per folder depth
--fileMinSize -g Integer 2000 The minium file size in bytes
--fileMaxSize -i Integer 2000 The maximum file size in bytes
--purge -u Boolean False If true, all files in path+rootName will be deleted. No folder structure is created. Use it carefully.

Example

python -m dtgn -m random -p ./path/to -r dir -d 5 -f 10 -g 2048 -i 4096

Creates 5 subfolders under ./path/to/dir with 10 files per folder with a random size between 2048 and 4096 bytes per file.

################################################################################

dtgn (datagen) by 5f0
Creates folder structures and puts data in it

Current working directory: path/to/dtgn

Datetime: 01/01/1970 10:20:30

################################################################################

Mode: random
Create folder structure under ./path/to/dir
Create folder depth of 5
Create 10 files per folder
Size per file: between 2048 and 4096 Bytes

################################################################################

Total File Size created: 162008 Bytes
                         162.008 KB
                         0.162008 MB
                         0.00016200800000000003 GB

################################################################################

Execution Time: 0.004547 sec

License

MIT

dtgn's People

Contributors

5f0ne avatar

Watchers

 avatar

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.