Skip to content

Commit c96fdba

Browse files
Merge branch 'main' into cleanup
2 parents c0b18f3 + 03d1f3b commit c96fdba

File tree

5 files changed

+22
-6
lines changed

5 files changed

+22
-6
lines changed

README.md

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# iCalObsidianSync
2-
This Obsidian plugin allows to synchronize iCalendar with your Obsidian notes.
2+
This Obsidian plugin allows to synchronize iCalendar with your Obsidian notes.
33

44
<p align="center">
55
<img width="650" src="https://raw.githubusercontent.com/Vaccarini-Lorenzo/iCalObsidianSync/main/materials/iCalDemo.gif">
@@ -29,5 +29,19 @@ The plugin works on top of a **NLP** library [(NLP wink)](https://winkjs.org/win
2929
### iCloud module
3030
The communication with iCloud wouldn't be possible without the help of [iCloud.js](https://github.com/foxt/icloud.js.git). The library has been opportunely modified to support POST requests and bypass CORS policies. <br>
3131
Since Apple doesn't support OAuth, it's necessary to login with email and password. These inserted credentials are stored exclusively in your local device (AES encrypted) in order to avoid a manual login everytime a token refresh is needed. The encryption key is randomly generated when the plugin is installed. It can be manually changed in the settings section (not recommended).
32-
### CORS proxy
33-
Obsidian is an Electron App and as such it implements its own CORS policies. To bypass them it's necessary to deploy a CORS proxy server that will simply forward the requests to the specified URL. At the moment the default CORS proxy is a simple server deployed on Render but it's possible to modify the proxy endpoint in the settings section. In the repository it's provided the [exact code of the deployed CORS](https://github.com/Vaccarini-Lorenzo/iCalObsidianSync/blob/main/src/CORSProxy/proxyServer.js) server which can be eventually be started locally.
32+
33+
34+
# What's new?
35+
### v.1.1.0
36+
- No need for a CORS proxy anymore
37+
- NPL module improvements:
38+
1) Entity-related attributes identification
39+
2) Event purpose recognition
40+
3) Fix entity overlap bug
41+
42+
# Currently in development phase
43+
- **Event inline view**: From version v.1.2.0 will be possible to embed iCalendar events in your notes
44+
45+
<p align="center">
46+
<img width="650" src="https://raw.githubusercontent.com/Vaccarini-Lorenzo/iCalObsidianSync/main/materials/inlineViewDemo.gif">
47+
</p>

materials/inlineViewDemo.gif

1.44 MB
Loading

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@
1818
"builtin-modules": "3.3.0",
1919
"chrono-node": "^2.6.4",
2020
"codemirror": "^6.0.1",
21-
"dayjs": "^1.11.6",
2221
"electron": "^25.3.2",
2322
"esbuild": "0.18.17",
23+
"moment-timezone": "^0.5.43",
2424
"node-fetch": "^2.6.7",
2525
"obsidian": "latest",
2626
"process": "^0.11.10",

src/controllers/nlpController.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import wink, {CustomEntities, Detail, PartOfSpeech, Tokens} from "wink-nlp";
1+
import wink, {CerConfig, CustomEntities, Detail, PartOfSpeech, Tokens} from "wink-nlp";
22
import model from "wink-eng-lite-web-model";
33
import {readFileSync} from "fs";
44
import {ParsedResult} from "chrono-node";
@@ -99,6 +99,7 @@ class NlpController {
9999
const pos = auxiliaryStructures.pos;
100100

101101
const dates = this.filterDates(mainCustomEntities);
102+
//const times = this.filterTimes(secondaryCustomEntities);
102103
const properNames = this.filterProperNames(secondaryCustomEntities);
103104
const eventNouns = this.filterEventNoun(secondaryCustomEntities);
104105
const purpose = this.findPurpose(auxiliaryStructures.caseInsensitiveText, mainCustomEntities);
@@ -191,6 +192,8 @@ class NlpController {
191192
}) as Detail[];
192193
}
193194

195+
196+
194197
private filterProperNames(customEntities: CustomEntities): Detail[] {
195198
const its = this._secondaryNLP.its;
196199
return customEntities.out(its.detail).filter(pos => (pos as unknown as Detail).type == "properName") as Detail[];

src/plugin/nlpExtension.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ class NLPPlugin implements PluginValue {
3232
const documentLines = view.state.doc.slice(view.viewport.from, view.viewport.to).toJSON();
3333
documentLines.some((line, i) => {
3434
const matches = nplController.process(new Sentence(filePath, line));
35-
//const matches = null;
3635
if(matches == null) return false;
3736
const eventDetailString = this.getEventDetail(matches.event);
3837
matches.selection.forEach(match => {

0 commit comments

Comments
 (0)