Comments (5)
Thank you for your input! I really appreciate it.
As for titles, the program tries to use the first non-empty line of text. I've changed it a bit so it uses the filename in case the file is empty.
That's a good point about the ordering. I hadn't thought about it. It should work better now, if you'd like to try again. I still sort by title.
from auto-generate-summary.
I think you have done it. But I have some further ideas.
As for titles, my personal opinion is to remove the extension and then remove the possible delimiters, and even segment the words based on capital letters if necessary.
As for sorting, I've seen improvements to it, but it might be a great idea to keep it consistent with the sorting in mainstream editors. At least more intuitive.
from auto-generate-summary.
from auto-generate-summary.
Sorry, I mean the program needs to make people realize that the order of files in his current directory is the order of the chapters.
For this example:
example
├── chapter_1
│ ├── 1_xxxxxxxx.md
│ ├── cccccccc_1.md
│ ├── landing.md
│ ├── section_1_1.md
│ ├── section_1_2.md
│ ├── section_1_3.md
│ └── xxxxxxxx_4.md
├── chapter_2
│ ├── landing.md
│ └── section_2_1.md
└── SUMMARY.md
Now we will get:
# SUMMARY
- [Chapter 1 title parsed from markdown file](./chapter_1/landing.md)
- [1_xxxxxxxx.md](./chapter_1/1_xxxxxxxx.md)
- [Section 1.1 title](./chapter_1/section_1_1.md)
- [Section 1.2 title](./chapter_1/section_1_2.md)
- [Section 1.3 title](./chapter_1/section_1_3.md)
- [cccccccc_1.md](./chapter_1/cccccccc_1.md)
- [xxxxxxxx_4.md](./chapter_1/xxxxxxxx_4.md)
- [Chapter 2 title](./chapter_2/landing.md)
- [Section 2.1 title](./chapter_2/section_2_1.md)
But I think we should get:
# SUMMARY
- [Chapter 1 title parsed from markdown file](./chapter_1/landing.md)
- [1_xxxxxxxx.md](./chapter_1/1_xxxxxxxx.md)
- [cccccccc_1.md](./chapter_1/cccccccc_1.md)
- [Section 1.1 title](./chapter_1/section_1_1.md)
- [Section 1.2 title](./chapter_1/section_1_2.md)
- [Section 1.3 title](./chapter_1/section_1_3.md)
- [xxxxxxxx_4.md](./chapter_1/xxxxxxxx_4.md)
- [Chapter 2 title](./chapter_2/landing.md)
- [Section 2.1 title](./chapter_2/section_2_1.md)
from auto-generate-summary.
I think we can learn something from this: https://github.com/sashaweiss/itree
from auto-generate-summary.
Related Issues (1)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from auto-generate-summary.