d0c-s4vage / lookatme

An interactive, terminal-based markdown presenter
https://lookatme.readthedocs.io/en/latest/
MIT License
2.08k stars 61 forks source link

What do `lam` and `witnessme` provide that `lookatme` doesn't? #132

Closed johnrichardrinehart closed 2 years ago

johnrichardrinehart commented 2 years ago

This isn't really a bug or a feature request. But, I noticed that building this package on NixOS as provided by nixpkgs introduces 3 binaries which seem referenced in your setup.py but which appear redundant, there. However, it appears that these nixpkgs build outputs have different SHAs, so they're different somehow.

$ md5sum result/bin/*                                                
27e4ed6a63db72685e78134d658c8030  result/bin/lam
00061159564841356ae9f5a91fc2405a  result/bin/lookatme
a5b7324681c66ed3a427fa48dc9b2f36  result/bin/witnessme

Could you please shed some light on how they're different or why there are other outputs beyond only ./result/bin/lookatme?

reinerh commented 2 years ago

These three binaries are just python scripts, so they are easy to diff:

--- lookatme    2022-02-25 18:09:51.158030483 +0100
+++ lam 2022-02-25 18:09:51.158030483 +0100
@@ -1,5 +1,5 @@
 #!/usr/bin/python3
-# EASY-INSTALL-ENTRY-SCRIPT: 'lookatme==2.3.0','console_scripts','lookatme'
+# EASY-INSTALL-ENTRY-SCRIPT: 'lookatme==2.3.0','console_scripts','lam'
 import re
 import sys

@@ -30,4 +30,4 @@

 if __name__ == '__main__':
     sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0])
-    sys.exit(load_entry_point('lookatme==2.3.0', 'console_scripts', 'lookatme')())
+    sys.exit(load_entry_point('lookatme==2.3.0', 'console_scripts', 'lam')())
--- lookatme    2022-02-25 18:09:51.158030483 +0100
+++ witnessme   2022-02-25 18:09:51.158030483 +0100
@@ -1,5 +1,5 @@
 #!/usr/bin/python3
-# EASY-INSTALL-ENTRY-SCRIPT: 'lookatme==2.3.0','console_scripts','lookatme'
+# EASY-INSTALL-ENTRY-SCRIPT: 'lookatme==2.3.0','console_scripts','witnessme'
 import re
 import sys

@@ -30,4 +30,4 @@

 if __name__ == '__main__':
     sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0])
-    sys.exit(load_entry_point('lookatme==2.3.0', 'console_scripts', 'lookatme')())
+    sys.exit(load_entry_point('lookatme==2.3.0', 'console_scripts', 'witnessme')())

It's just the name that differs in them (the scripts are actually auto-generated during installation). I think they are provided for convenience only (lam as an abbreviation for lookatme, and witnessme as some alternative name?). In Debian I'm only including lookatme in the package, as I think the other ones are unnecessary.

johnrichardrinehart commented 2 years ago

Huh, strange. Users can alias commands through their shell if they want an abbreviated name. witnessme is strange, too. Would the maintainers accept a pull request to strip the result to only one output (lookatme)?

aniketgm commented 2 years ago

@johnrichardrinehart, it seems the creater of this tool @d0c-s4vage is a MadMax fan "witnessme" :smile:

d0c-s4vage commented 2 years ago

@aniketgm you're right! That's exactly where it came from. I thought it would be fun to name this tool after some really intense dialog from some movies.

lam is just short for "look at me"

d0c-s4vage commented 2 years ago

Huh, strange. Users can alias commands through their shell if they want an abbreviated name. witnessme is strange, too. Would the maintainers accept a pull request to strip the result to only one output (lookatme)?

@johnrichardrinehart I would be fine accepting a PR to reduce this to avoid name pollution. Thanks for asking!