Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

why not use the same start and end date as from Task plugin #2

Open
jalilsharif opened this issue May 17, 2024 · 5 comments
Open

why not use the same start and end date as from Task plugin #2

jalilsharif opened this issue May 17, 2024 · 5 comments

Comments

@jalilsharif
Copy link

I wanted to ask, why the gantt plugin can't use the same formatting as the task tool for the start and end date?

@nhannht
Copy link
Owner

nhannht commented May 17, 2024

Sorry for the inconvenience, but what is task tool, and what is the formatting, is it from Obsidian or from other plugins? Can you help me by giving explicit examples/points to documents/ or some screenshot

@jalilsharif
Copy link
Author

Hello, this is the task plugin https://publish.obsidian.md/tasks/Introduction. It uses the symbol 🛫 as start and 📅 as end.

Whereas smart gantt uses "from" and "to". Most of the logic from start and end has been included in this GitHub https://github.com/LynnXie00/ObsidianGanntChartfromTasks/blob/39aae2e42dd0609f03a0eb9539a9853dd786cc31/Research%20Gannt.md

however, your plugin is maintained.

@nhannht
Copy link
Owner

nhannht commented Jun 28, 2024

Okie, I using a simple solution, replace task plugin syntax with normal English syntax:

	const hourGlass = text.replace(//g, "due in "),
			airPlain = hourGlass.replace(/🛫/g, "start from "),
			heavyPlus = airPlain.replace(//g, "created in "),
			checkMark = heavyPlus.replace(//g, "done in "),
			crossMark = checkMark.replace(//g, "cancelled in "),

			createdIn = crossMark.replace(/\[created::\s+(.*)]/g,"created in $1"),
			scheduledIn = createdIn.replace(/\[scheduled::\s+(.*)]/g,"scheduled in $1"),
			startFrom = scheduledIn.replace(/\[start::\s+(.*)]/g,"start from $1"),
			dueTo = startFrom.replace(/\[due::\s+(.*)]/g,"due to $1"),
			completionIn = dueTo.replace(/\[completion::\s+(.*)]/g,"completion in $1"),
			cancelledIn = completionIn.replace(/\[cancelled::\s(.*)]/g,"cancelled in $1 "),

			calendarMark = cancelledIn.replace("/📅/g"," to ")

	return calendarMark

@nhannht
Copy link
Owner

nhannht commented Jun 28, 2024

anyway, task is a great plugin, I just play with it for a while hehe

@nhannht
Copy link
Owner

nhannht commented Jun 29, 2024

oh, I like the fact everytime I switch the card on my projject board everything will be log here. Haha

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

No branches or pull requests

2 participants