Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor metadata extraction #1278

Closed
ralsina opened this issue May 8, 2014 · 7 comments
Closed

Refactor metadata extraction #1278

ralsina opened this issue May 8, 2014 · 7 comments
Milestone

Comments

@ralsina
Copy link
Member

ralsina commented May 8, 2014

Parts of it can be refactored into format-specific extractors (in the compiler plugins) which would get it from places like the docutils document metadata.

@damianavila
Copy link
Member

This is interesting for ipynb too... notebooks can have metadata where we could post meta info...

@Kwpolska Kwpolska added this to the Whenever milestone May 19, 2014
@ralsina
Copy link
Member Author

ralsina commented May 18, 2017

One concern is that to get the metadata we need to parse the thing. So, we may need to cache the intermediate representation (like the doctree in rst)

@Kwpolska
Copy link
Member

We already have read_metadata() (#1603), used by eg. ipynb: https://github.com/getnikola/nikola/blob/master/nikola/plugins/compile/ipynb.py#L125

Its performance is not perfect (we read files twice), but that’s fixable too if it’s a concern.

@ralsina
Copy link
Member Author

ralsina commented May 19, 2017

Ok, so if I implemented read_metadata in, say, the reSt compiler, that would do things. I may take a shot at it.

@Kwpolska
Copy link
Member

For #1923, perhaps? (feel free to take it over, I didn’t get much stuff done for that)

@ralsina
Copy link
Member Author

ralsina commented May 20, 2017

Yes, that too. We could even use yaml metadata or whatever.

@ralsina
Copy link
Member Author

ralsina commented Jun 9, 2017

There are now metadata extractors in the reSt, markdown and ipynb compilers. I say, let's close.

@ralsina ralsina closed this as completed Jun 9, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants