Obsidian Export Format - A Starting Point

Users asking other users for bibliography formats.
Post Reply
DrJJWMac
Posts: 345
Joined: Sat Jun 22, 2019 8:04 am
Location: Alabama USA

Obsidian Export Format - A Starting Point

Post by DrJJWMac »

I have begun a quest for an effective way to share my library resources with my colleagues who have Windows systems. After flirting with Mendeley and Papers, I am now working on a method to use a combination with Google Drive to store the PDFs and Obsidian to store note files. I am posting my example for consideration and comments.

The Bookends Format

I created a Format (called Obsidian Export) that collects the information that I want. Here is the format statement for a journal article.

Code: Select all

$## Article $u1
t; a
j $**$v$**$(i) p (d)
$### Notes$
$*Label*$ &
n
$### Links$
$https://doi.org/${u17^ }
$![local file: $h$](<bibliographies/$!$/$h$>)$
%
Notice a few things here.

* The u1 output is the citation key used in the level 2 header to mark the note
* The links section has both the DOI and a reference to the PDF file itself. The latter is specifically pointing to a file in a specific sub-directory. That sub-directory is bibliographies/THELIBRARYNAME

An Example Format for a Reference

Here is an example of the output for a specific reference in my Functionalize library.

Code: Select all

## Article Qi2009
Simple Approach to Wafer-Scale Self-Cleaning Antireflective Silicon Surfaces; Qi, D et al.
Langmuir **25**(14) 7769 (2009)
### Notes
*Label* no label
#how provides a recipe to deposit fluorosilane in toluene with wet chemistry
### Links
https://doi.org/10.1021/la9013009
![local file: Functionalize_2009 - Qi.Lu_etal.pdf](<bibliographies/Functionalize/Functionalize_2009 - Qi.Lu_etal.pdf>)
The Obsidian Link to the Bookends Library

I created a SYMLINK (not an alias) for my Attachments/Functionalize library from Bookends. I put this SYMLINK into the Obsidian vault folder and remove the SYMLINK term on the name. This gives Obsidian direct access to all files in the Bookends Library.
Obsidian SYMLINK
Obsidian SYMLINK
Obsidian SYMLINK.png (48.2 KiB) Viewed 6061 times
Obsidian Vault
Obsidian Vault
Obsidian Vault.png (76.45 KiB) Viewed 6061 times
Generating a Report

To obtain a report, I run the menu Export References or Bibliography. I use the Obsidian Export format to output to a Plain Text (ASCII) file on Disk. Save the file with an .md file extension. Put the report into the bibliographies directory in the Obsidian vault.

Example Report in Obsidian

Here is an example report in Obsidian. I have exposed only the reference that is shown in the above code section.
Obsidian Report
Obsidian Report
Obsidian Report.png (89.46 KiB) Viewed 6061 times
Next Steps

The next steps are to post my entire Functionalize library to a Google Drive folder, to provide instructions to my colleagues on how to set up Obsidian for use. After this, I can post snap-shot reports with my comments to articles using the Notes section. My colleagues should only need to put the report in their bibliographies section to see the report and to access the related PDF file directly.

Caveats and Improvements

I use the #tag format in notes for tags. If you use the Bookends default %tag format, you will have to do some post-processing to convert those to #tag formats to be recognized in Obsidian. Note also that Obsidian demands #(SPACE)Header formats for headers while Bookends outputs markdown headers internally as #Header (no space). Finally, I would wish (and have asked) that formats can have access to Finder tags so that I could include them also in the Notes portion of the report. For example, I use a Finder tag "annotated" on PDFs that I markup as a way to track this at a system-wide level (e.g. also in Devonthink).

I hope this initial posting finds some use.
--
JJW
Jon
Site Admin
Posts: 10048
Joined: Tue Jul 13, 2004 6:27 pm
Location: Bethesda, MD
Contact:

Re: Obsidian Export Format - A Starting Point

Post by Jon »

This is a very interesting and thought-provoking post. I have one small correction -- a few releases back I added the ability of Bookends to recognize notecard headers in the form #_header (_ = space), and when you create a notecard with header the space is put in for you. So it's compatible with markdown.

Jon
Sonny Software
DrJJWMac
Posts: 345
Joined: Sat Jun 22, 2019 8:04 am
Location: Alabama USA

Re: Obsidian Export Format - A Starting Point

Post by DrJJWMac »

> I have one small correction -- a few releases back I added the ability of Bookends to recognize notecard headers in the form #_header

My apologies. I recall this now that you mentioned it.
--
JJW
Jon
Site Admin
Posts: 10048
Joined: Tue Jul 13, 2004 6:27 pm
Location: Bethesda, MD
Contact:

Re: Obsidian Export Format - A Starting Point

Post by Jon »

I did it as your request, IIRC. :-)

Jon
Sonny Software
Bernardo
Posts: 25
Joined: Wed May 15, 2019 7:52 pm

Re: Obsidian Export Format - A Starting Point

Post by Bernardo »

Very interesting. I will give it a try.
DrJJWMac
Posts: 345
Joined: Sat Jun 22, 2019 8:04 am
Location: Alabama USA

Re: Obsidian Export Format - A Starting Point

Post by DrJJWMac »

> I did it as your request, IIRC. :-)

Yes. I do appreciate this change even while I have been too distracted to acknowledge the circumstances.
--
JJW
DrJJWMac
Posts: 345
Joined: Sat Jun 22, 2019 8:04 am
Location: Alabama USA

Re: Obsidian Export Format - A Starting Point

Post by DrJJWMac »

I have a thought for consideration after using this approach a bit more. The export could benefit by having an "input query field" in the format. Suppose this "input query field" was marked with a question mark ?. Here is a specific example of the case in practice. I currently use this to designate the library folder location to store the attachments.

Code: Select all

$![local file: $h$](<bibliographies/$!$/$h$>)$
I am proposing to have the option to use the format below instead.

Code: Select all

$![local file: $h$](<bibliographies/$?$/$h$>)$
The user input field (?) could be filled by a value input by the user at the export dialog, as below.
Export User Input Field Example
Export User Input Field Example
ExportFormatIdea.png (68.97 KiB) Viewed 6008 times
One benefit is that I can export snapshots of attachments self-contained with the reports rather than exporting the entire library of attachments.
--
JJW
Jon
Site Admin
Posts: 10048
Joined: Tue Jul 13, 2004 6:27 pm
Location: Bethesda, MD
Contact:

Re: Obsidian Export Format - A Starting Point

Post by Jon »

I'm not sure exactly what you're after, but I suggest user input be provided by entering it in a reference unused field.

Jon
Sonny Software
DrJJWMac
Posts: 345
Joined: Sat Jun 22, 2019 8:04 am
Location: Alabama USA

Re: Obsidian Export Format - A Starting Point

Post by DrJJWMac »

I have decided not to post my entire "Functionalize" library attachments folder. I will instead post snapshot reports with the corresponding attachments. I was looking for a way for a user to input text "on the fly" at the time references are exported, where the text is then included in the exported file. Hence the "?" input. This would be left blank until the export. The export (or bibliography) dialog box would ask for the input text for the ? field.

I see in the meantime how to use a user field (e.g. User4). The approach might be as below.

* use the format

Code: Select all

$![local file: $h$](<$u4$/$h$>)$
for the line designating the attachments folder
* collect the references to be exported into a Static Group in Bookends
* use Global Change to (re)define text in User4 (e.g. u4 -> "Report01")
* export the references + attachments into a folder (e.g. Report 2023-03-10)
* put the attachments in Report 2023-03-10/Report01/...
* ZIP the Report 2023-03-10 folder and post it for my colleagues

I may eventually find an easier step at my next iteration.
--
JJW
Jon
Site Admin
Posts: 10048
Joined: Tue Jul 13, 2004 6:27 pm
Location: Bethesda, MD
Contact:

Re: Obsidian Export Format - A Starting Point

Post by Jon »

That's the sort of thing I had in mind. Use global change functions to set the value of a particular field in multiple references at once, then call on that field in the format.
Post Reply