Comments (13)
Hey, I'll try and get to this soon.
from vimwiki-definitions-extractor.
So I don't think you'll need a whole lot of this script. Right now it concatenates all the files with tail and sed. You won't need either of those since you loop through all the files already. So on each file you'll want to use awk to find the first definition of 'Description'. Print that to a Bash variable, then exit early.
You won't need the DECK variable, as I used that to split the definition output.
The 'if' on line 34 signifies the end of a definition. You can change the if clause on line 35 to if(WORD == "Description") . If true, then print the DEF and make an early exit 0. You can do the same to the identical if/else statement starting on line 46.
So in the end your awk should be much simpler. Give it a shot and let me know, I don't mind helping out.
from vimwiki-definitions-extractor.
Awesome! that's VERY helpful!
I've updated https://github.com/linuxcaffe/taskwiki-utils.git and those Descriptions will be the icing on the cake!
from vimwiki-definitions-extractor.
Cool. I also use taskwarrior, but I've kept it separate from vimwiki. What's your goal for this sort of integration? and how does it compare to the vimwiki extension on taskwarrior's site?
from vimwiki-definitions-extractor.
I've updated gen-index and.. well. doesn't crash, but doesn't reveal any descriptions either :)
from vimwiki-definitions-extractor.
I'm using taskwiki, which uses vimwiki. I'm also using vim-template, and this gen-index is part of the glue to hold it all together.
https://github.com/tbabej/taskwiki
https://github.com/linuxcaffe/taskwiki-template
from vimwiki-definitions-extractor.
https://github.com/linuxcaffe/taskwiki-utils/blob/master/gen-index more clues please! :)
(link changed)
from vimwiki-definitions-extractor.
Closing.
from vimwiki-definitions-extractor.
All good amigo, had some successes, which I will link, thanks
from vimwiki-definitions-extractor.
I wait in anticipation.
from vimwiki-definitions-extractor.
and yer gonna like it!
not awk, grep, see line 23 of https://github.com/linuxcaffe/taskwiki-utils/blob/master/gen-index
I haven't figure out alignment, it's still kludgy, but the script works,, somehow..
from vimwiki-definitions-extractor.
Nice nice, clever use of cut. But this should only work on single line definitions, correct?
from vimwiki-definitions-extractor.
that's true, it's only work on a single line def.
Have you got ideas for how to align the descriptions? the concealed link text is messing me up if I try to insert tabs. see: http://picpaste.com/taskwiki-screenshot-index-iO8zQ058.png
from vimwiki-definitions-extractor.
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 vimwiki-definitions-extractor.