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

Advice for adding date #3

Closed
vitchyr opened this issue Nov 12, 2021 · 2 comments
Closed

Advice for adding date #3

vitchyr opened this issue Nov 12, 2021 · 2 comments
Labels
enhancement New feature or request

Comments

@vitchyr
Copy link

vitchyr commented Nov 12, 2021

Thank you for this plugin! I would like to modify this to automatically download the date that the paper was published. I have experience programming, but I don't have much experience with JavaScript or using the Notion API. Do you have suggestions for how to get started (e.g., files/lines I need to modify) to make this modification? I'd be happy to make a PR for this if I finish this.

@denkiwakame
Copy link
Owner

denkiwakame commented Nov 13, 2021

@vitchyr

Hi, I would like to share some information to extend this extension. (I hope this information would also help other users)

How to debug your extension

- this.getCurrentTabUrl();
+ this.getPaperInfo(TEST_URL);
  • $ npm install & npm run build build the extension locally
  • navigate to chrome://extension
    • turn on developer mode
    • select load unpacked and open arxiv2notion/dist
    • you can see the extension ID like aedplelmaaaldilfkeobdapccljxxxxx in the loaded extension description
    • open chrome-extension://aedplelmaaaldilfkeobdapccljxxxxx/popup.html
  • open chrome developer tools in your browser (Ctrl + Shift + i w/Linux)
    • you can see debugging outputs (\eg console.log()) in the devtools.
  • once you load unpacked , the extension is automatically synced whenever you run npm run build and reload chrome-extension://${your-extension-id}/popup.html
  • you will be able to know more about how everything is working.

image

Change Notion database scheme

Get arXiv published date

Post to notion.so

        Published: {
          id: "published",
          type: "date",
          date: { start: "2020-12-08T12:00:00Z", end: null },
        },

Oh, wait, when I finished up writing this, I realized that customizing this extension is somewhat troublesome. ☠️
I designed the default database scheme simplest so that it would meet the demand for diversified potential users. I will be considering to update this extension so that the user can select properties on-demand without coding.
If you don't mind, could you please give me some feedback on the desired properties (database scheme) or UIs to save on notion.so ?

@denkiwakame
Copy link
Owner

Merged: #6

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants