Giter Club home page Giter Club logo

notion-graph-view's People

Contributors

0armaan025 avatar bobronium avatar dylfaen avatar prajjwalyd avatar rayremnant avatar skyran1278 avatar stevedsun avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

notion-graph-view's Issues

Question: more link support?

Hello, @stevedsun! I've just stumbled across this project, great stuff!

I was wondering, are these link types on the roadmap, or not supported because some kind of limitation?

  • embed
  • callout
  • quote
  • column
  • column_list
  • synced_block
  • link_to_page
  • table_row

I saw that lib was updated from using client to using SDK, and I can imagine these types of links weren't possible to track using token_v2.

Is it still impossible to track with data from an SDK or now it can be implemented? If it's possible, I would be happy to collaborate!

nicodeEncodeError: 'charmap'

Graph is generated at: ./graph_out.html
Traceback (most recent call last):
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.3568.0_x64__qbz5n2kfra8p0\lib\runpy.py", line 197, in _run_module_as_main
return _run_code(code, main_globals, None,
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.3568.0_x64__qbz5n2kfra8p0\lib\runpy.py", line 87, in run_code
exec(code, run_globals)
File "C:\Users\alber\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\notion_graph_main
.py", line 4, in
cli.main()
File "C:\Users\alber\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\notion_graph\cli.py", line 17, in main
parser.export_to_html(args.out)
File "C:\Users\alber\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\notion_graph\parser.py", line 53, in export_to_html
self._graph.show(file_path)
File "C:\Users\alber\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\pyvis\network.py", line 551, in show
self.write_html(name, local)
File "C:\Users\alber\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\pyvis\network.py", line 508, in write_html
out.write(self.html)
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.3568.0_x64__qbz5n2kfra8p0\lib\encodings\cp1252.py", line 19, in encode
return codecs.charmap_encode(input,self.errors,encoding_table)[0]
UnicodeEncodeError: 'charmap' codec can't encode characters in position 263607-263621: character maps to < undefined >

Doesn't work with same database relationships

I have set up a bunch of relations with the same database. So a page might link to another page on the same database.

Graph View doesn't seem to display these relations.

I have just a single blob in the centre of the main database. No other link or channel has been created even tho I have many.

Also, it gives error: file graph_out.html not found, even tho the export has been completed successfully on my desktop.

And, random elements in the graph view will just collapse onto each other, overlapping each other's.

Getting runtime error even after providing credentials

I am really trying to make this work. However, I am getting error when launching main.py. When I run config.py I get runtime error saying that I have not entered by credentials but in fact I have. Can anyone help? Thank you.

Could not find block with ID ****

Once running main.py

/notion-graph-view/env/lib/python3.10/site-packages/notion_client/client.py", line 126, in _parse_response
raise APIResponseError(response, body["message"], code)
notion_client.errors.APIResponseError: Could not find block with ID: **************************. Make sure the relevant pages and databases are shared with your integration.

I could not find the option to share the specific page with an integration. How can this be done?

Traceback error

Hello! Did everything as instructed, getting these errors, please advise! thank you!

Traceback (most recent call last):
File "C:\Users###\Desktop\notion\main.py", line 1, in
from parser import BlockParser
File "C:\Users###\Desktop\notion\parser.py", line 2, in
from config import notion
File "C:\Users###\Desktop\notion\config.py", line 2, in
from notion_client import Client
ModuleNotFoundError: No module named 'notion_client'

中文乱码

您好,如果笔记有中文,生成的图就会显示乱码
image

Empty graph

This is the command output:

Parsing ...
Prasing ... done
Graph is generated at: ./Documents/nograph/graph_out.html

And I get no web console errors either:
198

support for cycles

ahoy! thank you so much for creating this repo!

as far as I can tell, the graph view doesn't depict cycles, even if they exist in the underlying notion DB

Would you be able to point me to which pieces of the repo would need to be tweaked to make this possible? I'd be happy to give this a whirl with a little guidance

Crashes while building a graph

Hi there! I'm having trouble using Notion Graph View. When I run the program to generate a graph, it crashes, possibly when encountering a page with a database (in my workspace, it found several nodes before crashing).

File "/home/zboucek/.local/lib/python3.10/site-packages/notion_client/client.py", line 126, in _parse_response
    raise APIResponseError(response, body["message"], code)
notion_client.errors.APIResponseError: Could not find database with ID: **********************. Make sure the relevant pages and databases are shared with your integration.

Thanks, the project looks interesting. Just what I was looking for. Hopefully the bug will be resolved soon.

link_to_page working properly

Issue #5
; The API related to link to page appears to be working properly.

My notion consisted of the following:

스크린샷 2023-11-26 오후 9 49 01

The result of the API call is

스크린샷 2023-11-26 오후 9 49 31

Authorisation problem - can you please help?

Traceback (most recent call last):
File "D:\PycharmProjects\notion-graph-view\main.py", line 26, in
read_page(my_token_v2, my_url)
File "D:\PycharmProjects\notion-graph-view\main.py", line 10, in read_page
client = NotionClient(token_v2=token_v2)
File "D:\PycharmProjects\notion-graph-view\venv\lib\site-packages\notion\client.p
y", line 95, in init
self._update_user_info()
File "D:\PycharmProjects\notion-graph-view\venv\lib\site-packages\notion\client.p
y", line 126, in _update_user_info
records = self.post("loadUserContent", {}).json()["recordMap"]
File "D:\PycharmProjects\notion-graph-view\venv\lib\site-packages\notion\client.p
y", line 265, in post
response.raise_for_status()
File "D:\PycharmProjects\notion-graph-view\venv\lib\site-packages\requests\models
.py", line 943, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 401 Client Error: Unauthorized for url: https://www.
notion.so/api/v3/loadUserContent

requests.exceptions.HTTPError: Invalid input - message

D:\PycharmProjects\notion-graph-view\venv\Scripts\python.exe D:/PycharmProjects/notion-graph-view/main.py
Root Page: Personal Home
page Personal Home
Traceback (most recent call last):
File "D:\PycharmProjects\notion-graph-view\main.py", line 30, in
read_page(config2.my_token_v2, config2.my_url)
File "D:\PycharmProjects\notion-graph-view\main.py", line 17, in read_page
bfs_block(base_block)
File "D:\PycharmProjects\notion-graph-view\main.py", line 24, in bfs_block
parser = Parser(block)
File "D:\PycharmProjects\notion-graph-view\parser2.py", line 15, in init
self.parse_page(block)
File "D:\PycharmProjects\notion-graph-view\parser2.py", line 85, in parse_page
self.parse_children(page)
File "D:\PycharmProjects\notion-graph-view\parser2.py", line 74, in parse_children
self.parse_collection(collection)
File "D:\PycharmProjects\notion-graph-view\parser2.py", line 45, in parse_collection
row_blocks = collection.get_rows()
File "D:\PycharmProjects\notion-graph-view\venv\lib\site-packages\notion\collection.py", line 239, in get_rows
return self.query(**kwargs)
File "D:\PycharmProjects\notion-graph-view\venv\lib\site-packages\notion\collection.py", line 236, in query
return CollectionQuery(self, self._get_a_collection_view(), **kwargs).execute()
File "D:\PycharmProjects\notion-graph-view\venv\lib\site-packages\notion\collection.py", line 385, in execute
self._client.query_collection(
File "D:\PycharmProjects\notion-graph-view\venv\lib\site-packages\notion\client.py", line 294, in query_collection
return self._store.call_query_collection(*args, **kwargs)
File "D:\PycharmProjects\notion-graph-view\venv\lib\site-packages\notion\store.py", line 344, in call_query_collection
response = self._client.post("queryCollection", data).json()
File "D:\PycharmProjects\notion-graph-view\venv\lib\site-packages\notion\client.py", line 260, in post
raise HTTPError(
requests.exceptions.HTTPError: Invalid input.

Process finished with exit code 1

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.