GithubHelp home page GithubHelp logo

derkork / project.txt-js Goto Github PK

View Code? Open in Web Editor NEW
0.0 3.0 0.0 1.17 MB

TypeScript/JavaScript implementation of a parser for Project.txt files.

License: MIT License

JavaScript 0.55% ANTLR 5.34% TypeScript 94.11%
project-management project-txt typescript-library javascript-library

project.txt-js's Introduction

Project.txt JS

What is it?

This is is a library for parsing and processing project plans in the project.txt format. It provides no rendering functionality. If you want a ready-to-use editor, have a look at project.txt Viewer.

Usage

The library is written in TypeScript but should be consumable by any JavaScript project. Add it to your project using npm install project.txt.

import {parse, calculateDependencies, ProjectCalculationSettings} from "/project.txt";

// The project definition is expected as a string. You can get this from
// any source you would like, be it a file, a git repo, etc.
const projectDefinition = "[ ] some task";

const parseResult = parse(projectDefinition);
const project = parseResult.project;

// now you can extract the parsed information from the project
const tasks = project.tasks;
const firstTask = tasks[0];
const persons = project.persons;

// the library also has functionality to calculate task dependencies and
// task finish dates from the parsed project

const projectDependencyInformation = calculateDependencies(project, ProjectCalculationSettings.default());

// now you can find out which tasks are prerequisite for another task:
const prerequisitesForFirstTask = projectDependencyInformation.getPrerequisites(firstTask);

// or which persons are assigned to a task
const personsAssignedToFirstTask = projectDependencyInformation.getAssigments(firstTask);

// or when a task will be finished
const taskFinishDateOfFirstTask = projectDependencyInformation.getFinishDate(firstTask);

project.txt-js's People

Contributors

derkork avatar

Watchers

 avatar  avatar  avatar

project.txt-js's Issues

Effort of finished tasks should not be uncertain

Given you have a definition like this:

[x] task 1 
[x] task 2 :<<
[ ] task 3 :~2d :<<

Task 1 and task 2 have no effort definition, hence the finish date of task 3 is marked as "uncertain". However since task 1 and task 2 are already finished, the remaining effort is actually certain - it is zero. Therefore the finish date of task 3 should not be marked as uncertain since it bases on de-facto certain finish dates of it's prerequisites.

Calculate critical path

It would be useful to have a list of tasks that form the critical path. It could be part of the calculateDependencies method and would add a isOnCriticalPath(node:Node) method to the ProjectDependencies object. The UI could then show the critical path easily.

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.