zotero-plugin 1.0.65 → 1.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -2
- package/bin/start.py +7 -3
- package/package.json +6 -6
package/README.md
CHANGED
|
@@ -10,7 +10,7 @@ it will issue a new release. When it is ran on a branch named
|
|
|
10
10
|
in your repo.
|
|
11
11
|
|
|
12
12
|
For this to work you must have a variable named `GITHUB_TOKEN` in
|
|
13
|
-
your travis environment with a
|
|
13
|
+
your travis environment with a github token with `repo` rights. You
|
|
14
14
|
are allowed one bot account by github; I use this to do the
|
|
15
15
|
announcements, but you can use one from your own account if you
|
|
16
16
|
want.
|
|
@@ -46,7 +46,7 @@ log = <file name to write log output to> # optional
|
|
|
46
46
|
db = <path to zotero.sqlite you want to populate the profile with> # optional
|
|
47
47
|
|
|
48
48
|
[preferences]
|
|
49
|
-
extensions.zotero.<your extension>.<some setting> =
|
|
49
|
+
extensions.zotero.<your extension>.<some setting> = <value>
|
|
50
50
|
```
|
|
51
51
|
|
|
52
52
|
and add this script to your package.json:
|
|
@@ -56,3 +56,7 @@ and add this script to your package.json:
|
|
|
56
56
|
```
|
|
57
57
|
|
|
58
58
|
then when you execute `npm start`, zotero will start up with the latest build of your plugin installed.
|
|
59
|
+
|
|
60
|
+
**DO CREATE A BACKUP OF YOUR ZOTERO DATA *AND* YOUR ZOTERO PROFILE BEFORE USING THIS THE FIRST TIME**
|
|
61
|
+
|
|
62
|
+
`zotero-start` will **blindly** trust you've set it up right and will **alter data** in the profile
|
package/bin/start.py
CHANGED
|
@@ -28,7 +28,7 @@ class Config:
|
|
|
28
28
|
self.zotero = types.SimpleNamespace(
|
|
29
29
|
path=config.get('zotero', 'path', fallback=None),
|
|
30
30
|
log=config.get('zotero', 'log', fallback=None),
|
|
31
|
-
db=config.get('
|
|
31
|
+
db=config.get('zotero', 'db', fallback=None)
|
|
32
32
|
)
|
|
33
33
|
|
|
34
34
|
if self.zotero.path:
|
|
@@ -43,6 +43,10 @@ class Config:
|
|
|
43
43
|
if self.zotero.log:
|
|
44
44
|
self.zotero.log = os.path.expanduser(self.zotero.log)
|
|
45
45
|
|
|
46
|
+
self.plugin = types.SimpleNamespace(
|
|
47
|
+
source=os.path.abspath(config.get('plugin', 'source', fallback='build'))
|
|
48
|
+
)
|
|
49
|
+
|
|
46
50
|
if 'preferences' in config:
|
|
47
51
|
self.preference = { k: self.pref_value(v) for k, v in dict(config['preferences']).items() }
|
|
48
52
|
else:
|
|
@@ -119,10 +123,10 @@ system('npm run build')
|
|
|
119
123
|
if config.zotero.db:
|
|
120
124
|
shutil.copyfile(config.zotero.db, os.path.join(config.profile.path, 'zotero', 'zotero.sqlite'))
|
|
121
125
|
|
|
122
|
-
for plugin_id in ET.parse(os.path.join(
|
|
126
|
+
for plugin_id in ET.parse(os.path.join(config.plugin.source, 'install.rdf')).getroot().findall('{http://www.w3.org/1999/02/22-rdf-syntax-ns#}Description/{http://www.mozilla.org/2004/em-rdf#}id'):
|
|
123
127
|
plugin_path = os.path.join(config.profile.path, 'extensions', plugin_id.text)
|
|
124
128
|
with open(plugin_path, 'w') as f:
|
|
125
|
-
sources =
|
|
129
|
+
sources = config.plugin.source
|
|
126
130
|
if sources[-1] != '/': sources += '/'
|
|
127
131
|
print(sources, file=f)
|
|
128
132
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "zotero-plugin",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.1.3",
|
|
4
4
|
"description": "Zotero plugin builder",
|
|
5
5
|
"homepage": "https://github.com/retorquere/zotero-plugin/wiki",
|
|
6
6
|
"bin": {
|
|
@@ -29,9 +29,9 @@
|
|
|
29
29
|
"dependencies": {
|
|
30
30
|
"@octokit/rest": "^18.12.0",
|
|
31
31
|
"@rgrove/parse-xml": "^3.0.0",
|
|
32
|
-
"@types/node": "^17.0.
|
|
33
|
-
"@typescript-eslint/eslint-plugin": "^5.
|
|
34
|
-
"@typescript-eslint/parser": "^5.
|
|
32
|
+
"@types/node": "^17.0.17",
|
|
33
|
+
"@typescript-eslint/eslint-plugin": "^5.11.0",
|
|
34
|
+
"@typescript-eslint/parser": "^5.11.0",
|
|
35
35
|
"@xmldom/xmldom": "^0.8.0",
|
|
36
36
|
"ajv": "^8.10.0",
|
|
37
37
|
"ajv-keywords": "^5.1.0",
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
"current-git-branch": "^1.1.0",
|
|
41
41
|
"dotenv": "^16.0.0",
|
|
42
42
|
"ejs": "^3.1.6",
|
|
43
|
-
"eslint": "^8.
|
|
43
|
+
"eslint": "^8.9.0",
|
|
44
44
|
"eslint-plugin-import": "^2.25.4",
|
|
45
45
|
"eslint-plugin-prefer-arrow": "^1.2.3",
|
|
46
46
|
"glob": "^7.2.0",
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
"shell-quote": "^1.7.3",
|
|
55
55
|
"shelljs": "^0.8.5",
|
|
56
56
|
"string-to-arraybuffer": "^1.0.2",
|
|
57
|
-
"ts-node": "^10.
|
|
57
|
+
"ts-node": "^10.5.0",
|
|
58
58
|
"tslib": "^2.3.1",
|
|
59
59
|
"typescript": "^4.5.5",
|
|
60
60
|
"uri-templates": "^0.2.0",
|