Giter Site home page Giter Site logo

Any plans to add the graph? about perlite HOT 9 CLOSED

secure-77 avatar secure-77 commented on May 17, 2024
Any plans to add the graph?

from perlite.

Comments (9)

secure-77 avatar secure-77 commented on May 17, 2024 1

little update to this, i found a promising obsidian plugin, which can extract the file and link structure as json (https://github.com/kometenstaub/metadata-extractor)

with this, i think i found a way to automatically create the desired json file(s), so i only need to parse and display them in perlite. as soon i have some time for i will try to implement this.

from perlite.

secure-77 avatar secure-77 commented on May 17, 2024 1

@FravBox good news, the implementation is almost done, just need some more adjustments and fixes because i also updated the theme, design and many other small things. But here are some preview images from my Notes :)

image

image

image

from perlite.

FravBox avatar FravBox commented on May 17, 2024 1

Hi! So sorry to not reply for so long. Life happened. 😂

Yes, it works now. Thank you so much.

from perlite.

secure-77 avatar secure-77 commented on May 17, 2024

Hey @FravBox,

i took a look at this but at the moment i´am not sure how i can implement this in an easy / best way. At the end i need a JSON construct for building up the graph. I hoped that Obsidian itself stores this information (which file is linked to another file) in some file but at least i cant find this information in the vault (i checked the .obsidian folder). So maybe obsidian stores this information on another place or just build this in time.

To generate this JSON construct by itself (with PHP) seems to be a mess, because you need to search for every link to other links in the md. files and then follow this links, search again and so, this will end in a recursion process, which i dont want to do each time a md file is called / parsed.

So, i only see a few possibilities to solve this:

  1. find a way (if possible) to extract this information (who is linked to each other) from Obsidian
  2. only provide a graph for the file hierarchy and skip links between files --> but then the graph is more or less useless
  3. use a one time script / method to generate this JSON construct out of the files --> should be doable with python but then it would break / infect the idea behind the project to just host the vault "as it is", because you need a extra step to generate this graph every time you update your hosted vault.

So, if anybody has a good idea how i can better solve this, i would be glad to hear it. If i have some time i will take again a look at the Obsidian infrastructure, maybe i can find the linking information on some other place (point 1).

BR,
Sec77

from perlite.

FravBox avatar FravBox commented on May 17, 2024
  1. use a one time script / method to generate this JSON construct out of the files --> should be doable with python but then it would break / infect the idea behind the project to just host the vault "as it is", because you need a extra step to generate this graph every time you update your hosted vault.

I think this may be a good compromise. You could go one step further and require a specific file be updated in order to update the graph? Alternatively, only update the graph when the count of md files in the root directory changes (one is added or removed)?

It's true it's not ideal, but I think the ability to share a slightly out-of-date graph with the public is preferred over no graph at all. Or at least it is to me, anyway.

But hopefully someone else could see this and have a better/easier solution.

Thanks again

from perlite.

secure-77 avatar secure-77 commented on May 17, 2024

@FravBox new release is online where this is implemented, let me know what you think :)

from perlite.

FravBox avatar FravBox commented on May 17, 2024

I can't seem to get the graph to work on my end. Did a complete re-install of everything. I think it might just be something stupid I overlooked?

I went through the guide you've written in the readme. https://khat.us/obsidian/perlite/

edit: Looks like the plugin just isn't making a metadata.json file at all. Not sure why. The plugin is enabled and I have it set to write it every time obsidian opens.

edit2: OK I finally got the metadata.json, but still can't get the graph to work online.

from perlite.

secure-77 avatar secure-77 commented on May 17, 2024

hey,
it seams that the php engine cant find your metadata.json because its under https://khat.us/obsidian/perlite/test/metadata.json and not in the root folder of your structure.

Please make sure the metadata.json resident in your root folder, in you case this should be the folder "Notes". You also need to "use" this top folder (Notes) as your obsidian vault to make sure the paths of the graph are correct and the graph can also be created for other folder like the folder "Demo".

Alternatively change in the helper.php the $rootDir to Notes/test. Then the Graph also should work.

BR,
Sec77

from perlite.

secure-77 avatar secure-77 commented on May 17, 2024

Hey @FravBox,

Since i haven´t heard from you, I will close this issue. Please reopen this or create a new one if you need further help.

Thanks and BR,
Sec77

from perlite.

Related Issues (20)

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.