Comments (4)
Hm, I see.
@hrehfeld for documentation, do you mean in orgparse, or in the inorganic library I mentioned above?
I mainly need full round-trip org-mode parsing, i.e. parse the file, change something, write back the changes. So.. a separation doesn't really make that much sense here other than to keep reading/writing separate.
For orgparse, I guess the main issue that the original author of library (and me) didn't have this in mind, so the 'ast' is geared towards single pass document reading. It's also possible to take the document object tree and modify it... but writing back might be a bit more complicated, although doable. I just didn't have many usecases for it so far.
my usecase is definitely:
root = orgparse.parse('myfile.org')
root.title = 'Look Ma, I changed the Title!'
orgparse.dump(root, 'myfile.org')
from orgparse.
Hey, I actually do have a small library, inorganic to write org-mode files and you can see examples in doctests and in orger library. I implemented this in a separate library because want to understand what would be a good API first. So let me know if inorganic works for you and I'd be curious about your usecase, so I could think of a convenient interface!
from orgparse.
Is there any reason why there's no documentation on constructing nodes? It seems that roundtrip even with complex files works flawflessly, the only part that is missing is how to construct the ast by hand?
from orgparse.
@hrehfeld for documentation, do you mean in orgparse, or in the inorganic library I mentioned above?
For orgparse, I guess the main issue that the original author of library (and me) didn't have this in mind, so the 'ast' is geared towards single pass document reading. It's also possible to take the document object tree and modify it... but writing back might be a bit more complicated, although doable. I just didn't have many usecases for it so far.
from orgparse.
Related Issues (20)
- How do i load a file with custom TODO keys? HOT 3
- Date parsing with timezone information HOT 2
- speedup parsing
- Invalid syntax when trying to use the library HOT 5
- orgparse.load() is broken for file-like objects HOT 3
- support names on tables HOT 1
- Support more Effort format in Properties HOT 2
- Repeated_tasks and logbook parsing HOT 4
- Minor difference in date objects parsed
- Support properties in OrgRootNode HOT 2
- Question: Why is `_special_comments['TITLE']` a list? HOT 1
- parsing of multiline properties HOT 1
- QUESTION: Reason about using `codecs.open()` HOT 2
- Move `tests` outside the package folder HOT 4
- Offer `CONTRIBUTE.md` (was: Unittest not running) HOT 3
- Providing OrgEnv to load() with pathlib.Path errors HOT 1
- Logbook drawer tags are not removed from body text HOT 1
- Non-existant date errors without context HOT 5
- Extracting line numbers from org nodes? HOT 1
- How to access comments and properties in clocks (Loogbook entry)
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 orgparse.