Page 1 of 1

Requested: Ideas for new scripts

Posted: 10 Dec 2012 16:33
by highend
Hi,

I'm a bit bored atm...

Is there anything that fit's into the general XYplorer style of functions but isn't implemented yet (but can be done through scripting)?

I'm looking for something that could be fun to create.

Wishes / expectations?

Re: Requested: Ideas for new scripts

Posted: 10 Dec 2012 16:46
by SkyFrontier
http://www.xyplorer.com/xyfc/viewtopic.php?f=7&t=5528
Script Request - Remissive Index Builder - Report Tool

Re: Requested: Ideas for new scripts

Posted: 10 Dec 2012 16:48
by Marco
Uh, this very morning I was thinking "XYplorer should be the thing that will help me with a particular task, but I don't have time to code..." :mrgreen:

I'd like to "verify" a backup I perform with another utility. I'm particularly interested in the case of the filenames and the attributes. Something that takes in input a source folder, a destination folder, and then performs recursively those checks.

Re: Requested: Ideas for new scripts

Posted: 15 Dec 2012 11:02
by Slavaon
highend wrote: Is there anything that fit's into the general XYplorer style of functions but isn't implemented yet (but can be done through scripting)?
I'm looking for something that could be fun to create.
Perhaps it will be useful and interesting. Archive with thumbnails and descriptions.
Convenient to keep old files in the archives, but there is a drawback to this method - poor visual perception and search for the content.
I suggest to make our archives which were more convenient for work, search and indexation.
Most often, information is sought in two ways - to browse the directory (on the cover and title), or any local search.
In this way, each file should / want / must provide a description - pictures, and text.
Well suited for this standard image files - jpg. It is possible to introduce a comment - the necessary textual information.
The concept:
a) Combine image files .Jpg to .Rar archives
b) In the files .Jpg add the necessary information.
1. Archiving your files
Better to use WinRar. Then a bit of advertising the application :). In the subsequent work with archives WinRar tracks changes to files and offers to add them to an existing archive. Though other programs have a similar function.
2. Attach a picture illustrating the contents of the archive command (Save as .bat file):

Code: Select all

@echo off
if /I %~x1==%~x2 exit
if /I %~x1 NEQ .jpg (if /I %~x2 NEQ .jpg exit)
if /I %~x1 NEQ .rar (if /I %~x2 NEQ .rar exit)
if /I %~x1==.jpg (
copy /b %1+ %2 "%~d1%~p1%~n1 rarjpg.jpg"
) else (
copy /b %2+%1 "%~d2%~p2%~n2 rarjpg.jpg")
At the end of the name to add the word rarjpg to use color labels(name:*rarjpg*) to distinguish files from simple images, and to open such a file in Portable File Associations™ (*rarjpg.jpg>C:\Program Files\...)
3. Add a description, which will be available for indexing by search engines, and file info tips.
You can use IrfanView: Image\information\IPTC info\Caption...
Obtain the file, which can be edited with an illustration and description.
Example image, save and open in WinRar or 7z: http://www.mediafire.com/view/?0l0qg8ghb9w8012
All this can be done by hand, but it is better to automate. If you are interested and have the opportunity to write a script.
P.S. My English is not very good, but I hope to have written clearly.

Re: Requested: Ideas for new scripts

Posted: 17 Dec 2012 19:27
by kunkel321
How about a script that will search my computer for commonly-used file types and their corresponding applications, then smartly make Portable File Associations for my "Open With" toolbar button....
(I don't even know if this is possible.)
:biggrin:

Re: Requested: Ideas for new scripts

Posted: 19 Jan 2013 20:12
by admin
Another idea: Scan a branch for descript.ion files and import them into XY's tag.dat.

Re: Requested: Ideas for new scripts

Posted: 19 Jan 2013 20:22
by Marco
admin wrote:Another idea: Scan a branch for descript.ion files and import them into XY's tag.dat.
What do such files contain? How are they structured?

Re: Requested: Ideas for new scripts

Posted: 19 Jan 2013 20:27
by admin
Marco wrote:
admin wrote:Another idea: Scan a branch for descript.ion files and import them into XY's tag.dat.
What do such files contain? How are they structured?
Well, this is part of the task. :P Honestly, I don't know! (I know that TC uses them as comment database)

Re: Requested: Ideas for new scripts

Posted: 19 Jan 2013 20:41
by admin

Re: Requested: Ideas for new scripts

Posted: 23 Jan 2013 09:28
by highend
My PM ist stuck in the outbox folder...

@Don

Can you explain the format of the entries in the tag.dat file?
C:\Temp\hallo.txt|0|"Mit AnfĂĽhrungszeichen", Hallo, Neue Zeile!, Red Yellow||||
<filename with path>|<number>|<tag1>, <tag2>, <tag x>||||

What does the <number> mean, can it be different from zero? If so, in which cases?
What do the four | at the end of the line stand for, the end of a one line tag description?
Are they fixed (or can they contain anything between them)... Etc.
Anything else worth to mention (apart from the fact, that the lines and the tags are sorted
ascending)?

If I didn't misinterpret anything, the script is nearly ready.

It searches for descript.ion files in a user selectable path and converts all comments to XY tags.
Should it write them to the tag.dat file automatically or save them as a new.txt file, open it and let
the user do it?

What it doesn't do: It doesn't compare all found TC comments with already existing (file) entries
in the tag.dat file. Too time consuming if you have thousends (or more) files commented. At least
I haven't found a really good way to speed that process up enough...

Re: Requested: Ideas for new scripts

Posted: 23 Jan 2013 09:49
by admin
XY Help File:
The Database: tag.dat

All tag data are retained across sessions and stored in one file, tag.dat, located in the application data folder. The file is kept in an open, simple, and human-friendly text format (UTF-16 Text File) so that you can easily edit it manually using an editor or programmatically using any scriptable software.



File Format of the XYplorer Tag Database (version 2)

Line 1: Header and version info: XYplorer File Tags v2

Line 2: Label schemes, separated by ";". Each scheme: Name|TextColor|BackColor. Colors are in RRGGBB.

Line 3: (reserved)

Line 4: Tagged item #1: Full filename|LabelID|Tags|reserved1|reserved2|reserved3|Comment.

Line 5: Tagged item #2: ... etc. ...

In case you edit tag.dat manually...

Sort Order. The tagged item lines must be in binary ascending sort order (A < B ... < a < b ...). If you manually edit tag.dat and are unsure about the correctness of the sort order, you can have the data sorted by using "Database Clean Up..." in Configuration | Tags.

Capitalization matters. You must care for the right capitalization of the file names. Reason: For better performance, the comparisons are done by byte, not by character.
ATM I'm not sure how XY would handle dupes in tag.dat and no time to check. Can't you make an experiment to find out? :)
It searches for descript.ion files in a user selectable path and converts all comments to XY tags.
Should it write them to the tag.dat file automatically or save them as a new.txt file, open it and let
the user do it?
Hm, not sure. I'd say add them to tag.dat. Or let the user choose.

Re: Requested: Ideas for new scripts

Posted: 23 Jan 2013 10:36
by jjk
admin wrote:Another idea: Scan a branch for descript.ion files and import them into XY's tag.dat.
Support ++

It would be part of XY, not only by scripting.

Re: Requested: Ideas for new scripts

Posted: 23 Jan 2013 11:12
by highend
The thread for importing descript.ion files from Total Commander can be found here: http://www.xyplorer.com/xyfc/viewtopic.php?f=7&t=9145