-
Notifications
You must be signed in to change notification settings - Fork 0
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
Build 'seguid' script from multiple *.tcl scripts #7
Comments
@mwdavis2, my train of thought here is that you should be able to use this implementation in your ApE tool via either:
or by injecting the content of |
Based on the discussions on incorporating external code into
and then create a simple build script that bundles them together into a single #! /usr/bin/env bash
cat sha1.tcl base64.tcl seguid.tcl seguid-cli.tcl > seguid That would basically do what has already been done manually in the editor. |
I have made this move in commit 862677d. Here is the gist: We now have four source files; $ ls -1 src/*.tcl
src/base64.tcl
src/seguid-cli.tcl
src/seguid.tcl
src/sha1.tcl The $ head src/seguid-cli.tcl
#!/bin/sh
# the next line restarts using tclsh \
exec tclsh "$0" "$@"
set script_path [file dirname [info script]]
source [file join $script_path base64.tcl]
source [file join $script_path sha1.tcl]
source [file join $script_path seguid.tcl]
... which means we can call it as: $ tclsh src/seguid-cli.tcl <<< "ACGT"
seguid=IQiZThf2zKn/I1KtqStlEdsHYDQ Next, calling #!/bin/sh
# the next line restarts using tclsh \
exec tclsh "$0" "$@"
## DON'T EDIT: The source of this part is src/base64.tcl
##############
## base64 encoding from base64 package
##############
namespace eval base64 {
variable base64 {}
... Thus, from now on we should not edit the |
@mwdavis2 , I see you've been working on several things today. Thanks for that. Please note that after making |
ok,
thanks.
I wasn't sure how your new system worked.
I can just edit the src version and leave the ./seguid alone.
Does it need to be reset?
…On Mon, Apr 29, 2024 at 4:55 PM Henrik Bengtsson ***@***.***> wrote:
@mwdavis2 <https://github.com/mwdavis2> , I see you've been working on
several things today. Thanks for that. Please note that after make
src/*.tcl from which ./seguid is automatically built, it's import to not
manually edit ./seguid. If you're available now, I'm happy to
explain/discuss this workflow on a Zoom/GoogleMeet call. Let me know, I'll
email you details.
—
Reply to this email directly, view it on GitHub
<#7 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABKEEE3HWUAUDWBLESCU5D3Y73FWFAVCNFSM6AAAAABFN336QKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAOBTHAZDGMZUHE>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
--
Wayne Davis
School of Biological Sciences
HHMI, University of Utah
257 South 1400 East
Salt Lake City, UT 84112-0840
(801) 585-3692
|
I've added build instructions to the README, cf. https://github.com/seguid/seguid-tcl#readme |
In order to use this Tcl code in another script, it should be possible to do something like:
source seguid.tcl
such that one can do, for instance,
If attempted to do that right now, with the existing
seguid
script, it "hangs", because it expects input as it was called from the command line. One approach is to split up the existing code intoseguid.tcl
: defines the Tcl procedures (the SEGUID API)seguid
: the CLI interface (which usessource seguid.tcl
internally)Alternatively, it might be possible to modify the existing
seguid
script to detect whether it issource
:ed or called from the command line.The text was updated successfully, but these errors were encountered: