JJ5-win

From John's wiki
Revision as of 07:47, 25 March 2012 by Sixsigma (talk | contribs) (→‎Notes for implementers: Adding installation notes for jj5-win and delfiles.)
Jump to navigation Jump to search

jj5-win is John's Windows scripting software. That's the software that does odds and ends on John's Windows systems. For other projects see projects.

Status

Under way. Not released yet, there's stuff TODO.

Administration

Contributors

People who have contributed to this project. Newest on top.

Upstream contributors: N/A.

Copyright

Copyright 2012, Contributors.

License

Licensed under the New BSD license.

Resources

Source code

The repository can be browsed online:

The latest stable released version of the code is available via Subversion from:

Or if you want the latest version for development purposes:

Links

N/A.

Specifications

Functional specification

Describe what the project does.

Simchar

The simchar utility helps work with ASCII characters that are similar in various ways. For instance characters that look similar, or sound similar. Also characters that aren't as common and thus people might not know a name for, such as hat '^' or tilde '~' or pipe/vertical-bar '|' or hash/pound/no '#'.

The intent of simchar is to find sets of characters that will not be confusing to users. The idea being that numbers encoded in such character sets will result in less confusion and less mistakes and therefore aid in higher productivity.

Delfiles

The idea with delfiles is that you give it a path to a directory and it will go through the entire subtree deleting any files (but not directories) that it finds. So you can clear out all the files in a subtree and leave the directory structure in-tact.

I use delfiles when I'm upgrading a Subversion working copy with a new vendor drop. For example, say I download a new release of MediaWiki. I have the web directory of the jjwiki project checked out into a working copy in C:\Inetpub\wwwroot\jjwiki\web. I run delfiles on C:\Inetpub\wwwroot\jjwiki\web and it clears out all the files from the working copy. I then copy the latest files from the MediaWiki tarball into C:\Inetpub\wwwroot\jjwiki\web and the files are restored with the latest copy. But any files that have been removed from the latest version of MediaWiki will also now be missing from the working copy. So when I checkin the working copy TortoiseSVN will figure out that the missing files are to be deleted from the repository, new files are to be added, updated files to be updated, and anything else stays the same.

Pretty handy, huh?

See notes for implementers for installation/configuration instructions.

Once delfiles is correctly installed on your system you run it by right-clicking on a directory in Windows Explorer and selecting "Delete Files..." from the context menu. However, if you don't install it, you can still run it from the command-line.

Technical specification

TODO: Describe how the project works.

Tasks

TODO

Things to do, in rough order of priority:

  • Simchar coding.
  • Functional specifications.
  • Technical specifications.

Done

Stuff that's done. Latest stuff on top.

Notes

Notes for implementers

If you are interested in incorporating this software into your project, here's what you need to know:

Firstly, feel free to ask questions if something is unclear or missing.

Installing jj5-win

On my systems I have a 'util' folder in G:\data\util. The 'util' folder is a Windows share also called 'util'. I map the 'util' folder to the U: drive with the following command:

net use u: \\bender-xp\util

Note: in this case my machine name is 'bender-xp', you would use the name of your own computer if you were following my standard. Note also that it's not important where the 'util' share is actually located, it doesn't need to be in G:\data\util as long as wherever it is it is shared as 'util'.

Now I have a U: drive. In the U: drive I create a folder called 'jj5-win'. I right-click on that folder and use TortoiseSVN to checkout the latest stable release of jj5-win from Subversion:

https://svn.jj5.net/svn/public/jjrepo/jj5-win/tags/latest

I then edit the %PATH% environment variable, by clicking through:

Start
-> Right-click My Computer
-> Properties
-> Advanced
-> Environment Variables
-> System Variables
-> Path
-> Edit

Then in the "Variable value:" textbox prepend the text:

U:\jj5-win\bin;

If you have any cmd.exe windows open you will need to close them and reopen them to get the new value of the %PATH% variable. Your path will now include the jj5-win commands.

Installing delfiles

After you have installed jj5-win you can install delfiles. When delfiles is installed it will add a context menu item called "Delete Files" to folder context menus. To install delfiles run:

U:\jj5-win\bin\delfiles\install.cmd

Be careful with this command because it can delete all your files!

Notes for developers

If you're interested in contributing to this software, here's what you need to know:

Send your patch to jj5@jj5.net along with a statement that you are willing to be listed in the contributors section of the documentation and willing to license your contribution under the license.

For security reasons write access to jjrepo is only available for John. It's basically my private repository. If you'd like to hack on projects where you do have checkin permissions on the Subversion repository, along with infrastructure for running your code, then why not head over to ProgClub and register?