Git Product home page Git Product logo

taskresume.py's Introduction

taskresume.py

It's a little python script that manages tasks so that when you launch a big list of things to to you can cancel and resume the process.

tasks.png

To use it, just copy the taskresume.py file and put it in your branch. On your main script, load tasks like this :

from taskresume import TaskBundle

taskbundle = TaskBundle(slash_task=",\n") # task manager, add arguments to overwrite format

taskbundle.loadFile('tasks.txt') # load task list

if taskbundle.hasLoadedList:
    for task in taskbundle.list :
        args = task.get('args')
        status = task.get('status')
        id = task.get('id')
        #...
        taskbundle.changeStatus(id, 'error') #--> error
        #taskbundle.changeStatus(id, 'yes') --> completed
        #taskbundle.changeStatus(id, 'no') --> not completed

To create tasks, it's the same idea :

from taskresume import TaskBundle

taskbundle = TaskBundle(slash_task=",\n")

taskbundle.createFile('tasks.txt')

taskbundle.addTask({"args":["something", "some-other-thing"], "status":"no"}) #status = "no", when the task hasn't been launched

taskbundle.saveFile()

taskresume.py's People

Contributors

mark-spurgeon avatar

Watchers

 avatar  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.