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

plugin cannot find notes in Obsidian folder #18

Closed
erazlogo opened this issue Mar 22, 2022 · 8 comments
Closed

plugin cannot find notes in Obsidian folder #18

erazlogo opened this issue Mar 22, 2022 · 8 comments

Comments

@erazlogo
Copy link

So I linked the plugin to a folder in Obsidian "~/obsidian/cinema-project/1. Notes" but when I restart Zotero the message I get "no notes found." Is that because there is a space in the name of the folder? Thanks!

@daeh
Copy link
Owner

daeh commented Mar 23, 2022

spaces in the path shouldn't be an issue. What's an example filepath to an existing Obsidian reading note? Will you generate a debugging log from the advanced settings and upload it here?

image

@erazlogo
Copy link
Author

here is the log. I am trying to find all notes where in YAML there is a valid citekey field--there are 517 notes and most of them have the citekey field in YAML. I don't have literature notes, I include source data for every note from the source. thanks!

{
"version": "0.0.15",
"zoteroVersion": "6.0.2",
"isMac": true,
"isLinux": false,
"isWin": false,
"prefs": {
"matchstrategy": "bbtcitekey",
"source_dir": "/Users/er/obsidian/cinema-project/1. Notes",
"filefilterstrategy": "default",
"filepattern": "^@.+\.md$",
"zotkeyregex": "local::.+\/items_\/(\w+)\)",
"metadatakeyword": "citekey"
},
"config": {
"matchstrategy": "bbtcitekey",
"source_dir": "/Users/er/obsidian/cinema-project/1. Notes",
"filefilterstrategy": "default",
"filepattern": "^@.+\.md$",
"zotkeyregex": "local::.+\/items_\/(\w+)\)",
"metadatakeyword": "citekey",
"tagstr": "obsidian_notes",
"vaultresolution": "path",
"vaultname": "cinema-project",
"bbtinstalled": [
true
],
"checkSetting": true
},
"results": {
"cleanrun": true,
"ndataKeys": 0
}
}

@erazlogo erazlogo changed the title plugin cannot file notes in Obsidian folder plugin cannot find notes in Obsidian folder Mar 23, 2022
@daeh
Copy link
Owner

daeh commented Mar 23, 2022

what's the path to one of the MD files in ~/obsidian/cinema-project/1. Notes/ that is associated with a Zotero item? Go ahead and upload the contents of the MD file too.

@erazlogo
Copy link
Author

erazlogo commented Mar 23, 2022

~/obsidian/cinema-project/1. Notes/a silent nazi and a soviet film at nuremberg.md

here is the entire file:

---
type: "journalArticle"
author: "Douglas, Lawrence"
title: "The Shrunken Head of Buchenwald: Icons of Atrocity at Nuremberg"
publication: "Representations"
date: "1998-01-01"
online: "online"
local: "local"
citekey: "[@douglasShrunkenHeadBuchenwald1998]"
---
Lawrence Douglas, "The Shrunken Head of Buchenwald: Icons of Atrocity at Nuremberg," Representations (1998) online local

#source/secondary

Index

[[1945.11.20-1946.10.06 Nuremberg Trials]]
[[Nuremberg]]
[[Original German Eight-Millimeter Film of Atrocities Against the Jews 1945]]
[[The Atrocities by the German Fascist Invaders in the U.S.S.R. (1945)]]

Connections

[[soviet interpreters at nuremberg trials]]
[[possible film translation at nuremberg]]
[[nuremberg interpreter translates films for stalin]]

Note

49
Almost immediately on the heels of the display of the shrunken head on the afternoon of 13
50
December 1945, the prosecution showed the court a brief documentary film, one that strengthened and complicated the rhetoric of atavism. Following assistant prosecutor William Walsh's description of how the Nazis "lighted and fanned" the "flame of prejudice" against the Jews, the prosecution submitted what at the time was described as "perhaps one of the most unusual exhibits that will be presented during the Trial": a silent film, unambiguously entitled, "Original German Eight-Millimeter Film of Atrocities Against the Jews."41 Shot with a home camera, its celluloid partially burned, and with a running time of only ninety seconds, the film presented such a confusing and disturbing set of images that it had to be shown twice in rapid succession. It revealed, according to Walsh, "the extermination of a ghetto by Gestapo agents, assisted by military units."42

"Atrocities Against the Jews" is an active document of violence. In its hurried register, naked and half-naked women are seen chased through cobbled streets littered with fallen bodies. A man, bleeding from a head wound, is viciously beaten. A woman is dragged by her hair over a curb (fig. 6). The shots are skewed and
51
blurred by the notion of the camera, suggesting the agitation of the hand that did the filming, and it is this disturbed quality, as much as the images themselves, that accounts for the film's power Yet as terrifying as the film is, it does not seem to describe an organized effort of extermination. Rather, its horrific images suggest the passion and violence of a mob run amok.
53
Responsible specifically for submitting evidence of crimes against humanity, Smirnov began his presentation by using the familiar rhetoric of atavism, referring to the Nazis' "cannibal theories of racism" and the "cannibalistic theories of German fascism."52 And like the Americans, Smirnov turned to documentary film to support his case, screening "The Atrocities by the German Fascist Invaders in the U.S.S.R.," a movie that, in the words of one observer, showed "piles of corpses dwarfing those in Dachau and Buchenwald."53

@daeh
Copy link
Owner

daeh commented Mar 23, 2022

You should read the documentation about how to configure the settings on the homepage.

The default expectation is that your reading notes all begin with @{{citekey}}, e.g. @douglasShrunkenHeadBuchenwald1998.md. If you'd like your MD files to be named differently, you can define a custom regex pattern using the "Custom File Filter": If you want the plugin to try to match all of the files in that folder, just use .+\.md$

image

In order for the plugin to get the bbtcitekey from the MD file's metadata, it needs to be formatted like the example in the documentation. In your case:

---
type: "journalArticle"
author: "Douglas, Lawrence"
title: "The Shrunken Head of Buchenwald: Icons of Atrocity at Nuremberg"
publication: "Representations"
date: "1998-01-01"
citekey: douglasShrunkenHeadBuchenwald1998
---

# Lawrence Douglas, "The Shrunken Head of Buchenwald: Icons of Atrocity at Nuremberg," Representations (1998) online local

#source/secondary

...

If you fix (1) the Custom File Filter setting and (2) the citekey field of the MD metadata, you should be in good shape.

@erazlogo
Copy link
Author

It worked, thank you! Sorry for the question--I don't understand regex very well so would not have been able to change it correctly myself in the settings.

I have 45000+ Zotero items and it didn't take a long time at all to mark 351 items.

I did get an error for the notes that did not have a citekey - "Unable to parse 84 of 517 notes" - could that possibly be suppressed? If you search all notes within a folder there is always bound to be several without a citation.

I also got this error: "sliceObj Error: 92" Not sure what that is, but it may be useful for you.

Thanks again!

@daeh
Copy link
Owner

daeh commented Mar 24, 2022

Thanks for the benchmark. I haven't tested the plugin with a database that large so it's great to know that it works ok.

The 2 recommended strategies are:

(1) use a file naming pattern that unique to your reading notes. The citations plugin suggests @{{citekey}}.

(2) use a separate folder for your reading notes.

Either strategy will let this plugin differentiate reading-notes (which it should try to link to zotero items) from other MD files (which it should not try to link to zotero items). Otherwise, the plugin doesn't know which files should be associated with Zotero items and which should be ignored.

(The "sliceObj Error" just means that it found MD files using the "Custom File Filter" that could not be match to a Zotero item.)

@daeh
Copy link
Owner

daeh commented Mar 25, 2022

closing but feel free to reopen if you want to describe a use-case that should be supported.

@daeh daeh closed this as completed Mar 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants