Giter Site home page Giter Site logo

Comments (4)

karlicoss avatar karlicoss commented on June 21, 2024

Hey, sorry for late reply. Haven't tried logbook parsing personally, but it's possible! Perhaps somewhat related issue: #8

A PR with a test that reproduces this will be welcome (even if it's failing at the moment, we can disable it for now and fix it later)

from orgparse.

MorphicResonance avatar MorphicResonance commented on June 21, 2024

Body can be extracted without drawers.
By the way, it seems like repeated_tasks does not work anymore. I've tried with example from the docs. Something wrong with regex.

from orgparse.

karlicoss avatar karlicoss commented on June 21, 2024

hey, I just checked the doctest from here

orgparse/orgparse/node.py

Lines 1398 to 1439 in 349a61f

"""
Get repeated tasks marked DONE in an entry having repeater.
:rtype: list of :class:`orgparse.date.OrgDateRepeatedTask`
>>> from orgparse import loads
>>> node = loads('''
... * TODO Pay the rent
... DEADLINE: <2005-10-01 Sat +1m>
... - State "DONE" from "TODO" [2005-09-01 Thu 16:10]
... - State "DONE" from "TODO" [2005-08-01 Mon 19:44]
... - State "DONE" from "TODO" [2005-07-01 Fri 17:27]
... ''').children[0]
>>> node.repeated_tasks # doctest: +NORMALIZE_WHITESPACE
[OrgDateRepeatedTask((2005, 9, 1, 16, 10, 0), 'TODO', 'DONE'),
OrgDateRepeatedTask((2005, 8, 1, 19, 44, 0), 'TODO', 'DONE'),
OrgDateRepeatedTask((2005, 7, 1, 17, 27, 0), 'TODO', 'DONE')]
>>> node.repeated_tasks[0].before
'TODO'
>>> node.repeated_tasks[0].after
'DONE'
Repeated tasks in ``:LOGBOOK:`` can be fetched by the same code.
>>> node = loads('''
... * TODO Pay the rent
... DEADLINE: <2005-10-01 Sat +1m>
... :LOGBOOK:
... - State "DONE" from "TODO" [2005-09-01 Thu 16:10]
... - State "DONE" from "TODO" [2005-08-01 Mon 19:44]
... - State "DONE" from "TODO" [2005-07-01 Fri 17:27]
... :END:
... ''').children[0]
>>> node.repeated_tasks # doctest: +NORMALIZE_WHITESPACE
[OrgDateRepeatedTask((2005, 9, 1, 16, 10, 0), 'TODO', 'DONE'),
OrgDateRepeatedTask((2005, 8, 1, 19, 44, 0), 'TODO', 'DONE'),
OrgDateRepeatedTask((2005, 7, 1, 17, 27, 0), 'TODO', 'DONE')]
See: `(info "(org) Repeated tasks")
<http://orgmode.org/manual/Repeated-tasks.html>`_
"""
and it does extract repeated tasks for me? Can you post a minimal example which doesn't work for you? Thanks :)

from orgparse.

MorphicResonance avatar MorphicResonance commented on June 21, 2024

It works.

from orgparse.

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.