Giter VIP home page Giter VIP logo

Comments (3)

matthewwardrop avatar matthewwardrop commented on May 21, 2024

Hi @Pl-Mrcy,

While our backends support adding these files, the front-end has yet to expose these "source" files for download (see issue #45).

To add the source files just add them in a space separated list after the keyword --src to the add action. For more details about the post addition command, you can refer to the help:

$ knowledge_repo add --help
usage: knowledge_repo add [-h] [-p PATH] [--update] [--branch BRANCH]
                          [--squash] [--submit] [-m MESSAGE]
                          [--src SRC [SRC ...]]
                          filename

positional arguments:
  filename              The filename to add.

optional arguments:
  -h, --help            show this help message and exit
  -p PATH, --path PATH  The path of the destination post to be added in the
                        knowledge repo. Required if the knowledge post does
                        not specify "path" in its headers.
  --update              Whether this should update an existing post of the
                        same name.
  --branch BRANCH       The branch to use for this addition, if not the
                        default (which is the path of the knowledge post).
  --squash              Automatically suppress all previous commits, and
                        replace it with this version.
  --submit              Submit newly added post
  -m MESSAGE, --message MESSAGE
                        The commit message to be used when committing into the
                        repo.
  --src SRC [SRC ...]   Specify additional source files to add to
                        <knowledge_post>/orig_src.

An example of adding an excel spreadsheet as an "attachment" or "adjunct" file to a knowledge post would be:
knowledge_repo add post/test.kp -p projects/test --src test.xslx

I know documentation is a bit rough, but we're improving things step by step. Let us know if you have any more questions.

I'm gong to close this issue for now, but if you do have any more questions (or this didn't solve your problem), feel free to reopen it :).

from knowledge-repo.

Pl-Mrcy avatar Pl-Mrcy commented on May 21, 2024

Hi Matthew,

I indeed hadn't read the help well enough. You solved my problem.
However I didn't succeed in adding a folder (with multiple files inside) using this option.

knowledge_repo add post/test.kp -p projects/test --src test_folder/

This would add the entire test_folder to projects/test/orig_src.

Thank you very much for your quick answer and for this great work !

from knowledge-repo.

matthewwardrop avatar matthewwardrop commented on May 21, 2024

@Pl-Mrcy Yeah... I don't think I could decide at the time whether we wanted to support that (it runs the risk of repositories getting really bloated). Will have to think some more on this, I think...

from knowledge-repo.

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.