Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NEW FEATURE: Virtual TAGS #4 #46

Merged
merged 9 commits into from Mar 3, 2024
Merged

NEW FEATURE: Virtual TAGS #4 #46

merged 9 commits into from Mar 3, 2024

Conversation

maforget
Copy link
Owner

@maforget maforget commented Feb 22, 2024

Before testing this version. BACKUP your Config.xml & ComicDb.xml (Do a Full Backup with the Backup Manager). I suggest testing it in portable mode first.

You need to login to Github to download the link below:

A Little test version for the new Virtual Tags (or Fields feature). Set it up in the Preferences => Library (at the bottom). There are 10 available Virtual Tags. They can be used as sorting, grouping, stacking and Smart Lists. It uses the feature that sets the caption in the ComicRack.ini.

You can format numbers refer to this page on Microsoft's site. In the documentation linked you will see something like {0:000}, you basically just need to enter the 000. The rest is auto inserted, so you could technically pretty much do all the formatting that is linked.

Known Problem:

The reason I stated to backup before hand, is that if the new columns & smart lists are saved inside your Database & Settings file. If for example you create a smart list containing one of the new Virtual TAG and decide to go back to the OG version, an older release or simply an non test version without this feature it will reset your database. If you ever want to go back you don't have any smart lists that contains the Virtual Tags.

Syntax:

So the syntax is:
[ prefix { fieldName } suffix ]

For numbering:
[ prefix { fieldName:numberFormat } suffix ]

Here are some examples from the ComicRack.ini file:

Format of eComic captions
[{format} ][{series}][ - {title}][ {volume}][ #{number}][ ({year}[/{month}])]

Same as above but with numbering format
[{format} ][{series}][ - {title}][ V{volumeonly:00000}][ #{numberonly:000} [of {count}]][ ({year}[/{month}])]

Export File Naming
[{format} ][{series}][ {volume}][ #{number}][ ({year}[/{month}])]

You can embed a field inside another or even insert a reference to another Virtual Tag. Just don't reference a tag inside itself, it will crash the program. I did add a small protection so you can't save it or add it.

Copy link

github-actions bot commented Feb 22, 2024

Build Successful! You can find a link to the downloadable artifact below.

Name Link
Commit 97405ca
Logs https://github.com/maforget/ComicRackCE/actions/runs/8058133676
Download https://github.com/maforget/ComicRackCE/suites/21145040804/artifacts/1277241734

@maforget
Copy link
Owner Author

maforget commented Feb 22, 2024

Still to support:

  • Doesn't work in folders.
  • Update Tags when Adding to the Library
  • Support Undo
  • Update when clearing tags

@maforget
Copy link
Owner Author

maforget commented Feb 23, 2024

Redid system, so it is easier and less problematic. It was my earlier attempt, but wanted to cache some request to lessen performance hit. The idea was to prevent constant polling, but all the system to prevent that would be worst on performance than the alternative. And the program already uses the same system for the Caption. And It solves all the existent problems.


Pretty much everything works, except there is a noticeable lag when some field doesn't exists. It was testing with this example using this to test:

When the Number field exists:

  • [{Series}][ #{Number}] => No problem
  • [{Series}][ #{Number:00}] => No problem

When the Number field doesn't exists:

  • [{Series}][ #{Number}] => No problem
  • [{Series}][ #{Number:00}] => Slow down

My guess is that when the Number doesn't exists it check the ShadowNumberAsText, then the ProposedNumberAsText, then takes this and when it formats it, there is most probably a slower operation there. Then this is done every second. This is why I tried other avenue, but this was the easiest and most compatible. Is it really noticeable?

Should support Undo/Redo and probably other functions
The idea was to prevent constant polling, but all the system to prevent that would be worst on performance than the alternative. And the program already uses the same system for the Caption. And It solves all the existent problems.
@maforget maforget force-pushed the VirtualTags branch 2 times, most recently from c9b6996 to ec69d8d Compare February 27, 2024 01:20
@maforget maforget merged commit 9cba900 into master Mar 3, 2024
1 check passed
@maforget maforget deleted the VirtualTags branch April 3, 2024 00:40
@maforget maforget restored the VirtualTags branch April 3, 2024 00:40
@maforget maforget deleted the VirtualTags branch April 3, 2024 00:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant