Skip to content

Commit

Permalink
add custom file filter regex
Browse files Browse the repository at this point in the history
  • Loading branch information
daeh committed Feb 9, 2022
1 parent 466b553 commit ae9f1fe
Show file tree
Hide file tree
Showing 8 changed files with 247 additions and 139 deletions.
11 changes: 9 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ Opens an existing Markdown note in [Obsidian](https://obsidian.md) from the cont
- Run Zotero (version 5.x)
- Go to `Tools -> Add-ons`
- `Install Add-on From File`
- Choose the file `zotero-obsidian-citations-0.0.13.xpi`
- Choose the file `zotero-obsidian-citations-0.0.14.xpi`
- Restart Zotero

## Setup
Expand Down Expand Up @@ -126,7 +126,7 @@ A reference using an Obsidian wiki link: [[@cusimano2018cogsci]]

- [obsidian-citation-plugin](https://github.com/hans/obsidian-citation-plugin)
Obsidian plugin which integrates your academic reference manager with the Obsidian editor.
- [Zotero 6 Markdown export of notes](https://forums.zotero.org/discussion/93521/available-for-beta-testing-markdown-export-of-notes)
- [Zotero 6 Markdown export of notes](https://forums.zotero.org/discussion/93521/available-for-beta-testing-markdown-export-of-notes/p1)
Zotero's `Export Note` beta feature.
- [Zotero-mdnotes](https://argentinaos.com/zotero-mdnotes/)
A Zotero plugin to export item metadata and notes as markdown files.
Expand All @@ -142,3 +142,10 @@ Code for this extension is based on [ZotFile](https://github.com/jlegewie/zotfil
## License

Distributed under the MIT License.

## Author

<a href="https://daeh.info" target="_self"><img alt="Personal Website" src="https://shields.io/badge/Personal%20Website-for--the--badge-green?style=for-the-badge" /></a>
<a href="https://twitter.com/DaeHoulihan" target="_self"><img alt="Twitter" src="https://img.shields.io/badge/twitter-%231DA1F2.svg?&style=for-the-badge&logo=twitter&logoColor=black" /></a>

BAT Tips
2 changes: 1 addition & 1 deletion bin/build.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/sh

version='0.0.13'
version='0.0.14'

rm -f zotero-obsidian-citations-${version}.xpi
zip -r zotero-obsidian-citations-${version}.xpi chrome/* defaults/* chrome.manifest install.rdf
Expand Down
38 changes: 32 additions & 6 deletions chrome/content/options.xul
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
<prefpane id="id-obscite-prefpane" label="&obscite.preferences;">
<preferences>
<preference id="pref-obscite-source_dir" name="extensions.obscite.source_dir" type="string"/>
<preference id="pref-obscite-filefilterstrategy" name="extensions.obscite.filefilterstrategy" type="string"/>
<preference id="pref-obscite-filepattern" name="extensions.obscite.filepattern" type="string"/>
<preference id="pref-obscite-matchstrategy" name="extensions.obscite.matchstrategy" type="string"/>
<preference id="pref-obscite-zotkeyregex" name="extensions.obscite.zotkeyregex" type="string"/>
<preference id="pref-obscite-metadatakeyword" name="extensions.obscite.metadatakeyword" type="string"/>
Expand All @@ -21,12 +23,29 @@
<groupbox>
<caption label="&obscite.preferences.vault-source-folder;"/>
<description style="width: 420px">&obscite.preferences.vault-source-folder-desc;</description>
<separator/>
<hbox style="margin: 0" align="center">
<textbox id="id-obscite-source_dir" preference="pref-obscite-source_dir" flex="1" />
<button id="id-obscite-source_dir-button" label="&obscite.preferences.choose-button-label;" oncommand="Zotero.ObsCite.chooseVaultFolder();"/>
</hbox>
<label id="id-obscite-source_dir-subdesc" style="font-size: 10px" value="&obscite.preferences.vault-source-folder-subdesc;"/>

<separator/>

<label style="font-size: 14px" value="&obscite.preferences.filefilterstrategy-title;"/>
<radiogroup id="id-obscite-filefilterstrategy" preference="pref-obscite-filefilterstrategy">

<radio label="&obscite.preferences.filefilterstrategy-default-label;" value="default" />
<label id="id-obscite-filefilterstrategy-default-desc" style="font-size: 10px" value="&obscite.preferences.filefilterstrategy-default-desc;"/>

<radio label="&obscite.preferences.filefilterstrategy-customfileregex-label;" value="customfileregex" />
<hbox style="margin: 0" align="center">
<label id="id-obscite-filepattern-label" value="&obscite.preferences.zotkey-regex-label;"/>
<textbox id="id-obscite-filepattern" preference="pref-obscite-filepattern" flex="1" />
</hbox>
<label id="id-obscite-filefilterstrategy-customfileregex-desc" style="font-size: 11px" value="&obscite.preferences.filefilterstrategy-customfileregex-desc;"/>

</radiogroup>


</groupbox>
<separator/>

Expand Down Expand Up @@ -59,14 +78,21 @@

<separator/>

<label id="id-obscite.preferences.zotkeyregex-title" value="&obscite.preferences.zotkeyregex-title;"/>
<label id="id-obscite.preferences.zotkeyregex-desc" value="&obscite.preferences.zotkeyregex-desc;"/>
<label id="id-obscite-preferences-zotkeyregex-title" value="&obscite.preferences.zotkeyregex-title;"/>
<label id="id-obscite-preferences-zotkeyregex-desc" value="&obscite.preferences.zotkeyregex-desc;"/>
<hbox style="margin: 0" align="center">
<label id="id-obscite.preferences.zotkey-regex-label" value="&obscite.preferences.zotkey-regex-label;"/>
<label id="id-obscite-preferences-zotkey-regex-label" value="&obscite.preferences.zotkey-regex-label;"/>
<textbox id="id-obscite-zotkeyregex" preference="pref-obscite-zotkeyregex" flex="1" />
</hbox>
<label id="id-obscite.preferences.zotkey-regex-subdesc" style="font-size: 10px" value="&obscite.preferences.zotkey-regex-subdesc;"/>
<label id="id-obscite-preferences-zotkey-regex-subdesc" style="font-size: 10px" value="&obscite.preferences.zotkey-regex-subdesc;"/>

</groupbox>

<groupbox>
<caption label="&obscite.preferences.rundebug-label;"/>
<description style="width: 420px">&obscite.preferences.rundebug-desc;</description>
<button id="id-obscite-rundebug-button" label="&obscite.preferences.rundebug-button-label;" oncommand="Zotero.ObsCite.runAndSaveDebug();"/>
<separator/>
</groupbox>

</radiogroup>
Expand Down
Loading

0 comments on commit ae9f1fe

Please sign in to comment.