jmuchovej / paperpile-notion

CLI & GitHub Workflow based one-way sync from Paperpile to Notion
MIT License
24 stars 5 forks source link

Problem with installation #37

Closed kaizokumcc closed 2 years ago

kaizokumcc commented 2 years ago

Hi! I was looking for a method to include bib files in notion, and your program is just what I needed to I do not start from zero!

However, I would like to implement more features, and for that I would need to install the developer version in my computer. I have tried to:

cd paperpile-notion npm install dev

and it fails miserably when it tries to build inotify. The problem I get is very similar to this one, but neither of the workarounds proposed have worked for me to build it. How could it be installed it locally - or with a mix of global and local packages?

Installing it globally works flawlessly, only for the user version, and npm install -g dev also failed. Also, it only builds the published version, without any tweaks. Being able to modify the code I would like to implement features such as uploading the pdf to notion, exporting different bib fields, etc...

If you could help me with the installation options maybe I can work on a pull request with some of these enhancements! I am not very familiar with JS and TS, although I can program in a few languages, so I would take this as a side-project.

jmuchovej commented 2 years ago

👀 I didn't see this in my inbox.

Glad this was, at least initially, a useful start! 🙂 I'm not sure what this error is referring to. 😅

Just to clarify – you're looking at using a local, development-oriented, installation to use and add features to?

If so, the walk-through to mimic my development environment would be...

$ gh repo clone jmuchovej/paperpile-notion
$ cd paperpile-notion
$ yarn install

Then, I make whatever changes and test them by doing...

$ yarn build
$ ./bin/dev <topic>:<command> [...args]
# OR you could roll them together, like I usually do using...
$ yarn build && ./bin/dev <topic>:<command> [...args]

I'm using oclif to build this tool, so you might need to read up on how they think about things.

Hopefully this pointed you in the right direction. If not, definitely ping me and I'll try to be more responsive! 🙂

jmuchovej commented 2 years ago

Being able to modify the code I would like to implement features such as uploading the pdf to notion, exporting different bib fields, etc...

Just to clarify – I wrote this as a tool for automatically linking Paperpile and Notion workflows. Paperpile doesn't provide an option to control the exported fields (at the moment), so I'm not sure what you're thinking of re: exporting different bib fields, but I'm definitely down to chat some more about that.

Ditto on uploading PDFs (Paperpile doesn't provide back-links to PDFs). If they did, I'd definitely start working on adding proper links to Notion so that PDFs could be retrieved more seamlessly. I am curious, though, how you intend to allow for uploads if users just specify a bib file. Can you elaborate?

kaizokumcc commented 2 years ago

Hi!

Thank you so much for the answer. Unfortunately I needed a quick set-up , so I opted for a similar implementation in python as a baseline so I would not develop from scratch and in a more friendlier environment for me.

Just to clarify – you're looking at using a local, development-oriented, installation to use and add features to?

This is exactly what I was looking into! Maybe in the future, as I want to learn typescript and integrating stuff into notion is always fun. Your way to install and then modify the code will definitely be useful for me or other users :).

Paperpile doesn't provide an option to control the exported fields (at the moment)

The thing is: I do not use neither paperpile, mendelev, or any citation manager. I just copypaste the .bib file from google scholar or any journal page, and afterwards I edit some fields manually. I have tried to use some citation managers and I have been always disappointed after the feedback on the bibliography on the final LaTeX document.

So what I do is first transform the bib file into a csv file, in the same format that paperfile exports it. Afterwards, I import the database in notion from the csv file.

how you intend to allow for uploads if users just specify a bib file?

That was the worst part when creating the merging. Notion does not allow to upload files directly into their platform through the API. A compromised solution (for me, not having any citation manager with PDF files such as paperfile) was to download the pdfs locally in a dropbox folder, which is syncronised to every work computer (either linux, mac, windows...), and then add a file field in notion that contains a public link to the dropbox file. The latter part was done using a script with dropbox API, that was not too cumbersome.

Sorry about the promised collaboration, but your repository was an inspiration for what I finally did!

jmuchovej commented 2 years ago

Good to know. Thanks for looping back and clarifying. 🙂 I'll go ahead and close this, since it sounds like you found a way to do what you wanted. 🎉