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

example: turn directory into UnixFS DAG #663

Open
lidel opened this issue Aug 27, 2024 · 4 comments
Open

example: turn directory into UnixFS DAG #663

lidel opened this issue Aug 27, 2024 · 4 comments
Labels
dif/easy Someone with a little familiarity can pick up effort/hours Estimated to take one or several hours good first issue Good issue for new contributors help wanted Seeking public contribution on this issue P2 Medium: Good to have, but can wait until someone steps up

Comments

@lidel
Copy link
Member

lidel commented Aug 27, 2024

Problem

We have many unixfs implementations, and it is extremely confusing for new developers to understand what they should use and why. (cc @2color)

Proposed improvement

The ./exmaples should have an example of ipfs add + ipfs dag export equivalent for reading a file or a directory from local filesystem, and turning it into a CAR with UnixFS DAG that was properly chunked / HAMT-sharded.

The example should be a CLI tool that accepts same flags as ipfs add, demonstrating how to adjust chunker, hash function, or decide if mode/mtime should be preserved.

@lidel lidel added the need/triage Needs initial labeling and prioritization label Aug 27, 2024
@lidel
Copy link
Member Author

lidel commented Aug 27, 2024

Triage notes:

  • we are missing high level api, may need to create new ones first
  • could be an example with existing APIs and opinionated as ipfs add from Kubo + document default settings

@lidel lidel changed the title example: turn directory into a CAR with UnixFS DAG example: turn directory into UnixFS DAG Sep 24, 2024
@gammazero gammazero added P2 Medium: Good to have, but can wait until someone steps up dif/easy Someone with a little familiarity can pick up effort/hours Estimated to take one or several hours and removed need/triage Needs initial labeling and prioritization labels Sep 24, 2024
@mostcute
Copy link

maybe show only server side will be more simple,like the bitswap transfer ,no need a CLI+daemon or client/server mode example

@mostcute
Copy link

client side can show how to get/download the whole dir and single file in a dir. show how client to parse the dag from dir-cid and choose a file to get

@lidel lidel added good first issue Good issue for new contributors help wanted Seeking public contribution on this issue labels Oct 22, 2024
@lidel
Copy link
Member Author

lidel commented Oct 22, 2024

PRs with example ideas are welcome. Feel free to open PR drafts + comment on identified gaps + refer this issue in description.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dif/easy Someone with a little familiarity can pick up effort/hours Estimated to take one or several hours good first issue Good issue for new contributors help wanted Seeking public contribution on this issue P2 Medium: Good to have, but can wait until someone steps up
Projects
None yet
Development

No branches or pull requests

3 participants