GithubHelp home page GithubHelp logo

ingredients's People

Contributors

jwfoley avatar

Watchers

 avatar  avatar

ingredients's Issues

can't make inline forms

The individual_ingredient branch has a rough attempt to create adjustable inline ingredients. However, each one requires its own HTML form; I considered just making one big form for the whole thing but then the reset buttons won't work. And when the entire form is inline, it gets displayed as line breaks. I think I need to redesign all of this as a postprocessor rather than a preprocessor, so the lines are already formatted into HTML elements before I parse them, and then everything will be correctly nested - or at least instead of trying to cheat and scan for line breaks between elements, I can just look up to the parent.

ingredient parsing and table generation should be separate functions

Currently generate_ingredient_table takes an unparsed lxml.etree.Element with the ingredient text and parses that text, then returns a new Element with the appropriate table/form. Those steps could be separate functions, perhaps with the parsed ingredients stored in a better format than a list of lists (at least the inner ones ought to be tuples! maybe a namedtuple), which would also allow the higher-level Ingredients.run to intercept the parsed ingredients in order to accumulate a table of all ingredients used in all steps.

totals can't be disabled

I implemented automatic total calculation, if all the ingredients in a table have the same unit, but I was too lazy to add local or global settings to suppress that feature if undesired.

markdown doesn't work inside parsed environments

I tried using markdown.markdown() to format the text inside an ingredient name, but it didn't work because it creates HTML tags like <strong>, which is then (correctly) interpreted by lxml as a child element rather than just plain text and I haven't allowed for that. I think this also means additional HTML tags inside the <ingredients> element would break it too. I haven't tried it in the current simple implementation of the direction list but that might not break as badly since it's not using <lxml>.

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.