I am using LogSeq to manage issues in a film/tv post production workflow. Problem solving, equipment manuals, tasks, personnel, and deadlines. There are other external data and task systems we use with the team (40+ people) but Logseq is for me and my knowledge growth.
We have production days i.e. cameras are on, media being generated. Not sequential but they are numbered sequentially.
Question:
Is there a template to add either as property or first line of main block of a page to link to the prev/next production day?
i.e. When I create a page for a production day I add some basic properties (calendar date, alias, location etc). The content of the page would be a log of what happened and links to scripts and permits and personnel data.
The pages are simply named like so - “XXXY Day01” where XXX is the Show Prefix and Y is the season if it’s TV or sequel if it’s a film.
I would like there to be a set of links that are created automatically that link to the previous and next production day. It could be in the property header of the page or just the first line of the content of the page.
I’ve got handle on basic templates for meetings and calls and a few other things. I’ve got a bit of a handle on advanced queries and I am just beginning to dig into macros. Not sure where to begin with this?
I’ve got as far as getting it to get the current page and insert it as a link/tag but I can’t get the math to work.
If my current page is called Shootday02,
how do I get it to format the links as [Prev](Shootday01)|[Next](Shootday03)
TIA
EDIT
I know how the link formatting works it’s just getting the math to work
- template:: shoot
- ```javascript
``{
var current = c.page.name.match(/(Shootday)(\d+)/)
if (!current)
return 'Non Shootday!'
var [_, name, num] = current
num = Number(num)
var prev = name + `${num - 1}`.padStart(2, '0')
var next = name + `${num + 1}`.padStart(2, '0')
}``
← ``[prev, 'Prev']`` | ``[next, 'Next']`` →
```
Edit:
I thought I’d drop the finished version of my template that adds some properties (some filled and some blank) as well as the links. Using your example I made an alias using a similar calculation and digit padding.
Just working with these pages this afternoon and those links are a real boon, especially on an iPhone.
``{
var current = c.page.name.match(/(ShootDay)(\d+)/)
if (!current)
return 'Non Shoot Day!'
var [_, name, num] = current
num = Number(num)
var today = `${num}`.padStart(2, '0')
var prev = name + `${num - 1}`.padStart(2, '0')
var next = name + `${num + 1}`.padStart(2, '0')
}``
function:: [[Shoot Day]]
showpart::
start-date::
alias:: SDay``today``
``[prev, 'Previous Shoot Day']`` | ``[next, 'Next Shoot Day']``