Feature Request: Extract the file content
opened this issue · comments
I have just get started with CodeTour, but I found that the exported .tour
file contains the related file content in every step.
Once the related file gets bigger, the tour file will grow very fast.
Can those tour related source files be relative to the tour file, instead of embedded? By providing options or even make it default behaviour.
Thank you for making this extension, it's really useful.
Hey! Could you share more about what you have in mind for the export feature? As it currently stands, it's optimized for sharing a tour with someone, that doesn't necessarily have the associated source code. Which is why the tour embeds the source files into it.
If you wanted the tour to reference files within the same workspace, you could achieve that by storing the .tour file in the repo, as opposed to exporting it. Or is there a scenario where you want to be able to share tours with users, without checking it into version control?
Thank you for such a quick response.
I'm thinking to export tours with related files only.
e.g. for a project like this,
/
├───.tours/
│ └───hello.tour
├───.gitignore
├───__init__.py
├───app.py
├───pakcage1/
│ ├───module11.py
│ ├───module12.py
│ └───module13.py
└───package2/
├───module21.py
├───module22.py
└───module23.py
and I only need app.py
, module11.py
and module22.py
for my tour, then the export will become a dir/archive like this,
/
├───.tours/
│ └───hello.tour
├───app.py
├───pakcage1/
│ └───module11.py
└───package2/
├───module22.py
and the hello.tour
could basically remain unchanged.
You do point out that I should pass the whole repo to share the tour, which is a good solution and I should use that instead of making things complicated.