I was experimenting with imports, esp, imports over existing pages. the default is simply to append the data, no deletes and can results with attributes with multiple, values (which is fine, but can create logical inconsistencies).
for example, if a status:: [[open]]
exists in the page
and say by way of a page import we want to "update" the status from [[open]] to [[closed]]
when the updated Csv creates the new page md files, and those md files with the same page names
are imported to Roam, the existing pages will be updated with:
status: [[closed]]
which means the updated pages will have
status:: [[open]]
status:: [[closed]]
now, in some cases this is useful because attributes can and should be able to have any number of and any kind of attached values. but in some cases it will create confusion, or could.
MY RESPONSE
Yeah totally! This was my exact thinking about issue of importing markdown and appending. But I don’t want to risk replacing a page and somehow losing content.
My plan is to get this working first and then my idea is that we can choose to look in a recent Markdown export folder to find the page with the same name and then check if that page already has that attribute and if it does then just add to that attribute the new value.
And then next development step would be to give user an option to select which columns (attributes) from the CSV file you would want to add to existing attribute found OR replace the previous one (like if you want Status: changes from Open to close) OR third option is just add the new attribute on its own line which like the default append example you mentioned where it would have:
Status: open
Status: closed
There are countless options/scenarios that we can play around with here down the road.
Before getting all those scenarios/options integrated what I am doing from day 1 is creating that Summary type page you posted an idea about and am also using that as like a “Log” to track everything the script does. That way even before trying to replace or merge attributes with ones already in current pages, I will have the log file flag which pages there are potential conflicts with if the page already exists and if a particular attribute already exists on that page. That way you can quickly use the Logging in the summary page in Roam to go to any of the pages with duplicate attributes and manually update them in the meantime.
EA THOUGHTS
I was experimenting with imports, esp, imports over existing pages. the default is simply to append the data, no deletes and can results with attributes with multiple, values (which is fine, but can create logical inconsistencies).
for example, if a status:: [[open]] exists in the page
and say by way of a page import we want to "update" the status from [[open]] to [[closed]] when the updated Csv creates the new page md files, and those md files with the same page names are imported to Roam, the existing pages will be updated with:
status: [[closed]]
which means the updated pages will have
status:: [[open]] status:: [[closed]]
now, in some cases this is useful because attributes can and should be able to have any number of and any kind of attached values. but in some cases it will create confusion, or could.
MY RESPONSE
Yeah totally! This was my exact thinking about issue of importing markdown and appending. But I don’t want to risk replacing a page and somehow losing content.
My plan is to get this working first and then my idea is that we can choose to look in a recent Markdown export folder to find the page with the same name and then check if that page already has that attribute and if it does then just add to that attribute the new value.
And then next development step would be to give user an option to select which columns (attributes) from the CSV file you would want to add to existing attribute found OR replace the previous one (like if you want Status: changes from Open to close) OR third option is just add the new attribute on its own line which like the default append example you mentioned where it would have:
Status: open Status: closed
There are countless options/scenarios that we can play around with here down the road.
Before getting all those scenarios/options integrated what I am doing from day 1 is creating that Summary type page you posted an idea about and am also using that as like a “Log” to track everything the script does. That way even before trying to replace or merge attributes with ones already in current pages, I will have the log file flag which pages there are potential conflicts with if the page already exists and if a particular attribute already exists on that page. That way you can quickly use the Logging in the summary page in Roam to go to any of the pages with duplicate attributes and manually update them in the meantime.