# Xrns-php

**URL:** <https://forum.renoise.com/t/xrns-php/20035>\
**Category:** Renoise XML Fileformats & Tools\
**Created:** [August 22, 2007, 7:20pm UTC](https://forum.renoise.com/t/xrns-php/20035 "2007-08-22T19:20:25Z")\
**Posts on this page:** 20\
**Page:** 2

<div class="post-metadata">

**Author:** ![dac514](https://forum.renoise.com/user_avatar/forum.renoise.com/dac514/32/100_2.png) [@dac514](https://forum.renoise.com/u/dac514)\
**Post date:** [August 24, 2007, 3:52am UTC](https://forum.renoise.com/t/xrns-php/20035/21 "2007-08-24T03:52:42Z")

</div>

I went ahead and packaged 1.02, uploaded it to source-forge, we’re OFFICIALLY LAUNCHED:

[http://xrns-php.sourceforge.net/](http://xrns-php.sourceforge.net/)

Send in those donations to Bantai, Beatslauhter and myself people ![:)](https://files.renoise.com/forum/emoticons/default/smile.gif)

Freshmeat announcement pending approval from the moderation queue.

I packaged blindly (on OS X) and had Mushen in IRC test, if there are any problems feel free to shoot me.

---

<div class="post-metadata">

**Author:** ![dac514](https://forum.renoise.com/user_avatar/forum.renoise.com/dac514/32/100_2.png) [@dac514](https://forum.renoise.com/u/dac514)\
**Post date:** [August 24, 2007, 3:33pm UTC](https://forum.renoise.com/t/xrns-php/20035/22 "2007-08-24T15:33:11Z")

</div>

I had a look at the 1.02 package I made last night on OS X on a Windows machine.

Unfortunately, a directory named \_\_MACOSX containing meta data came along for the ride.

I don’t think it’s that big a deal but it’s kind of dirty as a release. But yeah, sorry. In the future I will leave packaging to those with Windows machines. I was just eager to get it official I guess.

For future packages, two downloads should be made available:

```auto
  
xrns-scripts-version.zip  
XRNS-SCRIPTS is for users of OS X, Linux, and any other PHP5 compatible operating system with a command prompt, users who don't want to download XRNS-SF.  
  
xrns-sf-version.zip  
XRNS-SF is the XRNS Script Frontend. Windows users who want an easy GUI and ready to use PHP5 scripting environment with all the required third party utilities are *encouraged* to download this package.  
  

```

Paste the taglines above in the Release Notes when adding the files. Also add the Changes, if any, to changes.

Make sure to put the gpl.txt in the /utils/ directory. Currently, it’s there.

If anyone wants to package 1.03, maybe change the licensing if Public Domain is not suitable, add a few more docs, then by all means. If not, I think this 1.02 is “good enough” until some actual changes happen. Although, it would be nice to have a clean release.

Freshmeat announcement:  
[http://freshmeat.net/releases/260411/](http://freshmeat.net/releases/260411/)

Webpage:  
[http://xrns-php.sourceforge.net/](http://xrns-php.sourceforge.net/)

Sourceforge page with downloads:  
[http://sourceforge.net/projects/xrns-php/](http://sourceforge.net/projects/xrns-php/)

---

<div class="post-metadata">

**Author:** ![dac514](https://forum.renoise.com/user_avatar/forum.renoise.com/dac514/32/100_2.png) [@dac514](https://forum.renoise.com/u/dac514)\
**Post date:** [August 26, 2007, 6:34pm UTC](https://forum.renoise.com/t/xrns-php/20035/23 "2007-08-26T18:34:24Z")

</div>

1.03 now available:

xrns-sf-1.03.zip  
XRNS-SF is the XRNS Script Frontend. Windows users who want an easy GUI and ready to use PHP5 scripting environment with all the required third party utilities are _encouraged_ to download this package.

xrns-scripts-1.03.zip  
XRNS-SCRIPTS is for users of OS X, Linux, and any other PHP5 compatible operating system with a command prompt, users who don’t want to download XRNS-SF.

[http://xrns-php.sourceforge.net/](http://xrns-php.sourceforge.net/)

```auto
Bugfix: xrns_randomizer always defaulted to chaos mode, fixed  
Bugfix: Tick-based effects bug fixed (1781503)  
Bugfix: scripts can now accept any output path, not just cwd  
Bugfix: xsd checking based on Renoise doc_version (1781697)  
Bugfix: removed ugly __MACOSX directories  
  

```

---

<div class="post-metadata">

**Author:** ![dac514](https://forum.renoise.com/user_avatar/forum.renoise.com/dac514/32/100_2.png) [@dac514](https://forum.renoise.com/u/dac514)\
**Post date:** [August 31, 2007, 2:18am UTC](https://forum.renoise.com/t/xrns-php/20035/24 "2007-08-31T02:18:51Z")

</div>

Who’s napodano? You butchered the CVS, please clean up your mess.

[http://xrns-php.cvs.sourceforge.net/xrns-php/](http://xrns-php.cvs.sourceforge.net/xrns-php/)

You recursively recreated the xrns-php module into a directory. ![:(](https://files.renoise.com/forum/emoticons/default/sad.gif) Or am I missing something in development procedures? Please, do not create new directories unless they are approved here first. Please, do not overwite other peoples files unless you made changes, if you don’t know what you are doing, please read some docs and practice/ask before doing a mass commit like this.

I haven’t cared about this, or even brought up the issue, but will now proceed to.

In my opinion, this is an example of why it’s a bad idea to distribute xrns-sf as a scriptless binary that pulls from CVS. CVS is for dev. If i’m working on a a script and it takes me 48 hours, I will commit every time I leave the computer, as a checkpoint, this does not guarantee the user a working script. I’m open to discussion.

I still think it’s really cool that CVS updates happen automatically like that and I applaud the idea and implementation. Right on. But if someone were to update now, it would be a mess. And I think this will happen often, as it is normal to make mistakes during development.

---

<div class="post-metadata">

**Author:** ![Beatslaughter](https://forum.renoise.com/user_avatar/forum.renoise.com/beatslaughter/32/236_2.png) [@Beatslaughter](https://forum.renoise.com/u/Beatslaughter)\
**Post date:** [August 31, 2007, 10:54am UTC](https://forum.renoise.com/t/xrns-php/20035/25 "2007-08-31T10:54:08Z")

</div>

Ok, you’ve convinced me to drop that idea, i’ll change it, so that it opens the download page of the project instead. The php and utils folder in the xrns-sf dir can be deleted btw, Bantai uploaded it already, before he had the chance to read the mail i’ve forwarded for you. The question is now… should the update still be possible and i put a warning in the docs or better remove it complete?

---

<div class="post-metadata">

**Author:** ![Beatslaughter](https://forum.renoise.com/user_avatar/forum.renoise.com/beatslaughter/32/236_2.png) [@Beatslaughter](https://forum.renoise.com/u/Beatslaughter)\
**Post date:** [August 31, 2007, 11:37am UTC](https://forum.renoise.com/t/xrns-php/20035/26 "2007-08-31T11:37:54Z")

</div>

I haven’t found an easy way to get the latest from the download page, so i guess opening the webbrowser instead and pointing to that page would be the quickest solution.

I could rename the “update\_scripts.cmd” file to “get\_cvs\_dev\_version.cmd” or similar and add a note in the docs with a warning. Or just remove it?

---

<div class="post-metadata">

**Author:** ![Beatslaughter](https://forum.renoise.com/user_avatar/forum.renoise.com/beatslaughter/32/236_2.png) [@Beatslaughter](https://forum.renoise.com/u/Beatslaughter)\
**Post date:** [August 31, 2007, 11:58am UTC](https://forum.renoise.com/t/xrns-php/20035/27 "2007-08-31T11:58:39Z")

</div>

> [@Bantai](#):
>
> Yeah, that seems more appropriate. Cool for people who want a quick-start devving scripts.
> 
> When does XRNS-SF execute the update\_scripts.cmd? On startup?
> 
> After I removed all the subdirs, XRNS-SF started with a question: “No configuration files found! Do you want to look online for scripts?”, then silently quit.

That was the only point the program executed the update automatically. The reason is probably, that you’ve removed the utils folder completely. I had the CVS util included in that folder, since it’s used by the “update\_scripts.cmd”.

---

<div class="post-metadata">

**Author:** ![taktik](https://forum.renoise.com/user_avatar/forum.renoise.com/taktik/32/3823_2.png) [@taktik](https://forum.renoise.com/u/taktik)\
**Post date:** [August 31, 2007, 1:11pm UTC](https://forum.renoise.com/t/xrns-php/20035/28 "2007-08-31T13:11:26Z")

</div>

> [@Beatslaughter](#):
>
> I could rename the “update\_scripts.cmd” file to “get\_cvs\_dev\_version.cmd” or similar and add a note in the docs with a warning. Or just remove it?

Shouldn’t update\_scripts.cmd simply check/update out a “stable”, “distribution” however called branch?

---

<div class="post-metadata">

**Author:** ![Beatslaughter](https://forum.renoise.com/user_avatar/forum.renoise.com/beatslaughter/32/236_2.png) [@Beatslaughter](https://forum.renoise.com/u/Beatslaughter)\
**Post date:** [August 31, 2007, 1:56pm UTC](https://forum.renoise.com/t/xrns-php/20035/29 "2007-08-31T13:56:31Z")

</div>

> [@taktik](#):
>
> Shouldn’t update\_scripts.cmd simply check/update out a “stable”, “distribution” however called branch?

That was kinda the idea i had including any binary files, but it’s not allowed to host these at the CVS server it seems. Maybe we could add a stable dir and place all working scripts in there. Sounds like a nice idea.

Anyway, i’ve updated my frontend already to version 1.03, which redirects to the SourceForge download page now.

---

<div class="post-metadata">

**Author:** ![dac514](https://forum.renoise.com/user_avatar/forum.renoise.com/dac514/32/100_2.png) [@dac514](https://forum.renoise.com/u/dac514)\
**Post date:** [August 31, 2007, 2:54pm UTC](https://forum.renoise.com/t/xrns-php/20035/30 "2007-08-31T14:54:50Z")

</div>

Technically, you can delete files and dirs, but it requires access to the CVS path and the risky usage of the rm command.

We can’t do it on Sourceforge due to permissions. However:

[http://sourceforge.net/docs/E04/](http://sourceforge.net/docs/E04/)

> [@](#):
>
> 16  
> Repository Upkeep and Management
> 
> File and Directory Deletion: CVS provides no mechanism to fully delete a file or directory from the CVS repository. If a file or directory needs to be removed, a [Support Request](http://sourceforge.net/docs/E04/#support) will need to be submitted. As interactive access is not provided, a project cannot delete or move content without intervention. A specific file revision (based on CVS revision identifiers) can be removed using the CVS admin command’s ‘-o’ option.

Can someone compile a list of unwanted files/dirs and do the honors of contacting support with a list of things we don’t want?

Thanks.

---

<div class="post-metadata">

**Author:** ![Beatslaughter](https://forum.renoise.com/user_avatar/forum.renoise.com/beatslaughter/32/236_2.png) [@Beatslaughter](https://forum.renoise.com/u/Beatslaughter)\
**Post date:** [August 31, 2007, 3:22pm UTC](https://forum.renoise.com/t/xrns-php/20035/31 "2007-08-31T15:22:28Z")

</div>

For the xrns-sf module the following isn’t needed:

xrns-sf/php/\* (empty currently, but has dead files in it)  
xrns-sf/utils/\* (empty currently, but has dead files in it)  
xrns-sf/update\_scripts.cmd  
xrns-sf/xrns-sf.exe

I’ve sent Bantai the updated files for 1.03, as i’m not going to mess around with CVS currently.

---

<div class="post-metadata">

**Author:** ![It-Alien](https://forum.renoise.com/user_avatar/forum.renoise.com/it-alien/32/41_2.png) [@It-Alien](https://forum.renoise.com/u/It-Alien)\
**Post date:** [August 31, 2007, 8:27pm UTC](https://forum.renoise.com/t/xrns-php/20035/32 "2007-08-31T20:27:29Z")

</div>

I’m sorry for having caused that mess. It was due to an inaccurate command line CVS action performed by me under Linux.

Anyway, I’m using a GUI (Cervisia) now, so this should never happen again.

---

<div class="post-metadata">

**Author:** ![dac514](https://forum.renoise.com/user_avatar/forum.renoise.com/dac514/32/100_2.png) [@dac514](https://forum.renoise.com/u/dac514)\
**Post date:** [September 2, 2007, 3:55am UTC](https://forum.renoise.com/t/xrns-php/20035/33 "2007-09-02T03:55:06Z")

</div>

The power of Freshmeat and the SourceForge INC network:

[http://www.google.com/search?q=xrns-php](http://www.google.com/search?q=xrns-php)

---

<div class="post-metadata">

**Author:** ![dac514](https://forum.renoise.com/user_avatar/forum.renoise.com/dac514/32/100_2.png) [@dac514](https://forum.renoise.com/u/dac514)\
**Post date:** [September 2, 2007, 6:42pm UTC](https://forum.renoise.com/t/xrns-php/20035/34 "2007-09-02T18:42:44Z")

</div>

I made a few changes to the ZipAllFiles() function in xrns\_functions.php

Specifying any path wasn’t working if the path was absolute. I fixed this.

In fixing this, I accidently overwrote one of my modules (but luckily, was able to save it with a xrns\_ogg.php version in the un-emptied trash ![:wacko:](https://files.renoise.com/forum/emoticons/default/wacko.gif) ). So to prevent this, zipAllFiles now dies if the file already exists.

The fix might be an inconvenience but I figure better safe than humiliated.

---

<div class="post-metadata">

**Author:** ![Marc\_Shake](https://forum.renoise.com/user_avatar/forum.renoise.com/marc_shake/32/29736_2.png) [@Marc\_Shake](https://forum.renoise.com/u/Marc_Shake)\
**Post date:** [September 3, 2007, 11:37am UTC](https://forum.renoise.com/t/xrns-php/20035/35 "2007-09-03T11:37:19Z")

</div>

I made a simple HP for that. If the “admin-panel” is up and running, I will post the URL to some guys here ![:)](https://files.renoise.com/forum/emoticons/default/smile.gif)

---

<div class="post-metadata">

**Author:** ![dac514](https://forum.renoise.com/user_avatar/forum.renoise.com/dac514/32/100_2.png) [@dac514](https://forum.renoise.com/u/dac514)\
**Post date:** [September 3, 2007, 4:02pm UTC](https://forum.renoise.com/t/xrns-php/20035/36 "2007-09-03T16:02:35Z")

</div>

I don’t think we should migrate to Subversion. CVS does the job. The only limitations we have run into is our lack of organization and experience.

I have put in [a support request](http://sourceforge.net/tracker/?func=detail&aid=1786694&group_id=1&atid=200001) to delete the problematic files.

I have created [a mailing list](http://sourceforge.net/mailarchive/forum.php?forum_name=xrns-php-cvs) which tracks all CVS changes.

---

<div class="post-metadata">

**Author:** ![dac514](https://forum.renoise.com/user_avatar/forum.renoise.com/dac514/32/100_2.png) [@dac514](https://forum.renoise.com/u/dac514)\
**Post date:** [September 8, 2007, 4:41pm UTC](https://forum.renoise.com/t/xrns-php/20035/37 "2007-09-08T16:41:20Z")

</div>

XRNS-PHP 1.04  
 [http://xrns-php.sourceforge.net/](http://xrns-php.sourceforge.net/)  
 [http://sourceforge.net/project/showfiles.php?group\_id=203983](http://sourceforge.net/project/showfiles.php?group_id=203983)

> [@](#):
>
> xrns-scripts-1.04.zip  
> XRNS-SCRIPTS is for users of OS X, Linux, and any other PHP5 compatible operating system with a command prompt. Additionally, this package is the stable compliment to XRNS-SF.
> 
> New script xrns\_searchandreplace replaces every occurance of specific note in the song to another one. RenoiseSong8.xsd checked into /schemas/. Scripts now automatically handle schema validation based on Renoise doc\_version. xrns2midi bug-fixes related to tick-based timing, volume and panning column effects. xrns\_merge bug-fix for the change between VstiProperties to PluginProperties between Renoise 1.8 and Renoise 1.9. xrns\_ogg now skips files smaller than 4096 bytes. xrns\_ogg bug-fix for filenames with dots being skipped. Etc.

> [@](#):
>
> xrns-sf-1.04.zip  
> XRNS-SF is the XRNS Script Frontend. Windows users who want an easy GUI and ready to use PHP5 scripting environment with all the required third party utilities are _encouraged_ to download this package.
> 
> XRNS-SF no longer includes scripts, instead the user is redirected to the SourceForge download page. The file “update\_scripts.cmd” was renamed to “get\_cvs\_dev\_version\_scripts.cmd” so that it’s more clear that these are works in progress. New keyword “text”, to accept any text input from the user. PHP CLI updated to version to 5.2.4.

@bantai  
chmod 664 /home/groups/x/xr/xrns-php/htdocs/xrns-sf.html  
update the file with the latest currently located the in xrns-sf CVS module

Good times!

![:w00t:](https://forum.renoise.com/uploads/default/original/3X/2/7/27db4681ae4f26372d8b752b818610bc301c087a.gif)

---

<div class="post-metadata">

**Author:** ![zuran](https://forum.renoise.com/letter_avatar/zuran/32/6_449c533f586939b6e5f246632a46421f.png) [@zuran](https://forum.renoise.com/u/zuran)\
**Post date:** [September 18, 2007, 12:44pm UTC](https://forum.renoise.com/t/xrns-php/20035/38 "2007-09-18T12:44:04Z")

</div>

As I was browsing this forum, I had to leave a note ![:)](https://files.renoise.com/forum/emoticons/default/smile.gif) Working with CVS can be hell sometimes, mostly because of permission issues. By setting a different umask you won’t have to chmod stuff before being able to update files.

file permission 777  
umask 002

Will give 777 - 002 = 775 for new files.

---

<div class="post-metadata">

**Author:** ![dac514](https://forum.renoise.com/user_avatar/forum.renoise.com/dac514/32/100_2.png) [@dac514](https://forum.renoise.com/u/dac514)\
**Post date:** [November 6, 2007, 7:01pm UTC](https://forum.renoise.com/t/xrns-php/20035/39 "2007-11-06T19:01:31Z")

</div>

Exception class works for me.

Also, as most scripts are over 60% argument verification, unziping, and zipping, it would be nice to have a xrns\_php() class that encapsulates all that stuff.

Using xrns\_ogg.php as an example, something like:

```auto
  
  
try {  
  
 $ogg = new xrns_php();  
  
 // first variable, $argv[] array position  
 // if second variable, this is a bool (true or false)  
 // if third variable, this is a forced default if second variable bool is false  
  
 $argv1 = $ogg->argv(1, $ogg->valid_extensions($ogg->argv(1), array('zip', 'xrns', 'xrni')));  
 $argv2 = $ogg->argv(2, $ogg->valid_extensions($ogg->argv(2), array('zip', 'xrns', 'xrni')));   
 $quality = $ogg->argv(3, (ctype_digit($ogg->argv(3)) && $ogg->argv(3) > 0 && $ogg->argv(3) <= 10), 3);   
  
 // Input  
 $song1 = $ogg->input($argv1);  
  
 // ----------------------------------------------------------------------------  
 // The meat/tofu of xrns_ogg  
 // ----------------------------------------------------------------------------   
  
 // SampleData directory  
 if (is_dir($song1->dir . 'SampleData/')) {  
 // Xrni or Xrns?  
 if (preg_match('/(\.xrni$)/i',$song1->filename)) {  
  
 $source = $song1->dir . 'SampleData/';  
 ogg_files($source, $quality);  
  
 }  
 else foreach(new DirectoryIterator($song1->dir . 'SampleData/') as $file) {  
  
 if ($file == '.' || $file == '..') continue; // Skip these files  
  
 $source = $song1->dir . 'SampleData/' . $file;  
 if (is_dir($source)) ogg_files($source, $quality);  
  
 }  
 }  
  
 // Output  
 $ogg->output($argv2, $song1->dir);   
  
}  
catch (Exception $e) {  
 xrns_php::complain_and_cleanup($e);  
 die();  
}  
  

```

---

<div class="post-metadata">

**Author:** ![dac514](https://forum.renoise.com/user_avatar/forum.renoise.com/dac514/32/100_2.png) [@dac514](https://forum.renoise.com/u/dac514)\
**Post date:** [November 6, 2007, 10:39pm UTC](https://forum.renoise.com/t/xrns-php/20035/40 "2007-11-06T22:39:09Z")

</div>

> [@Bantai](#):
>
> A different matter: about the XRNS-SF package. How about including the latest stable scripts?

Is everything in CVS stable?

I can package something with what’s there

Can you update the webpage?

[Previous page](https://forum.renoise.com/t/xrns-php/20035.md?page=1)

[Next page](https://forum.renoise.com/t/xrns-php/20035.md?page=3)
