Find Jobs
Hire Freelancers

Script to modify XML files

$95-100 USD

완료함
게시됨 거의 15년 전

$95-100 USD

제출할때 지불됩니다
I need a script that will take a directory containing a number of XML files, modify certain values in the XML files, and save the resulting modified XML files. A config file will specify which values in the XML file to modify. Ideally the script could run on a Mac (OS 10.4 or 10.5), since the XML files reference directories on a MacOS system. However, if this isn't convenient, I could also run the script on a different *nix account that I have shell access to. ## Deliverables The spec is below - I have sample directory structure and config files that I can send separately. PURPOSE OF THE SCRIPT Apple Motion is a 3D graphics application. When you create a 3D project in Motion, Motion saves the project as an XML file. We need to be able to take a set of these Apple Motion XML files and convert each one into 32 different formats. We create these different conversions by modifying certain values in the XML files. For any given Apple Motion XML file, it's a fairly straightforward process: Take the XML file, change a handful of values, and save it as a new file. Repeat 32 times. Then move on to the next Apple Motion XML file and start again on another set of 32. In order to do this, we are using 1) A template Apple Motion XML file, and 2) Some values specified in a config file. We take the values in the config file, plug them into the XML template file, and save the result. We repeat this 32 times for each XML file (since we are converting each XML template to 32 different formats). We have included samples of the two config files used by this script: [login to view URL], and theme.config. We also included samples of what our XML templates look like, located in the templates/ directory. HOW THE SCRIPT WORKS: STEP BY STEP 1) Look in templates/ The first template is called [login to view URL] Open it Now that we have the first template, let's create the first of the 32 conversions. 2) Look in the [login to view URL] file. The first line looks like this: dvcprohd_720p24,960,720,24,1440,1,1.333333015,0,/Applications/[login to view URL] HD [login to view URL],1.4,1.4,1.4 This line contains everything we need to know to perform our first conversion. Let's do it! 3) In our template, [login to view URL], make the following replacements: Plug "960" into <scene><sceneSettings><width> Plug "720" into <scene><sceneSettings><height> Plug "24" into <scene><sceneSettings><framerate> Plug "1440" into <scene><sceneSettings><duration> Plug "1" into <scene><sceneSettings><NTSC> Plug "1.333333015" into <scene><sceneSettings><pixelAspectRatio> Plug "0" into <scene><sceneSettings><fieldRenderingMode> Plug "/Applications/[login to view URL] HD [login to view URL]" into <scene><sceneSettings><presetPath> Next up, a tricky bit. Our last three values are all "1.4". We need to take "1.4", and plug it in so that we get this: <parameter name="Scale" id="105" flags="4176"> <foldFlags>15</foldFlags> <parameter name="X" id="1" flags="16777296" value="1.4"/> <parameter name="Y" id="2" flags="16777296" value="1.4"/> <parameter name="Z" id="3" flags="16777296" value="1.4"/> </parameter> This is found inside of <scenenode><parameter><parameter><parameter>. Note that we are only modifying the value="1.4" part here. All of the other stuff around it should be left as we found it. 4) Now name the new file [login to view URL] Where did we get this name from? "crumplepop_reflector_left_full" comes from the filename of our template, with the ".[login to view URL]" extensions removed. "dvcprohd_720p24" comes from the first value in the first line of formats.config. Finally, ".[login to view URL]" comes from the last value specified in theme.config. We concatenate all of these to create the file name. 5) We're almost done. The last step is to save our brand new file into this directory: /output/crumplepop_reflector_dvcprohd_720p24/ If this directory doesn't exist already, we need to create it. Here's how we came up with that directory name: /output/ is specified in [login to view URL] "crumplepop_reflector" is specified in [login to view URL] "dvcprohd_720p24" was the first value in the first line of formats.config. We concatenate all of these to create the directory name. The purpose of creating this directory (and others like it) is so that all of the files of the theme "crumplepop_reflector" in the format "dvcprohd_720p24" will be stored in the same place. Success! We've created our first conversion. 6) Now we go to line 2 of [login to view URL], and start again to create our second conversion. When we are done, we will have created 32 different conversions of the template file crumplepop_reflector_left_full.HD.motn. 7) When those 32 are complete, we take another looks in the templates/ directory. Is there another template file for us to convert? If there is, we begin all over again, creating another 32 conversions of that one. And so on, until we have performed conversions on all of the templates in the templates/directory. Put another way, If we have 10 templates in the templates/ directory, this will generate 320 files in the output/directory, since we are creating 32 formats of each template (10 * 32 = 320).
프로젝트 ID: 2798607

프로젝트 정보

제안서 1개
원격근무 프로젝트
활동 중 15년 전

돈을 좀 벌 생각이십니까?

프리랜서 입찰의 이점

예산 및 기간 설정
작업 결과에 대한 급여 수급
제안의 개요를 자세히 쓰세요
무료로 프로젝트에 신청하고 입찰할 수 있습니다
프로젝트를 수여된 사용자:
사용자 아바타
See private message.
$85 USD 2일에
5.0 (45 건의 리뷰)
5.1
5.1

고객에 대한 정보

국기 (UNITED STATES)
Minneapolis, United States
5.0
3
결제 수단 확인
1월 4, 2009부터 회원입니다

고객 확인

감사합니다! 무료 크레딧을 신청할 수 있는 링크를 이메일로 보내드렸습니다.
이메일을 보내는 동안 문제가 발생했습니다. 다시 시도해 주세요.
등록 사용자 전체 등록 건수(일자리)
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
미리 보기 화면을 준비 중...
위치 정보 관련 접근권이 허용되었습니다.
고객님의 로그인 세션이 만료되어, 자동으로 로그아웃 처리가 되었습니다. 다시 로그인하여 주십시오.