“slug”的词源是什么?在网址中?

发布于 2024-10-03 07:04:08 字数 1730 浏览 4 评论 0原文

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

东京女 2024-10-10 07:04:08

“slug”一词来自报纸生产领域。

这是在制作过程中给故事起的非正式名称。当故事从节拍记者(假设这些甚至不再存在?)到编辑再到“印刷机”时,这就是它所引用的名称,例如“有你修正了‘凯特和威廉’故事中的那些错误吗?”

某些系统(例如 Django)使用 slug 作为 URL 的一部分来定位故事,例如 www.mysite.com/archives/kate-and-william。甚至 Stack Overflow 也这样做了,使用 GEB-ish(a) 自引用 https://stackoverflow.com/questions/4230846/what-is-the-etymology-of-slug /4230937#4230937,尽管你可以用 blahblah 替换 slug,但它仍然会觉得没问题。

它甚至可以追溯到更早的时期,因为剧本在每个场景的开头都有“台词”,这基本上设置了该场景的背景(地点、时间等)。它非常相似,因为它是以下内容的概要或序言。

在 Linotype 机器上,字条是由单个字母形式创建的单行金属片。通过为整行制作一个 slug,这大大改进了旧的逐字符合成。

尽管以下内容纯粹是猜测,但 slug 的早期含义是假币(必须以某种方式压制)。我可以设想将用法转换为印刷术语(因为必须使用原始字符来按下弹头),并从那里从“金属片”定义更改为“故事摘要”定义。从那里,从正确的印刷到在线世界只有很短的一步。


(a)“哥德尔·埃舍尔,巴赫”,作者:道格拉斯·霍夫施塔特 ,我(至少)认为这是最伟大的现代知识分子著作之一。您还应该看看他的另一部作品“Metamagical Themas”。

The term 'slug' comes from the world of newspaper production.

It's an informal name given to a story during the production process. As the story winds its path from the beat reporter (assuming these even exist any more?) through to editor through to the "printing presses", this is the name it is referenced by, e.g., "Have you fixed those errors in the 'kate-and-william' story?".

Some systems (such as Django) use the slug as part of the URL to locate the story, an example being www.mysite.com/archives/kate-and-william. Even Stack Overflow does this, with the GEB-ish(a) self-referential https://stackoverflow.com/questions/4230846/what-is-the-etymology-of-slug/4230937#4230937, although you can replace the slug with blahblah and it will still find it okay.

It may even date back earlier than that, since screenplays had "slug lines" at the start of each scene, which basically sets the background for that scene (where, when, and so on). It's very similar in that it's a precis or preamble of what follows.

On a Linotype machine, a slug was a single line piece of metal which was created from the individual letter forms. By making a single slug for the whole line, this greatly improved on the old character-by-character compositing.

Although the following is pure conjecture, an early meaning of slug was for a counterfeit coin (which would have to be pressed somehow). I could envisage that usage being transformed to the printing term (since the slug had to be pressed using the original characters) and from there, changing from the 'piece of metal' definition to the 'story summary' definition. From there, it's a short step from proper printing to the online world.


(a) "Godel Escher, Bach", by one Douglas Hofstadter, which I (at least) consider one of the great modern intellectual works. You should also check out his other work, "Metamagical Themas".

寄与心 2024-10-10 07:04:08

dictionary.com 上对 slug 的适当定义 我认为讲述这个故事:

  1. 任何重的粗金属。

  2. 打印

    a.小于类型高度的厚类型金属条。

    b.这样的条带包含一个类型高的数字或其他临时使用的字符。

    c.一行字体,由 Linotype 生成。

  3. 新闻

    a.也称为捕捉线。用于指示报纸或杂志文案的故事内容的短语或标题。

    b.承载此信息的字体行。

Appropriate definitions for slug at dictionary.com I think tell the story:

  1. any heavy piece of crude metal.

  2. Printing

    a. a thick strip of type metal less than type-high.

    b. such a strip containing a type-high number or other character for temporary use.

    c. a line of type in one piece, as produced by a Linotype.

  3. Journalism

    a. Also called catchline. a short phrase or title used to indicate the story content of newspaper or magazine copy.

    b. the line of type carrying this information.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文