ShadowCats [beta]

Discuss and share scripts and script files...
bdeshi
Posts: 4249
Joined: 12 Mar 2014 17:27
Location: Asteroid B-612 / Dhaka
Contact:

ShadowCats [beta]

Post by bdeshi »

BETA | WIP

ShadowCats: Shadow Catalogs
Catalog folders and browse them even when the source is unavailable.

A xy-native effort of creating zero-byte (or actual-size) catalogs of active or inactive locations.
file time, attribs, and sizes can be recorded. (NTFS folder compression tech is utilized to minimize storage-eating.)
Inspired by http://www.xyplorer.com/xyfc/viewtopic.php?f=5&t=8107, necessitated by http://www.xyplorer.com/xyfc/viewtopic.php?f=5&t=13656


This is in beta stage; still a long way to go for perfection. (Doesn't even have a cool icon yet!)
I just wanted to put this out [t]here before it disappears, forgotten, into the darkness of <xyscripts>\closet (I really have that!) because the name sounded really too cool to be postponed! (Also to Test and Suggest!)

ATM, it creates a full-fledged folder hierarchy. There's a possibility to make this similar to paperfolders, ie ShadowCats are stored as plaintext and items generated at "showtime". But this tends to cause slowdowns in opening, although there are alleyways to go around this (cache folders once created for a time or until shadowcat text file is updated).
Would this be a better choice of storage?

MenuItems:
* Create ShadowCat: create a shadowcat of a picked location, current path selected by default
* Open ShadowCats: open one or more saved ShadowCats in special tabs
* Kill Shadowcats: delete one or more saved ShadowCats
* Convert to ShadowCat: Create a ShadowCat from current path. Like "Toggle paper folder", but for ShadowCats
* Open this ShadowCat: open selected ShadowCat in a special shadowcat tab (indicated by icon and sc: prefix, and homezonelocked) .
* Configure: right now this opens the ini file with a popup description (yeah, lazy)

Any bugs? Anything broken? Anything missing? Any suggestions?

ShadowCat.xys
v1.2b1
(20.37 KiB) Downloaded 199 times
[/size]changelog:

Code: Select all

v1.2b1
*  changed name, ShadowCats --to-> ShadowCat, config to shadowcat.ini, default path to <xydata>\shadowcat
!  fix syntax errors
+  menu item: convert current item to shadowcat
+  menu item: open selected shadowcats
~  still beta, still work in progress.
v1.1
!  folder mod.date may not be retained when children-items are created later
v1
init
[/size]
ShadowCats.xys
v1.1
(18.83 KiB) Downloaded 208 times
ShadowCats.xys
v1
(18.38 KiB) Downloaded 188 times
[/size]


TODO:
* test
* fix: folder mod.date may not be retained when children-items are created later
* icon(s) . Anybody have nice icons for me?
* alternative plaintext storage
* metadata for shadowcats
* cleanup
* publish
Icon Names | Onyx | Undocumented Commands | xypcre
[ this user is asleep ]

Stef123

Re: ShadowCats [beta]

Post by Stef123 »

Don't know yet how I might use it, but something about it seems promising.

Using the current path does not work, it always brings up a dialog to make me pick one.
I wonder, could it be made to optionally get the folder structure only? Without the files?

bdeshi
Posts: 4249
Joined: 12 Mar 2014 17:27
Location: Asteroid B-612 / Dhaka
Contact:

Re: ShadowCats [beta]

Post by bdeshi »

:tup:
Stef123 wrote:Using the current path does not work, it always brings up a dialog to make me pick one.
Using "Create ShadowCat" ? isn't the current path is selected in the folder picker?
Stef123 wrote:I wonder, could it be made to optionally get the folder structure only? Without the files?
Copy a folder then Edit > Paste Special > Paste folder structure. :ugeek:

[split to http://www.xyplorer.com/xyfc/viewtopic.php?f=7&t=13749 ]
Icon Names | Onyx | Undocumented Commands | xypcre
[ this user is asleep ]

bdeshi
Posts: 4249
Joined: 12 Mar 2014 17:27
Location: Asteroid B-612 / Dhaka
Contact:

Re: ShadowCats [beta]

Post by bdeshi »

update. Fixed this: * fix: folder mod.date may not be retained when children-items are created later
Icon Names | Onyx | Undocumented Commands | xypcre
[ this user is asleep ]

Stef123

Re: ShadowCats [beta]

Post by Stef123 »

Thanks. Not using mod date, but good to know I could rely on it, should I wish to do so.

karimmaster101
Posts: 158
Joined: 20 May 2011 14:34

Re: ShadowCats [beta]

Post by karimmaster101 »

I got this error message

Code: Select all

TimeStamp failed.
timestamp
cma
----A-------
C:\Myxyplorercatalog\My Files_2017-10-12----A-------
Any solution?

highend
Posts: 13274
Joined: 06 Feb 2011 00:33

Re: ShadowCats [beta]

Post by highend »

Replace:

Code: Select all

  $tpl = '{Fullname}'    . '|' . '{Dir d|f|d}'                . '|' . 
          ($saveattr == 1) ?      ('{Attr}')          : ('')  . '|' . 
          ($savesize == 1) ? ('{Dir -|{Size RAW}|-}') : ('')  . '|'   ;
with:

Code: Select all

$tpl = '{Fullname}|{Dir d|f|d}|' . (($saveattr == 1) ? '{Attr}' : '') . '|' . (($savesize == 1) ? '{Dir -|{Size RAW}|-}' : '') . '|';
One of my scripts helped you out? Please donate via Paypal

karimmaster101
Posts: 158
Joined: 20 May 2011 14:34

Re: ShadowCats [beta]

Post by karimmaster101 »

Many thanks! it worked :tup:

bdeshi
Posts: 4249
Joined: 12 Mar 2014 17:27
Location: Asteroid B-612 / Dhaka
Contact:

Re: ShadowCats [beta]

Post by bdeshi »

I have a newer version on my drive, which among misc changes includes those fixed ternary `() ? :` expressions. Uploaded as 1.2b1. Still beta, still a work-in-progress.
Icon Names | Onyx | Undocumented Commands | xypcre
[ this user is asleep ]

chumbo
Posts: 243
Joined: 04 Jan 2015 15:20

Re: ShadowCats [beta]

Post by chumbo »

Hi,
I tried the script but regardless what's selected (folders or files), I keep getting this error:

Image

jupe
Posts: 2757
Joined: 20 Oct 2017 21:14
Location: Win10 22H2 120dpi

Re: ShadowCats [beta]

Post by jupe »

I don't think you are running the script properly. Do you see a menu exactly like this pop up including the icons?
sc.png
sc.png (5.51 KiB) Viewed 4276 times
If you don't, go to the folder that you download the ShadowCats.xys to, select it, and then

Scripting | Load Selected Script File

then once you click on Create ShadowCat it will popup a dialog to pick the location you want to create a ShadowCat for.

chumbo
Posts: 243
Joined: 04 Jan 2015 15:20

Re: ShadowCats [beta]

Post by chumbo »

Nope, not like that. There is a very good chance I'm not running it properly because I'm a real beginner in these matters.
I had actually started a thread in the 'Wishes' section and was redirected here by highend: viewtopic.php?f=5&t=18488&p=156199#p156199

I had started by downloading the ShadowCat.xys v1.2b1 then from the Scripting menu did 'Load Script FIle...' but that did nothing at all?

Then highend posted a code you can see in the thread I linked to, and that got me this menu:

Image

Then I selected a folder in open tab and run 1st command in the menu 'Create ShadowCat:....." and that's how I got the error I posted.

chumbo
Posts: 243
Joined: 04 Jan 2015 15:20

Re: ShadowCats [beta]

Post by chumbo »

Well, now it works! :biggrin:
I don't what I did different this time but it's running as we speak!! Thanks :-)

Turion
Posts: 30
Joined: 01 Jun 2012 20:46

Re: ShadowCats [beta]

Post by Turion »

Just wanted to say thanks to SammaySarkar for this script and to chumbo for posting his wish which led me to it.
Looks great on my toolbar. :appl:
toolbar.png
toolbar.png (11.64 KiB) Viewed 4249 times

bdeshi
Posts: 4249
Joined: 12 Mar 2014 17:27
Location: Asteroid B-612 / Dhaka
Contact:

Re: ShadowCats [beta]

Post by bdeshi »

:tup: Nice!

Let me know of any bugs/problems/issues.

@chumbo Sorry I couldn't help earlier.
Icon Names | Onyx | Undocumented Commands | xypcre
[ this user is asleep ]

Post Reply