Skip to content

Commit aa2b6b4

Browse files
committed
generate acquisition-rules
See: shlomif#60 Thanks to @fonic
1 parent 85d5582 commit aa2b6b4

File tree

4 files changed

+201
-926
lines changed

4 files changed

+201
-926
lines changed

fortune-mod/datfiles/CMakeLists.txt

+10
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,16 @@ else()
1010
endif()
1111
SET (_unrot_cookies )
1212
SET (_install_unrot_cookies )
13+
SET(cr "rules-of-acquisition")
14+
SET(crfull "${CMAKE_CURRENT_SOURCE_DIR}/${cr}")
15+
SET(SOURCE "${CMAKE_CURRENT_SOURCE_DIR}/data/rules-of-acquisition.csv")
16+
SET(script "${CMAKE_CURRENT_SOURCE_DIR}/data/rules-of-acquisition-gen.sh")
17+
ADD_CUSTOM_COMMAND(
18+
OUTPUT "${crfull}"
19+
COMMAND "sh" "${script}" "${SOURCE}" "${crfull}"
20+
DEPENDS "${script}" "${SOURCE}"
21+
VERBATIM
22+
)
1323
FOREACH(c ${COOKIES})
1424
SET(DEST "${c}.dat")
1525
SET(SOURCE "${CMAKE_CURRENT_SOURCE_DIR}/${c}")
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
#!/bin/sh
2+
3+
# -------------------------------------------------------------------------
4+
# -
5+
# Created by Fonic <https://github.com/fonic> -
6+
# Date: 12/28/21 -
7+
# -
8+
# -------------------------------------------------------------------------
9+
10+
# Configuration
11+
CSV_DELIMITER="|"
12+
TITLE_TEMPLATE="Ferengi Rule of Acquisition %s:"
13+
RULE_TEMPLATE="%s"
14+
SOURCE_TEMPLATE="-- %s"
15+
FOOTER_TEMPLATE="%%"
16+
LINE_MAXLEN=78
17+
18+
# Check command line
19+
if [ $# -ne 2 ]; then
20+
echo "Usage: ${0##*/} INFILE OUTFILE"
21+
exit 2
22+
fi
23+
infile="$1"
24+
outfile="$2"
25+
26+
# Convert CSV to DAT + wrap long lines + remove trailing whitespace
27+
while IFS="${CSV_DELIMITER}" read -r number rule source; do
28+
printf -- "${TITLE_TEMPLATE}\n" "${number}"
29+
printf -- "${RULE_TEMPLATE}\n" "${rule}"
30+
printf -- "${SOURCE_TEMPLATE}\n" "${source}"
31+
printf -- "${FOOTER_TEMPLATE}\n"
32+
done < "${infile}" | fold -sw ${LINE_MAXLEN} | sed -e 's/[[:space:]]*$//' > "${outfile}"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,159 @@
1+
#0|What the Nagus wants, we acquire.|Star Trek Online (video game)
2+
#1|Once you have their money, you never give it back.|The Nagus (DS9 episode)
3+
#2|The best deal is the one that brings the most profit.|The 34th Rule (DS9 novel)
4+
#2|Money is everything.|The Last Tree on Ferenginar: A Ferengi Fable From the Future (DS9 short story)
5+
#3|Never spend more for an acquisition than you have to.|The Maquis, Part II (DS9 episode)
6+
#4|Sedition and treason are always profitable.|Star Trek Online (video game)
7+
#5|Always exaggerate your estimates.|Cold Fusion (SCE novel)
8+
#6|Never allow family to stand in the way of opportunity.|The Nagus (DS9 episode)
9+
#7|Keep your ears open.|In the Hands of the Prophets (DS9 episode)
10+
#8|Small print leads to large risk.|The Ferengi Rules of Acquisition (DS9 reference book)
11+
#9|Opportunity plus instinct equals profit.|The Storyteller (DS9 episode)
12+
#10|Greed is eternal.|Prophet Motive (DS9 episode)
13+
#13|Anything worth doing is worth doing for money.|Legends of the Ferengi (DS9 novel)
14+
#14|Sometimes the quickest way to find profits is to let them find you.|Fortune of War (TTN novel)
15+
#15|Dead men close no deals.|Demons of Air and Darkness (DS9 novel)
16+
#16|A deal is a deal - until a better one comes along.|Melora (DS9 episode), The Ferengi Rules of Acquisition (DS9 reference book)
17+
#17|A contract is a contract is a contract - but only between Ferengi.|Body Parts (DS9 episode)
18+
#18|A Ferengi without profit is no Ferengi at all.|Heart of Stone (DS9 episode), Ferengi Love Songs (DS9 episode)
19+
#19|Satisfaction is not guaranteed.|Legends of the Ferengi (DS9 novel), The Ferengi Rules of Acquisition (DS9 reference book)
20+
#20|He who dives under the table today lives to profit tomorrow.|Ferenginar: Satisfaction is Not Guaranteed (DS9 novella)
21+
#21|Never place friendship above profit.|Rules of Acquisition (DS9 episode)
22+
#22|A wise man can hear profit in the wind.|Rules of Acquisition (DS9 episode), False Profits (VOY episode)
23+
#23|Nothing is more important than your health - except for your money.|Acquisition (ENT episode)
24+
#25|You pay for it, it’s your idea.|Ferenginar: Satisfaction is Not Guaranteed (DS9 novella)
25+
#27|There's nothing more dangerous than an honest businessman.|Legends of the Ferengi (DS9 novel)
26+
#29|What's in it for me?|Highest Score (DS9 novel)
27+
#30|Confidentiality equals profit.|The Badlands, Part IV (DS9 novel)
28+
#31|Never make fun of a Ferengi's mother - insult something he cares about instead.|The Siege (DS9 episode), Elite Force II (video game), The Ferengi Rules of Acquisition (DS9 reference book)
29+
#33|It never hurts to suck up to the boss.|Rules of Acquisition (DS9 episode)
30+
#34|War is good for business.|Destiny (DS9 episode), The 34th Rule (DS9 novel)
31+
#35|Peace is good for business.|Destiny (DS9 episode), The 34th Rule (DS9 novel)
32+
#37|The early investor reaps the most interest.|Reservoir Ferengi (DS9 novella)
33+
#39|Don't tell customers more than they need to know.|Ascendance (DS9 novel)
34+
#40|She can touch your lobes, but never your latinum.|The Ferengi Rules of Acquisition (DS9 reference book)
35+
#41|Profit is its own reward.|The Ferengi Rules of Acquisition (DS9 reference book)
36+
#43|Feed your greed, but not enough to choke it.|The Buried Age (TNG novel)
37+
#44|Never confuse wisdom with luck.|The Ferengi Rules of Acquisition (DS9 reference book)
38+
#45|Expand or die.|Acquisition (ENT episode)
39+
#47|Don't trust a man wearing a better suit than your own.|Rivals (DS9 episode)
40+
#48|The bigger the smile, the sharper the knife.|Rules of Acquisition (DS9 episode)
41+
#52|Never ask when you can take.|The Ferengi Rules of Acquisition (DS9 reference book)
42+
#53|Never trust anybody taller than you.|Mission Gamma: Twilight (DS9 novel)
43+
#54|Rate divided by time equals profit (also known as "The Velocity of Wealth").|Typhon Pact: Raise the Dawn (DS9/TNG novel)
44+
#55|Take joy from profit, and profit from joy.|Worlds of Deep Space Nine: Bajor: Fragments and Omens (DS9 novel)
45+
#57|Good customers are as rare as latinum - treasure them.|Armageddon Game (DS9 episode)
46+
#58|There is no substitute for success.|The Ferengi Rules of Acquisition (DS9 reference book)
47+
#59|Free advice is seldom cheap.|Rules of Acquisition (DS9 episode)
48+
#60|Keep your lies consistent.|The Ferengi Rules of Acquisition (DS9 reference book)
49+
#62|The riskier the road, the greater the profit.|Rules of Acquisition (DS9 episode), Little Green Men (DS9 episode), Business As Usual (DS9 episode)
50+
#63|Work is the best therapy - at least for your employees.|Over a Torrent Sea (TTN novel)
51+
#65|Win or lose, there's always Hupyrian beetle snuff.|The Ferengi Rules of Acquisition (DS9 reference book)
52+
#66|Someone's always got bigger ears.|The Last Generation #3: What Happens Now (TNG comic)
53+
#68|Risk doesn't always equal reward.|Star Trek Online (video game)
54+
#69|Ferengi are not responsible for the stupidity of other races.|Balance of Power (TNG novel)
55+
#74|Knowledge equals profit.|Inside Man (VOY episode)
56+
#75|Home is where the heart is - but the stars are made of latinum.|Civil Defense (DS9 episode)
57+
#76|Every once in a while, declare peace. It confuses the hell out of your enemies.|The Homecoming (DS9 episode)
58+
#77|If you break it, I'll charge you for it.|Star Trek Online (video game)
59+
#79|Beware of the Vulcan greed for knowledge.|The Ferengi Rules of Acquisition (DS9 reference book)
60+
#82|The flimsier the product, the higher the price.|The Ferengi Rules of Acquisition (DS9 reference book)
61+
#85|Never let the competition know what you're thinking.|The Ferengi Rules of Acquisition (DS9 reference book)
62+
#87|Learn the customer's weaknesses, so that you can better take advantage of him.|Highest Score (DS9 novel)
63+
#88|It ain't over till it’s over.|Ferenginar: Satisfaction is Not Guaranteed (DS9 novella)
64+
#88|Vengeance will cost you everything.|The Poisoned Chalice (DS9 novel)
65+
#89|Ask not what your profits can do for you, but what you can do for your profits.|The Ferengi Rules of Acquisition (DS9 reference book)
66+
#89|[It is] better to lose some profit and live than lose all profit and die.|Strange New Worlds VI: Best Tools Available (DS9 short story)
67+
#92|There are many paths to profit.|Highest Score (DS9 novel)
68+
#94|Females and finances don't mix.|Ferengi Love Songs (DS9 episode), Profit and Lace (DS9 episode), The Ferengi Rules of Acquisition (DS9 reference book)
69+
#95|Expand or die.|False Profits (VOY episode)
70+
#97|Enough is never enough.|The Ferengi Rules of Acquisition (DS9 reference book)
71+
#98|Every man has his price.|In the Pale Moonlight (DS9 episode)
72+
#98|If you can't take it with you, don't go.|I, Q (DS9 novel)
73+
#99|Trust is the biggest liability of all.|The Ferengi Rules of Acquisition (DS9 reference book)
74+
#100|When it's good for business, tell the truth.|Ascendance (DS9 novel)
75+
#101|Profit trumps emotion.|The Long Mirage (DS9 novel)
76+
#102|Nature decays, but latinum lasts forever.|The Jem'Hadar (DS9 episode)
77+
#103|Sleep can interfere with opportunity.|Rules of Acquisition (DS9 episode)
78+
#104|Faith moves mountains - of inventory.|The Ferengi Rules of Acquisition (DS9 reference book)
79+
#106|There is no honor in poverty.|Sacraments of Fire (DS9 novel)
80+
#108|Hope doesn't keep the lights on.|The Ferengi Rules of Acquisition (DS9 reference book)
81+
#109|Dignity and an empty sack is worth the sack.|Rivals (DS9 episode)
82+
#111|Treat people in your debt like family - exploit them.|Past Tense, Part I (DS9 episode)
83+
#112|Never have sex with the boss' sister.|Playing God (DS9 episode)
84+
#113|Always have sex with the boss.|The Ferengi Rules of Acquisition (DS9 reference book)
85+
#117|You can't free a fish from water.|The Ferengi Rules of Acquisition (DS9 reference book)
86+
#121|Everything is for sale, even friendship.|The Ferengi Rules of Acquisition (DS9 reference book)
87+
#122|Never sleep with the bosses sister.|Playing God (DS9 episode)
88+
#123|Even a blind man can recognize the glow of latinum.|The Ferengi Rules of Acquisition (DS9 reference book)
89+
#125|You can't make a deal if you're dead.|The Siege of AR-558 (DS9 episode)
90+
#135|Listen to secrets, but never repeat them.|Ascendance (DS9 novel)
91+
#139|Wives serve, brothers inherit.|Necessary Evil (DS9 episode)
92+
#141|Only fools pay retail.|The Ferengi Rules of Acquisition (DS9 reference book)
93+
#144|There's nothing wrong with charity - as long as it winds up in your pocket.|The Ferengi Rules of Acquisition (DS9 reference book)
94+
#147|People love the bartender.|Fearful Symmetry (DS9 novel)
95+
#151|Even when you're a customer, sell yourself.|The Long Mirage (DS9 novel)
96+
#153|Sell the sizzle, not the steak.|Deep Space Mine (DS9 comic)
97+
#162|Even in the worst of times, someone turns a profit.|The Ferengi Rules of Acquisition (DS9 reference book), Harbinger (DS9 video game)
98+
#168|Whisper your way to success.|Treachery, Faith, and the Great River (DS9 episode)
99+
#177|Know your enemies, but do business with them always.|The Ferengi Rules of Acquisition (DS9 reference book)
100+
#181|Not even dishonesty can tarnish the shine of profit.|The Ferengi Rules of Acquisition (DS9 reference book)
101+
#183|When life hands you ungaberries, make detergent.|Hollow Men (DS9 novel)
102+
#184|A Ferengi waits to bid until his opponents have exhausted themselves.|Balance of Power (TNG novel)
103+
#188|Not even dishonesty can tarnish the shine of profit.|Star Trek Online (video game)
104+
#189|Let others keep their reputation. You keep their money.|The Ferengi Rules of Acquisition (DS9 reference book)
105+
#190|Hear all, trust nothing.|Call to Arms (DS9 episode)
106+
#192|Never cheat a Klingon - unless you're sure you can get away with it.|The Ferengi Rules of Acquisition (DS9 reference book)
107+
#193|Trouble comes in threes.|Star Trek Online (video game)
108+
#193|It's never too late to fire the staff.|Cathedral (DS9 novel)
109+
#194|It's always good business to know about new customers before they walk in your door.|Whispers (DS9 episode)
110+
#199|Location, location, location.|The Soul Key (DS9 novel)
111+
#200|A Ferengi chooses no side but his own.|Ferenginar: Satisfaction is Not Guaranteed (DS9 novella)
112+
#202|The justification for profit is profit.|The Ferengi Rules of Acquisition (DS9 reference book)
113+
#203|New customers are like razor-toothed gree worms. They can be succulent, but sometimes they bite back.|Little Green Men (DS9 episode)
114+
#208|Sometimes the only thing more dangerous than a question is an answer.|Ferengi Love Songs (DS9 episode)
115+
#211|Employees are the rungs on the ladder of success. Don't hesitate to step on them.|Bar Association (DS9 episode)
116+
#212|A good lie is easier to believe than the truth.|Shattered (VOY episode), Star Trek Online (video game)
117+
#214|Never begin a business negotiation on an empty stomach.|The Maquis, Part I (DS9 episode)
118+
#216|Never gamble with a telepath.|The Laertian Gamble (DS9 novel)
119+
#217|You can't free a fish from water.|Past Tense, Part I (DS9 episode)
120+
#218|Always know what you're buying.|The Ferengi Rules of Acquisition (DS9 reference book)
121+
#218|Sometimes what you get free costs entirely too much.|Baby on Board (DS9 comic)
122+
#219|Possession is eleven-tenths of the law.|Balance of Power (TNG novel)
123+
#223|Beware the man who doesn't take time for oo-mox.|The Ferengi Rules of Acquisition (DS9 reference book)
124+
#227|If that's what's written, then that's what's written.|Favor the Bold (DS9 episode), Star Trek Online (video game)
125+
#229|Latinum lasts longer than lust.|Ferengi Love Songs (DS9 episode)
126+
#235|Duck - death is tall.|Mission Gamma: Twilight (DS9 novel)
127+
#236|You can't buy fate.|The Ferengi Rules of Acquisition (DS9 reference book)
128+
#239|Never be afraid to mislabel a product.|Body Parts (DS9 episode)
129+
#240|Time, like latinum, is a highly limited commodity.|Bar Association (DS9 episode), Star Trek Online (video game)
130+
#242|More is good, all is better.|The Ferengi Rules of Acquisition (DS9 reference book)
131+
#243|Always leave yourself an out.|Sacraments of Fire (DS9 novel)
132+
#248|The definition of insanity is trying the same failed scheme and expecting different results.|Department of Temporal Investigations: Shield of the Gods (DS9 novella)
133+
#255|A wife is luxury, a smart accountant a necessity.|The Ferengi Rules of Acquisition (DS9 reference book)
134+
#261|A wealthy man can afford anything except a conscience.|The Ferengi Rules of Acquisition (DS9 reference book)
135+
#263|Never allow doubt to tarnish your lust for latinum.|Bar Association (DS9 episode)
136+
#266|When in doubt, lie.|The Ferengi Rules of Acquisition (DS9 reference book)
137+
#267|If you believe it, they believe it.|Taking Wing (DS9 novel)
138+
#272|Always inspect the merchandise before making a deal.|The Abandoned (DS9 episode), Star Trek Online (video game)
139+
#280|If it ain't broke, don't fix it.|Ferenginar: Satisfaction is Not Guaranteed (DS9 novella)
140+
#284|Deep down, everyone's a Ferengi.|The Ferengi Rules of Acquisition (DS9 reference book)
141+
#285|No good deed ever goes unpunished.|The Collaborator (DS9 episode), The Sound of Her Voice (DS9 episode)
142+
#286 (inofficial)|When Morn leaves, it's all over.|The House of Quark (DS9 Episode)
143+
#287|Always get somebody else to do the lifting.|N-Vector (DS9 comic)
144+
#288|Never get into anything that you can't get out of.|N-Vector (DS9 comic)
145+
#289|A man is only worth the sum of his possessions.|Acquisition (ENT episode)
146+
#290|An angry man is an enemy, and a satisfied man is an ally.|Antimatter (DS9 novel)
147+
#291|The less employees know about the cash flow, the smaller the share they can demand.|Betrayal (DS9 novel)
148+
#292|Only a fool passes up a business opportunity.|Elite Force II (video game)
149+
#293|The more time they take deciding, the more money they will spend.|Stowaways (DS9 novel)
150+
#294|A bargain usually isn't.|The Pet (DS9 novel)
151+
#299|Whenever you exploit someone, it never hurts to thank them. That way, it's easier to exploit them the next time.|False Profits (VOY episode)
152+
#431|When the shooting starts, let the mercenaries handle it.|Star Trek Online (video game)
153+
(inofficial)|Exploitation begins at home.|False Profits (VOY episode)
154+
(inofficial, aka "The Unwritten Rule")|When no appropriate rule applies, make one up.|False Profits (VOY episode)
155+
(inofficial)|When the messenger comes to appropriate your profits, kill the messenger.|False Profits (VOY episode)
156+
(inofficial)|Money is money, but females are better.|Life Support (DS9 episode)
157+
(inofficial)|Why ask, when you can take?|Babel (DS9 episode)
158+
(inofficial)|Good things come in small packages.|Move Along Home (DS9)
159+
(inofficial)|A distracted policeman is an opportunity.|The Sound of Her Voice (DS9 episode)

0 commit comments

Comments
 (0)