Code Monkey home page Code Monkey logo

Comments (6)

everruler12 avatar everruler12 commented on August 23, 2024

You could try forking https://github.com/everruler12/roam2github/blob/main/roam2github.js
then replace line 409 const markdown_dir = path.join(backup_dir, 'markdown', graph_name) with const markdown_dir = path.join(backup_dir, '_notes')

Then in your Actions repo, in main.yml line 30, replace:
git clone -q https://github.com/everruler12/roam2github.git roam2github with git clone -q https://github.com/tharansakthi/roam2github.git roam2github
and add th following after line 37:

          BACKUP_EDN: false
          BACKUP_JSON: false
          BACKUP_MARKDOWN: true

But I see you're using roam-to-git to generate notes, in which case this wouldn't work. There's probably a way after the "Generate notes" task in main.yml to add a run a task that does the renaming and moving. That would probably be easiest.

from roam2github.

tharansakthi avatar tharansakthi commented on August 23, 2024

Unfortunately, I am using this fork of roam-to-git -> https://github.com/DoomHammer/roam-to-git/tree/roam-to-garden

The formatter code inside this transforms the .md files and its file names when moving to "_notes" folder in Jekyll. But the template (https://github.com/maximevaillancourt/digital-garden-jekyll-template) I'm using doesn't need any formatting. Also the code doesn't publish entire roam graph, instead it only converts the notes referred under Public.md file.

So, I am thinking about moving to roam-to-git, but I don't how to move the extracted .md files in /markdown/ to _notes folder.

It would be nice to get an option to mention the location folder through git secrets or something like that in your original repo, so that many people like me benefit.

from roam2github.

tharansakthi avatar tharansakthi commented on August 23, 2024

You could try forking https://github.com/everruler12/roam2github/blob/main/roam2github.js
then replace line 409 const markdown_dir = path.join(backup_dir, 'markdown', graph_name) with const markdown_dir = path.join(backup_dir, '_notes')

The above code didn't work as expected. It again stores content inside markdown/ directory. Did I do anything wrong?

const markdown_dir = path.join(backup_dir, '_notes', graph_name) - also not working.

Is there any other way?

from roam2github.

tharansakthi avatar tharansakthi commented on August 23, 2024

https://github.com/tharansakthi/roam2github/blob/main/backup.js
code line number 413.
replacing to -> const markdown_dir = path.join(backup_dir, '_notes')

Worked successfully

from roam2github.

everruler12 avatar everruler12 commented on August 23, 2024

It would be nice to get an option to mention the location folder through git secrets or something like that in your original repo, so that many people like me benefit.

I have since moved on from Roam to Obsidian. Roam2Github was only intended for backups, not digital gardens. Roam has since released their own automatic backup solution. So I no longer use Roam2Github, and unfortunately don't plan on adding more features.

code line number 413. replacing to -> const markdown_dir = path.join(backup_dir, '_notes')

Ah, I missed line 413 which still included the graph name. Good catch! So are things working the way you want now? If not, there should still be a way using main.yml to move files.

from roam2github.

tharansakthi avatar tharansakthi commented on August 23, 2024

It worked like a charm.
Thanks a lot for the help.

from roam2github.

Related Issues (16)

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.