Git Product home page Git Product logo

tidy's Introduction

TIDY

a efficient tool helps organizing your files !

feature

  1. sort by time
  2. sort by file type

usage

  1. cmd

    tidy -h
    
    Usage of tidy.exe:
      -dir string
            please give new a directory name (default "new_directory")
      -path string
            please give your directory path
      -time_span string
            give a time span, for example: year,month,day,hour,minute,second (default "hour")
      -type string
            time: sort by time      file_type: sort by file_type (default "time")
    
  2. code

    package main
    
    import (
    	"time"
    
    	tidy "github.com/arczhi/tidy/impl"
    	"github.com/arczhi/tidy/pkg/core"
    	"github.com/arczhi/tidy/pkg/constants"
    )
    
    func main() {
    
    	// sort by time
    	t, err := tidy.New("./your/directory", core.WithTimeSpan(constants.TIME_FORMAT_ACCURATE_TO_HOUR)
    	if err != nil {
    		panic(err)
    	}
    	if err := t.Exec(); err != nil {
    		panic(err)
    	}
    
    	// sort by file type
    	t2, err := tidy.New("./your/directory", core.WithFileType())
    	if err != nil {
    		panic(err)
    	}
    	if err := t2.Exec(); err != nil {
    		panic(err)
    	}
    }
    
    

example

image-20231210225435370

image-20231211223020720

image-20231211223130372

image-20231210225551409

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.