Git Product home page Git Product logo

Comments (13)

hpincket avatar hpincket commented on June 2, 2024

Hey, I'll try and get to this soon.

from vimwiki-definitions-extractor.

hpincket avatar hpincket commented on June 2, 2024

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.

linuxcaffe avatar linuxcaffe commented on June 2, 2024

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.

hpincket avatar hpincket commented on June 2, 2024

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.

linuxcaffe avatar linuxcaffe commented on June 2, 2024

I've updated gen-index and.. well. doesn't crash, but doesn't reveal any descriptions either :)

from vimwiki-definitions-extractor.

linuxcaffe avatar linuxcaffe commented on June 2, 2024

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.

linuxcaffe avatar linuxcaffe commented on June 2, 2024

https://github.com/linuxcaffe/taskwiki-utils/blob/master/gen-index more clues please! :)
(link changed)

from vimwiki-definitions-extractor.

hpincket avatar hpincket commented on June 2, 2024

Closing.

from vimwiki-definitions-extractor.

linuxcaffe avatar linuxcaffe commented on June 2, 2024

All good amigo, had some successes, which I will link, thanks

from vimwiki-definitions-extractor.

hpincket avatar hpincket commented on June 2, 2024

I wait in anticipation.

from vimwiki-definitions-extractor.

linuxcaffe avatar linuxcaffe commented on June 2, 2024

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.

hpincket avatar hpincket commented on June 2, 2024

Nice nice, clever use of cut. But this should only work on single line definitions, correct?

from vimwiki-definitions-extractor.

linuxcaffe avatar linuxcaffe commented on June 2, 2024

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 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.