Commit Graph

107 Commits

Author SHA1 Message Date
garret 409c0905e2 add comment selection macro
made for olivo in gjm #tooling
2023-03-16 16:10:41 +00:00
garret a81f2d8b93 dupe and comment: add changelog for depctrl feed
this will get extracted and inserted into the feed by depctrl-feedmaker
2023-02-16 11:05:14 +00:00
garret 330a502dcb update licence year 2023-02-16 02:56:42 +00:00
garret 6a8427c7c2 dupe and comment: make undo handle comment status the same as do
it no longer cares whether the edit is a comment or not.
it now sets the original to whatever the edit was.

better for doing stuff with comments etc
2023-02-16 02:56:42 +00:00
garret e96933c17a dupe and comment: handle fold boundaries 2023-02-16 02:55:04 +00:00
garret 0c146cd430 dupe and comment: make variable names more informative 2023-02-16 02:55:04 +00:00
garret 3159a91f20 dupe and comment: don't do sel/act stuff if only one line 2023-01-29 23:46:49 +00:00
garret 78033c041f em-dash: add insert (at cursor) function 2023-01-26 00:35:20 +00:00
garret 8451de1b2e em-dash: minor fixes on replace function
fix inconsistent indentation with the rest of the script, and itself
made it a local function
2023-01-21 02:35:04 +00:00
garret 2a6b5d3685 dupe&comment: new way of fixing sel/act that i understand even less
though apparently it's a bit faster

Co-Authored-By: Akatsumekusa <Akatsumekusa@protonmail.com>
2023-01-17 22:50:58 +00:00
garret 016ef8486d Merge sel/act fixes from Akatsumekusa
Closes #5
2023-01-15 13:41:40 +00:00
garret e816a3888b dupe and comment: chore: bump version 2023-01-15 13:41:20 +00:00
garret 5459e401b3 dupe and comment: add notes about what's going on in undo function
not as thorough as `do` because most of `undo` is pretty clear
on its own, and all of the "magic" bits have been explained in `do`.
The only difference is that here it's the other way round.
2023-01-15 13:26:14 +00:00
garret 96bd8086c7 dupe and comment: format and comment new "do" implementation
i find it easier to read when the different parts are separated,
and while i have done one-line `if this then do that end`s before,
i've only ever done it for short operations where it's immediately
obvious what's going on and you don't need to do any thinking whatsoever.

e.g. this function from depctrl config:
        local function get_log_level(num)
                if num == 0 then return "0: Fatal"
                elseif num == 1 then return "1: Error"
                elseif num == 2 then return "2: Warning"
                elseif num == 3 then return "3: Hint"
                elseif num == 4 then return "4: Debug"
                elseif num == 5 then return "5: Trace" end
                return nil
        end
I don't think the bits that fix sel and act count, at least not without comments.

speaking of comments, i've added some.
i hope i've understood what's going on correctly, please feel free to correct me if not.
2023-01-15 13:26:14 +00:00
Akatsumekusa b2f27bd080 dupe and comment: fix sel and act
selected lines and active line will
now be properly set after do and undo

removed aegisub.util from requiredModules
2023-01-15 13:26:09 +00:00
garret 12fe89b0b9 shenanigan script: dont crash with non-script effects
oops
2023-01-13 01:31:51 +00:00
garret 51e77db2f3 shenanigan script 2023-01-13 01:06:00 +00:00
garret 5d3c4f0e6c dupe and comment: fix out of range error in undo 2022-12-24 16:00:13 +00:00
garret 6a42bab668 update .gitignore
i don't have html any more
nor do i use that directory
i do have ass files at the moment though
2022-12-22 23:53:01 +00:00
garret ff4d6f2902 A-B: escape magic characters in the indicator 2022-12-22 19:06:42 +00:00
garret e8e7dc9909 A-B: add revert function
to get the script back to how it was, but with any changes you've made
2022-12-22 19:04:27 +00:00
garret aeb5c6182f A-B: clean up code
local functions
split a thing off into a function
sane function name

hmm lot of functions this time

also local variables and addressing luacheck warnings
2022-12-22 19:04:15 +00:00
garret dcdbacb94e A-B: make it so inline tags are applied to the indicator 2022-12-22 19:04:13 +00:00
garret b7f76f4caf depctrl global config: use OR helper function i forgor 💀 about
>write function specifically to help do a thing
>time passes
>have to do the thing again
>dont use function i wrote
genius
2022-12-21 07:30:40 +00:00
garret 6a91197b54 restyler: do not be stupid 2022-12-21 07:03:50 +00:00
garret b3397f9ad9 em-dash: make trailing -s into em-dashes 2022-12-21 07:03:50 +00:00
garret 771a31da35 depctrl global config: use depctrl's config handler
better than finding a file that's probably the config, parsing the json, and writing it back in,
for obvious reasons

turns out no i wasnt thinning out the soup too much
twas just right

Reason for adding values one by one in key-pair loop instead of just config = new_config:

> [01:31] arch1t3cht: oh, I think you can't assign entire tables to DependencyControl.config.c
> [01:31] arch1t3cht: like, you can't do DependencyControl.config.c = <my new config>,
>                     you should do DependencyControl.config.myfield = <my new value> and whatnot
> [01:32] arch1t3cht: because behind the scenes it uses metatable magic to track what field changes
>                     so it can merge its own changes with ones that other scripts made in the meantime

Co-Authored-By: arch1t3cht <arch1t3cht@gmail.com>
2022-12-21 07:03:15 +00:00
garret d8a867c9ec dupe and comment: variable names that make sense 2022-12-15 12:08:27 +00:00
garret b7f820a226 correct spelling 2022-11-29 16:35:19 +00:00
garret 660557b2e5 update copyright year 2022-11-29 16:28:59 +00:00
garret 66e0d1f8a7 dupe and comment: use local functions 2022-11-24 22:57:43 +00:00
garret 2ec8caee58 depctrl global config: add extra feeds support 2022-11-24 08:21:32 +00:00
garret c3454654c5 depctrl global config: only pass config to functions instead of whole file 2022-11-24 00:19:32 +00:00
garret 2d90b8e6df depctrl global config: clean up, split into more functions 2022-11-24 00:19:27 +00:00
garret 74feac83bb depctrl global config: don't be stupid
no longer rewrites the entire config below the existing one(!)
added forgotten local variables, removed unnecessary ones
fixed a typo
2022-11-23 20:42:05 +00:00
garret 9a260cb6d2 depctrl global config: add reset button 2022-11-23 20:41:33 +00:00
garret ffcca2c076 sylsplitter: move kana regex to within main function
hm perhaps i should not have this running on every script load lol
2022-11-18 02:54:29 +00:00
garret 0e409d9fa3 a-b: add script_namespace 2022-11-06 03:33:28 +00:00
garret 6e476859c0 consistency assistant: add includes
holy recursion
also, "cleaned" up a bit
2022-10-30 13:11:05 +00:00
garret ddf9fbf70b change aegisub version in readme 2022-10-28 13:42:43 +01:00
garret b969522dc8 consistency assistant: add named captures 2022-10-28 03:35:44 +01:00
garret 165165e750 add consistency assistant 2022-10-28 03:35:44 +01:00
garret 583bb67b54 remove inverse glow example 2022-10-28 03:35:44 +01:00
garret e46d0618ac bring back em-dash.lua
apparently people actually use it
This reverts commit 7876e626d7.
2022-09-28 15:10:00 +01:00
garret 0889affeeb rewrite README 2022-08-05 14:19:10 +01:00
garret c4ea5def11 append-comment: use textbox instead of edit
newlines start new comments
"type it yourself" message has been removed
local variables have been remembered this time
2022-08-05 02:57:42 +01:00
garret 509d6e9518 remove a few old, bad, and/or useless scripts
I'm sure there are better layer orderers out there.
I'm not a typesetter, so I'll never actually use mine enough that I fix the glaring issues.

I don't even remember what inverse glow was for any more
2022-08-05 02:45:25 +01:00
garret 84915e3859 update gitignore 2022-08-05 02:35:49 +01:00
garret 7876e626d7 useless script
i have discovered that i actually do have an em-dash key
2022-07-28 18:46:26 +01:00
garret 1b2340131b depctrl global config: remove debug library import
oops
2022-07-12 04:49:28 +01:00