Code Monkey home page Code Monkey logo

confucius's People

Contributors

dependabot[bot] avatar emopers avatar ivantrendafilov avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

confucius's Issues

InjectableConfiguration problem

Hello,

I think, there's a big problem with InjectableConfiguration class. The logic of this class is very simply

setProperty(FILE_PARAM, filePath);
setProperty(CONTEXT_PARAM, context);

but it doesn't work cause of the fact const

private final static String FILE_PATH;

is already set up when AbstractConfiguration is loaded

static {
        FILE_PATH = System.getProperty(FILE_PARAM);
...

and this cannot be changed. So this class is useless for now ๐Ÿ‘Ž

Get all Sections from Configuration File

If its a standard ini format, then the current codebase doesnt provide a way to get all sections in that configuration file (Something similar to HierarchicalINIConfiguration#getSections) . Is there a reason why this was not included.

It would be quite helpful to have something like that if we wanted to go through a list of sections and get values from each of them. I have a usecase where my section names are user-written, but each of those sections have a key that is standardized. Without getting the sections (or setting the conf.context), I wont be able to get those values right now.

I have a patch to get this in Parser.java but wasnt sure what was the best way to expose it as an API.

Thanks!

Manual download link is broken

Section of front page:

"First, you need the Confucius jar file on your classpath. Confucius is available from Maven Central, so add to your pom.xml (or manually download ..." <--- this link on front page

load configuration from InputStream

For now, Confucius cannot load configuration from jar's (just because Parser reads file, and doesn't accept e.g. InputStream)

BufferedReader br = new BufferedReader(new FileReader(filename));

It should be gr8, if I can ask Confucius for configuration from my resources

Configurable config = InjectableConfiguration(this.getClass.getResourceAsStream("my-config.cfg", "Default")

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.