c#,python,parsing,yaml,yamldotnet
I am looking for a way to parse yaml file and change each string then save file without changing structure of original file. In my opinion I should not use Regex for this but some kind of yaml parser. Sample yaml input bellow: receipt: Oz-Ware Purchase Invoice date: 2007-08-06 customer:...

symfony2,twig,yaml
I am currently developping using symfony2 and using FOSUserBundle for user management. I built a menus.yml config file to separate html from menu structure. Basicaly I import menus.yml in my config.yml file and it's added to twig's global vars. Here's a look at my menus.yml (Abridged version) twig: globals: menus:...

python,yaml,jinja2,ansible
I have a specific ansible variable structure that I want to get from the vault into a yaml file on my hosts. Lets assume a structure like this: secrets: psp1: username: this password: that secret_key: 123 ... I need something like a "generic" template to output whatever "secrets" contains at...

yaml,ansible,ansible-playbook
Question: How to make Ansible YAML parsing accept this command ? Details below: This YAML: -shell: "/home/developer/eclipse/eclipse -application org.eclipse.equinox.p2.director -noSplash -repository 'http://moreunit.sourceforge.net/update-site' -installIUs org.moreunit.feature.group" is validated by: http://yaml-online-parser.appspot.com/ http://www.yamllint.com/ http://codebeautify.org/yaml-validator but ansible says: This one looks easy to fix. It seems that there is a value started with a quote,...

symfony2,yaml,symfony-2.7
I'm trying to create a folder structure like described in Different Directories per Environment: - app - config - common - config.yml - routing.yml - dev - config.yml - routing.yml This does work pretty well for all files (config.yml, parameters.yml etc.) but nor for config.yml. I get this error: The...

go,yaml
I have a hard time to unmarshal this piece of YAML in Go. The error I'm getting is cannot unmarshal !!seq into map[string][]map[string][]string. I've tried all kind of maps with no success (map[string]string ; []map[string]string and so on) import ( "gopkg.in/yaml.v1" "io/ioutil" ) type AppYAML struct { Runtime string `yaml:"runtime,omitempty"`...

java,yaml,swagger
I started working recently on swagger to generate documentation for our RESTful apis. I use the yamlbeans-1.09.jar to convert my Java DTOs to a yaml file. Everything works fine and the yaml is even validated properly on the http://www.yamllint.com/ but still while testing it with the Swagger interface, it gives...

ruby,function,yaml,file-writing
So, I have a function that creates an object specifying user data. Then, using the Ruby YAML gem and some code, I put the object to a YAML file and save it. This saves the YAML file to the location where the Ruby script was run from. How can I...

yaml,markdown,pandoc
Pandoc supports a YAML metadata block in markdown documents. This can set the title and author, etc. It can also manipulate the appearance of the PDF output by changing the font size, margin width and the frame sizes given to figures that are included. Lots of details are given here....

python,yaml,pyyaml
I have a yaml file with test(s) configuration(s) and there is an optional parameter "ignore-dup-txn" in optional section "test-options". test-name: test-type: trh_txn test-src-format: excel test-src-excel-sheet: invalid_txns test-options: ignore-dup-txn: True I read section "test-name" to "test" dict and for now I check it this way: if 'test-options' in test and 'ignore-dup-txn'...

python,yaml,pyyaml
In my yam file I am trying this with open(fname, "w") as f: yaml.safe_dump({'items':['test', 'test2']}, f, default_flow_style=False, width=50, indent=4) It prints in the below format items: - 'test' - 'test2' I want the output formatted like below items: ['test', 'test2'] How can I do that ? EDIT: This is my...

java,yaml,snakeyaml
I want to read a YAML document to a map of custom objects (instead of maps, which snakeYaml does by default). So this: 19: typeID: 2 limit: 300 20: typeID: 8 limit: 100 Would be loaded to a map which looks like this: Map<Integer, Item> where Item is: class Item...

yaml,log4j2,rollingfileappender
I'm trying to have 2 RollingRandomAccessFile in the same YAML configuration. I'm able to do it in XML but not in YAML. As a result, I want two files "application.log" and "payload.log". Here's my working XML configuration : <?xml version="1.0" encoding="UTF-8"?> <Configuration status="debug"> <Appenders> <Console name="CONSOLE" target="SYSTEM_OUT"> <PatternLayout pattern="%d{HH:mm:ss.SSS} [%t]...

ruby,for-loop,yaml,jekyll,liquid
I am looping through a Yaml object and need to append the value of 'i' to the address the proper object. <div class="chapter"> {% for i in (1..7) %} <strong class="title">{{ page.chapters.title + i }}</strong> <ul> {% for topic in page.chapters.ch + i %} <li> {{ topic }} </li> {%...

python,yaml,pyyaml
I'm trying to use a YAML config file in my Python script, one of the problems I've found is that I can't access other attributes, so I need to duplicate a lot of content. For example root_path: /root script_path: root_path + /scripts This doesn't exists of course, but is there...

yaml,jekyll
I have built my website in Jekyll. The data file is working fine when parsed elsewhere, but when I try to access a particular record using a where clause I get no result. See the project at https://github.com/ohiweb/ohiweb.github.io The troublesome page is under portfolio\betimca\index.html portfolio.yml projects: - name: "betimca" title:...

yaml,ansible
I am trying to access all the elements of a yaml object, any suggestions would be helpful: object: element1: "value1" element2: "value2" element3: "value3" The above object is defined in group_vars/all file so that it can be accessed by other tasks. - name: pass values to script debug: "msg={{ item...

doctrine2,tree,doctrine,yaml
We are currently working on implementing a nested tree using the DoctrineExtensions module. We believe we have wired everything up correctly, however when we go to flush using Doctrine, we keep getting an Exception. SyntaxErrorException in AbstractMySQLDriver.php line 90: An exception occurred while executing 'INSERT INTO ProductTree (left, right, rootProductTreeID,...

perl,yaml
If I run the below script, then the two hashes are the same, but when I look at how the yaml file looks I see this very weird format --- nicPri --- ixgbe1 --- nicPub --- ixgbe2 --- slaves --- 47: 10.10.47.47 48: 10.10.10.48 --- ipPri --- 10.10.10.46 which doesn't...

playframework,yaml,snakeyaml
Does PlayFramework have support for yaml sets? I have tried the formats specified by the snakeyaml documentation but only the first member of the set gets added to the set, the rest are ignored. Here are some examples of what I have tried. groups: - &adminGroup !!my.package.UserGroup name: admin roles:...

vim,tabs,yaml,spaces
I am writing a Python script which writes some formatted data into a YAML file. I am using tabs for formatting the text, but I want the tabs to be converted into spaces when written into the YAML file. This is because my YAML file does not take tabs as...

c++,yaml,yaml-cpp
I am trying to write a function that will write/edit a node in my .yaml file using yaml-cpp. I kind of got it working as my code will edit the local copy. When I print out _baseNode it shows that the node has the value 5.4 in it. However, after...

yaml,swig-template
Is there an equivalent to Assemble's integration of YAML for Swig? Having to write {% block title %}Title Here{% endblock %} isn't as nice as: --- title: Title Here --- Any ideas on how to integrate YAML with Swig?...

ruby-on-rails,ruby,yaml
I have a sample yaml file(abc.yaml) like this: entity1: condition: "created_at >= #{Date.today - 3.months}" I want to read this condition from YAML in Ruby as : "created_at >= 2015-03-02" But when I do YAML.load_file('abc.yaml')["entity1"]["condition"] I get: "created_at >= \#{Date.today - 3.months}" Please let me know how to work around...

symfony2,yaml
How can I split my security.yml into multiple files? I know about the imports statement, but I need to import the role_hierarchy. For example security: encoders: FOS\UserBundle\Model\UserInterface: sha512 role_hierarchy: ROLE_USER: //IMPORT FROM USER.YML ROLE_SELLER: //IMPORT FROM ANOTHER SELLER.YML ROLE_ADMIN: //IMPORT FROM ADMIN.YML ROLE_SUPER_ADMIN: [ROLE_ADMIN, ROLE_ALLOWED_TO_SWITCH] I need this because I...

json,database,yaml,ini,gdbm
I am studying about file based key-value databases such as GDBM and I can not see any real advantage versus using a configuration file. Both technologies let you store in a file keys and values. Is it the advantage of GDBM the performance, does GDBM parse the file faster?...

ruby-on-rails,activerecord,internationalization,yaml,rails-activerecord
I have the following yaml in one of my translation files: se: activerecord: attributes: user: name: "Namn" town: "Stad" admin: name: "Namn" level: "Nivå" pet: name: "Namn" company: name: "Namn" food: name: "Namn" Is there a way for me to DRY this up and share the translation of name across...

ruby,yaml,jekyll,liquid
Im using Jekyll and liquid syntax and would like to add a custom background colour and thumbnail image for each of my projects on my homepage. How can I achieve this using YAML frontmatter? liquid syntax outputting projects {% for post in site.categories['project'] %} <div class="project"> <h3 class="project__title">{{ post.title }}</h3>...

perl,oracle,yaml
I am building a script that will install database software. Depending on the release I will need to be able to connect to one or more databases and I will need passwords for different users. Hence when we build the patch we can specify in one file what the customer...

python,networking,yaml,ansible,ansible-playbook
I am trying to create an Ansible configuration that will run a playbook and utilize a single variable file to create a single configuration with multiple items. I am trying the following syntax and it is failing. How can I fix this? vars/main.yml --- or1host1: - interface: 1/1 description: or1-servertest...

python,yaml,pyyaml
I'm trying to get a multi-line comment to use variables in PyYAML but not sure if this is even possible. So, in YAML, you can assign a variable like: current_host: &hostname myhost But it doesn't seem to expand in the following: test: | Hello, this is my string which is...

selenium,webdriver,yaml,codeception
I am having some issues running Codeception with Selenium on Windows 8 at my new job. I get this error: [Codeception\Exception\Configuration] Webdriver could not be found and loaded. I started the Selenium server manually like I described last time in this post: Web Driver Curl Exception Anyone have any ideas...

yaml,yaml-cpp
I am getting started with yaml-cpp, and I am having troubles decoding one part of my file. The file that I want to decode looks like this: leds: - [251, 252,253] - [254, 250,220] - [230, 231,230] this is how I have been trying to implement but so far is...

google-app-engine,mapreduce,yaml
Ive been trying to launch a specific mapreduce straight from the /mapreduce dashboard, but for that I need input reader parameters passed in as a dictionary or I get BadReaderParamsError: Input reader parameters should be a dictionary The problem is yaml validation won't let me add any kind of nested...

ruby,yaml
I am trying to load a list of words from a YAML file. In the file there is an entry - on Ruby is loading this as "true", instead of "on". Similarly "off" is loaded as "false". A quick check on the Psych code shows "yes" and "no" are treated...

ruby,file,yaml
I'm trying to save a few variables in a YAML config file. Cool!! However, when I try and save them, I get an error in RUBY: undefined method `[]=' for false:FalseClass (NoMethodError) My function should (In my head at least) be: Does the config file exist, if not, just create...

date,configuration,yaml,spring-boot
I am creating a simple spring boot application, that loads a string (ISO-date) from the application.yaml file and tries to put it into a @Value annotated field. If I use a .yaml file the string is obviously converted into a date/calendar and afterwards "toStringed" into a different format. If I...

python,dictionary,nested,yaml
Ok, this is probably stupid. Basically i'm trying to loop through my nested yaml-file and do stuff with for example every key-a value in my list. I have read alot and i'm able to loop through a nested dictionary without the list but I don't wan't to use unique key's...

ruby,json,yaml
I've been looking at different options for serializing/de-serializing data. One thing I noticed, that when converting a json string to a hash it uses string literals as keys. When I convert a yaml string to a hash, it uses symbols for keys. I assume this is because for json, they...

python,yaml,pyyaml
I need to parse booleans in PYYAML in a custom way and convert them into strings. For that purpose I tried to write a 'constructor' and registered it with yaml, but it didn't do anything. Booleans got parsed as normal. Is it a problem with the tag or do I...

amazon-web-services,yaml,elastic-beanstalk,amazon-elastic-beanstalk
I'm trying to predefine instance settings via config file but it just won't take it... if I create the environment it never reflects the settings. I think I might just miss something obvious but can't find a solution. I probably terminated and created the env now 30 times with different...

c++,arrays,json,yaml,yaml-cpp
I am using yaml-cpp for my configuration files parsing because I have to be able to parse yaml and json files and this is the only cpp library supporting yaml 1.2 I have found. While parsing, I do not ask for key because I do not know what component is...

yaml,markdown,multimarkdown
I'm writing my CV in MMD. I'd like to add a link to my website, twitter account etc in the mmd metadata and then reference that in the pdf, html, latex that is generated from the mmd. Here's an example mmd file. --- Name: Mark Ruddy Website: [myWebsite](http://myWebsite) Street: my...

symfony2,yaml
I'm using Symfony2. I have an url defined as a parameter in parameters.yml. I want to create a service which is a SOAP client. The argument of the SOAP client is an url for a wsdl file. In my case, the url of the wsdl file is "%parameter_url%" + "?wsdl"....

symfony2,service,configuration,yaml
Look at this documentation page, for instance. Several service names are dotted, and I wanted to know if it means we are searching an object's method or if it is nothing. Note I am talking about service names in YAML format....

ocaml,yaml
I am looking for the easiest way to using yaml with ocaml, and I am having a hard time finding a good library for doing this - since I am new to the ocaml community I would am having a hard time separating the small, not all that done, projects...

vagrant,yaml,homestead
I was editing my homestead.yaml file and I am certain the indentation is correct -- I however get this following error: Bringing machine 'default' up with 'virtualbox' provider... There are errors in the configuration of this machine. Please fix the following errors and try again: shell provisioner: * Shell provisioner...

yaml,pyyaml
Basically trying to something in yaml that could be done using this json: { models: [ { model: "a" type: "x" #bunch of properties... }, { model: "b" type: "y" #bunch of properties... } ] } So far this is what I have, it does not work because I am...

yaml,nesting
I wanted to create a config file in YAML that stores a few translations. To encapsulate everything, I began to nest the options. While parsing the file, I see the following error: Failed to read data from customize.yaml\customize.yaml: yaml: line 30: mapping values are not allow ed in this context...

php,html,symfony2,yaml
I am trying to develop a basic form in Symfony2 and to get the handleRequests to work. However I am having the error undefined variable handleRequest and cannot seem to solve the problem! This is my Controller <?php namespace James\workBundle\Controller; use Symfony\Bundle\FrameworkBundle\Controller\Controller; use James\workBundle\Entity\Task; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Response; class DefaultController...

regex,awk,sed,yaml
I would like to wrap all of my YAML data (in a large file) with single quotes. I tried sed, but it did not work: sed "s/\(.*: \)\(.*\)/\1'\2'/" <data.yml >datanew.yml This took lines like this: location_id: 25 street: text: This is text: it contains colons And produced lines like: '...

c#,amazon-web-services,configuration,yaml,elastic-beanstalk
I have a C# Web API Elastic Beanstalk app which needs a folder outside the deployment directory that the IUSER and IIS_USERS users can write to. I've created a .config file and put this in the top level .ebextensions folder in my project. The contents are below: commands: 0_mkdir: command:...

mysql,sql,import,phpmyadmin,yaml
I just looked for every option in my PHPMyAdmin. But just can't find any thing that kinda works for. I got this databasefile from a company for freelance work. I said to them it will be fine i can do it. But 2 days later is still haven't found anything...

java,yaml,config,bukkit
I'm writing a bukkit plugin which should read data from a yml configuration file made by users like shown in the example below. I've searched for that before with no result, in fact I don't really know what I should search for. Example config: maps: 01: name: world displayname: Plains...

json,node.js,ssl,amazon-web-services,yaml
I'm trying to install an SSL cert for my NodeJS Beanstalk instance. Following these instructions from Amazon, I created the YAML file and plugged in my information. Every time I try to deploy I get this error: The configuration file .ebextensions/singlessl.config in application version 0.0.3 contains invalid YAML or JSON....

r,yaml,markdown,rstudio
In an R markdown document (html and presentations), is it possible to manually split the title onto multiple lines? I tried playing with pipes which produces orrendous output. --- title: 'A title I want to split on two lines' author: date: output: ioslides_presentation --- ...

git,environment-variables,yaml,appveyor
I am trying to label a repository after a successful build in AppVeyor. I have read the following resources: Environment variables appveyor.yml reference Pushing to remote Git repository from a build But I don't know how to substitute in an AppVeyor environment variable. Here is the Yaml that I am...

python,event-handling,yaml,pyyaml
I was wondering whether there is an easy way to parse a YAML document consisting of a list of items as a python generator using PyYAML. For example, given the file # foobar.yaml --- - foo: ["bar", "baz", "bah"] something_else: blah - bar: yet_another_thing I'd like to be able to...

python,yaml
My lists are very small and I can do these by hand, but I'm looking for the right way to do this programmatically. I have this as a test: import yaml a = ['item 1','item 2','item 3','item 4'] yaml.dump(a) which give me this: '[item 1, item 2, item 3, item...

escaping,yaml,ansible
How can I escape characters in Ansible's lineinfile module? Here's the line I want to insert on the server: EMAIL='[email protected]' # Server notification email address enter only 1 address But when I try the following, Ansible refuses to parse it due to YAML errors: line="EMAIL='{{ email_address }}' # Server notification...

go,yaml
This Go Yaml Interpretation Example, https://gist.github.com/suntong001/74c85d15b19ef4b14b0e, can unmarshal a simple YAML like this: foo: 1 bar: - one - two Now I want to interpretation an array of the exact same data structure, what's the correct way to do? Below is my code so far, and it is not working...

yaml,ansible,ansible-playbook
I want to pass some values into an Ansible role, but I can't find any examples in the docs that show how to pass in a variable that's a dictionary. Here is what I'd like to pass in, but my YAML syntax is off: roles: - { role: postgresql, postgresql_users:...

api,rest,post,yaml,webdav
I am writing a YAML document using swagger to design a RESTful API method for cloning a resource. I have a few options and don't know which would be best. Please can someone advise? Options: Relinquishing the responsibility of cloning the resource object to the consumer (where the consumer assigns...

python,formatting,yaml
This is a follow up question to Specifying styles for portions of a PyYAML dump: Consider following code contaning as input manually formatted YAML data. I am modifying the YAML data, but would like to keep edges on single lines in the written YAML file. import yaml st2 = yaml.load("""...

java,spring,configuration,yaml,spring-boot
I am trying to figure out whether I can load the same .yml property files in testing environment as I load in real. For example I have a test: \src\test\java\security\TokenTest.java Annotated with: @RunWith(SpringJUnit4ClassRunner.class) @SpringApplicationConfiguration(classes = Application.class) @WebAppConfiguration @DirtiesContext(classMode = DirtiesContext.ClassMode.AFTER_EACH_TEST_METHOD) @ActiveProfiles("dev") Then I have: \src\main\resources\application.yml When I run the application,...

ruby,yaml
I'm picking up ruby language and get stuck at playing with the chatterbot i have developed. Similar issue has been asked here Click here , I did what they suggested to change the rescue in order to see the full message.But it doesn't seem right, I was running basic_client.rb at...

dart,install,yaml,dart-pub
I'm building a Dart framework called Modular for backend development and this framework has a installer for convenience. At the end of the installation, I'd like to install all dependancies in the generated pubspec.yaml file. How would I do this? Thank you