Overview
Comment: | Added manual, tweaked session.scm to use dbi |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: |
19d7e34d295215ae0fc665abd2b7a304 |
User & Date: | matt on 2012-08-02 15:48:50 |
Other Links: | manifest | tags |
Context
2012-08-02
| ||
18:41 | Cleaned up and got working on orion check-in: ceb2c8c436 user: matt tags: trunk | |
15:48 | Added manual, tweaked session.scm to use dbi check-in: 19d7e34d29 user: matt tags: trunk | |
2012-07-27
| ||
21:20 | removed unnecessary logging output check-in: 3e61eb47cb user: matt tags: trunk | |
Changes
Added doc/Makefile version [93337f215f].
> > > > > > > | 1 2 3 4 5 6 7 | all : manual.pdf web-page.html manual.pdf : manual.txt a2x -a toc -f pdf manual.txt # asciidoc -a toc plan.txt a2x -f chunked -a toc manual.txt |
Added doc/manual.txt version [e0056722e2].
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 | STML User Manual ================ Matt Welland <matt@kiatoa.com> v1.0, 2012-6 FriendMaker is a minimalistic tool to help bring like-minded people together on sites such Second Life. :numbered!: [abstract] Example Abstract ---------------- Due to the anonymous nature of sites such as Second Life meeting like-minded and compatible people can be somewhat hit-or-miss. The FriendMaker project (a subproject of the KiaToa project) sets out to improve the quality of connections made by increasing the probability of compatible people attending any given event. Special thanks to kellogglicious who inspired this work and has been a wonderful and supportive assistant in-world. :numbered: User Data Specification ----------------------- .User Data [width="100%",options="header",cols="<s,2m,2e,2e,2e",frame="topbot"] |============================== | Field | Field Template |Short form| Example | Description | Age centerpoint | :age |:a | :age 30 | The center point of the age range that you are interested in meeting. E.g. If you wish to meet people from 25-35 years in age then the agecp would be 30 | Sex | :sex |:s | :sex m | Male (m) or female (f) | Orientation | :orientation |:o | :orientation s | Straight (s), gay (g), bi (b) | Country | :country |:c | :country us | Two letter country code | State or region | :state or :region |:r | :state az | Two letter state code or region code | City or town | :city or :town |:to | :city Tempe | City or town name, note case is ignored | Best time | :besttime |:bt | :besttime afternoon,evening | Times user is most likely to be on, list of; any, evening, morning, afternoon or time range | Best days | :bestdays |:bd | :bestdays mon,tues,fri,sun | Days user is most likely to be on | Interests | :interests |:i | :interests romance, live music, sailing,theater | List of interests, i.e activities in SL you want to do | Likes | :likes |:l | :likes rock, jazz, blues | List of things liked, used to narrow down music liked etc. |============================== // | <user items> | :useritem | | User supplied key value pairs. // | Age | ::age | age 35 | NOT INITIALLY SUPPORTED Your age // | agewant | :agewant | :agewant 30 | NOT INITIALLY SUPPORTED The ideal partner age // | Compound commands (NOT yes supported, are they needed?)| | | // | About me | :me | :me m s us az Tempe 35 | Compact way to enter the basic info // | Location | :location | :location us az Tempe | One line entry of location for country, state/region and city/town // Compact forms (NOT supported yet) // // :me <sex> <orient> <country> <state> <city> <age cp> [<best time> [<best days>]] // :location <country> <state> <city> // // .Example compact forms // ----------------------------- // :me f s us ca Burbank 25 // // note: If your city has spaces in the name it is best to use some short form // // :me f s us ca sanfran 25 // ----------------------------- Interests --------- mingling dancing conversation exploring Likes ----- Age Specification ~~~~~~~~~~~~~~~~~ Initially only agecp will be supported. In future either specify agecp or specify age and agewant. If both are specified then agecp will be used. The agecp idea works by clustering people around agecp numbers. A statistical analysis is done on the aggregate agecp data and clusters are identified, sliding group scales are applied and finally individuals are placed in groups. Group edges are changed with every iteration. The probablity of being in a group will be roughly a bell curve of the individual agecp with the group agecp. General Comments ~~~~~~~~~~~~~~~~ - The last setting is retained and the old value is lost. User Commands ~~~~~~~~~~~~~ .User Commands [width="100%",options="header",cols="<s,2m,2e",frame="topbot"] |============================== | Command | Description | Example | showme | Show my settings | showme | delete setting | Remove setting | delete interests | deleteme | Remove my record | |============================== Controller Commands ~~~~~~~~~~~~~~~~~~~ .Controller Commands [width="100%",options="header",cols="<s,2m,2e",frame="topbot"] |============================== | Command | Description | Example | addvenue [venue] [master] | Registers a venue and enables named avi to submit events, square brackets are required | addvenue [Tom Thumb] [Fishers Island] |============================== Event Specification ------------------- Events are specified with a minimalist format intended to be unambiguous and yet fairly easy to type. This must be typed in as a single line. .Data Types [width="100%",options="header",cols="<s,2m,2e,2e,2e,2e",frame="topbot"] |============================== | Field | Key | Short Key | Field Template | Example | Description | Date/Time spec | :time | :t | mm/dd/yy h AM/PM/am/pm | 08/19/12 2 PM | Start time of event | | | | mm/dd/yyyy h AM/PM/am/pm | 08/19/2012 8 pm | Start time with full year, lowercase am/pm ok | Venue name | :venue | :v | Venue name | Blue Marbles Jazz | Generic name for the location | Location spec | :location | :l | Sim Name/1/2/3 | Sky Vista/1/2/3 | Second life location | Event type | :event | :e | type | livemusic,dancing | Type of event | Performer | :performer | :p | Firstname Lastname | Bo Carter | Name of performer if applicable | Genre | | :g | genre1, genre2 | jazz, blues | Genre of music | Description | :description | :d | | | |============================== .Example events ----------------------------- :time 08/19/12 2 PM :venue Blue Marbles Jazz :location Sky Vista/1/2/3 :performer Bo Carter :event livemusic :genre light rock :description Let Bo Carter rock your night away. Or use shorter form: :t 06/28/12 9 PM :v Cove of dreams :l Fishers Island/15/116/24 :e livemusic :p BoCarter :g rock,jazz :d Join us for two hours of Bo Carter at Fishers Island at 9pm. :t 06/28/12 8 PM :v The Oval :l Thira/95/139/40 :e livemusic :p Torben Asp :g new_age :d Float into the Recreative Universe of Torben Asp at 8pm for a one hour show. ----------------------------- Event suggestions are keyed by the sender. If the sender is a registered venue master then the event is displayed on the calendar. Other events are revealed on the calendar by the number of suggestions received. Events are keyed by an exact match on start time and venue name. // Compact Event Specification // --------------------------- // // This is just an idea. Not settled on or ratified. // // ----------------------- // 07/05/2012 // 02:00 PM // :v Mystery :l Crescent/80/98/117 :e livemusic :p Alazarin Mobius :g furry rock :d Second life's only major furry band // :v Bella Vida :l Bella Vida/131/208/22 :e livemusic :p Curtis Cortes :g light rock :d Curtis sings songs from such artists as Stevie wonder, Beatles, Joe Cocker and Elton John // ----------------------- <<<<<<<<<<<<<<<<< Master Commands --------------- .Master Commands .User Commands [width="100%",options="header",cols="<s,2m,2e",frame="topbot"] |============================== | Command | Description | Example | follow [av-name] | Have friendmaker follow the named avi, you should have "see on map" enabled to be followed | follow kiatoa resident | follow - | Stop friendmaker from following | | shadow [0\|1] | Have friendmaker follow you (the master), 1 is "on" and 0 is "off", you must have "see on map" enabled for friendmaker | shadow 1 | logout | Log friendmaker out | | wear [folder] | Have friendmaker wear the outfit from folder | wear sexyone | outfit | Restore outfit | | cd [folder] | make folder current | cd My Outfits | ls [folder] | List inventory folder | ls outfits | f, b, l, r, n, e, s, w | Move front, back, left, right, face north, east, south, west | f | visit | Take me to the bot | |============================== Interests and Likes Matching ---------------------------- .Interests and likes matching example table [width="100%",options="header",cols="<2m,2m,2m,2m,2m",frame="topbot"] |============================== | Interests | Likes | Event | Genre | Score | livemusic | rock | livemusic | rock | 1 1 | livemusic,dancing | jazz | livemusic,dancing | jazz | 1 1 |============================== Grouping Algorythm ------------------ A multi pass methodology is used. On every pass the constraints are loosened. Passes continue to be made until all people have been assigned to groups. Groups are considered full at 40 people. ------------------------- while events to fill while persons to process foreach person foreach group if person within tol add to group remove person from pool ------------------------- Plan ---- Today ~~~~~ . Manual data entry method . Snapshot of logs [Not really necessary?] .. Busy mode .. wait 10 sec .. Copy logfile .. cat /dev/null > logfile Done Stuff ~~~~~~~~~~ . ENSURE THAT AUTO ADDED PEOPLE DO NOT GET IM's UNTIL THEY SET SOME VARIABLE [DONE] . Auto add from GIM [DONE] . Correct pm to PM [DONE] . Safely preserve single quotes [DONE] . Trim region/state to two letters [DONE] . Trim male, female and hermaphrodite to m, f, h [DONE] . Trim straight, gay, bisexual to s, g, b [DONE] . Transition to names table [DEFERED] . Create calendar page [DONE] . Create rough run script/makefile [DONE] . Sort by date [DONE] . Create stats page [DONE] . Add first three people to interests/likes for event, fix connections [DONE (well, good enough for now)] . Send IM's .. :aboutme [DONE] .. notice of event [DONE] .. :delete - send acknowledgement [Cannot do, once deleted info needed is gone] . Prevent re-processing lines in chat and or remove "ignore" on [DONE] . Change agecp to age [DONE] . do not process chats from friendmaker resident [DONE] . Trim message queue [DONE] . Upgrade to latest pikkubot software [DONE] . Fix Anna [DONE (good enough)] . Write temporary web page [DONE] . Create calendar page sync [DONE] . Create stats page [DONE] . Set up rsync of temporary web page [DONE] . Request to send notecard with all keywords currently in use. Phase 1 ~~~~~~~ . Re-write temp web page, add graphic illustration. .. Get snapshot of IM window [DONE] . Integration [DONE] .. Run script ... read logs ... commit logs ... generate connections ... send IM's . Ensure defaults are good [DONE] .. agecp = 30 .. orientation = "s" .. location zxzxzx .. besttime = "evening" .. interests = livemusic .. likes = soft rock .. ensure date/time is normalized M/D/YY H AM/PM - yes [DONE (leading zeros and 2012 fixed)] Phase 2 ~~~~~~~ . :matchfactor => set your minimum matchfactor . :bug and :message => send a bug report or message to kiatoa . Keep stats for friends on/offline and sometimes check for online using search. . Support this format: Bill473 Live @ Lost Lovers Dancing Club at 8 am description . Process payments . Get alt locations working Sim (x,y,z)\s+.* . Limit number of IM's per day or per hour . Limit number of events per person . Lowercase all data . Add underscores for cities . Data safety, remove quotes [DONE] . Add needed commands .. :me .. :addlike, :addinterest .. :success - for when friendmaker succeeded in help . Create friendmaker@kiatoa.com . Add :agree yes/no and agreement to web doc . Add payment processing . Add :help, :feedback Phase 3 ~~~~~~~ . For dating with a sophisticated hint of "flirt" check out Friendmaker. . Need a server, never goes down . Cron job(s) . Integrate with KiaToa . Setup fetchmail and procmail for friendmaker - delay for now. Notes ----- Maintenance mode 1. switch to autorespond "Anna is in offline mode, please try again in one hour" 2. copy the chat log to log.date 3. cat /dev/null > log 4. switch to autorespond "Thank you for using the friendmaker service!" Leon Anna Schema ------ ------------------------ sqlite> .schema CREATE TABLE events (id INTEGER PRIMARY KEY, event_time TEXT DEFAULT '', venue TEXT DEFAULT '', location TEXT DEFAULT '', event TEXT DEFAULT '', genre TEXT DEFAULT '', performer TEXT DEFAULT '', description TEXT DEFAULT '', CONSTRAINT eventsconstraint UNIQUE (event_time, venue)); CREATE TABLE groupedwith (id INTEGER PRIMARY KEY,grouped_id INTEGER,person_id INTEGER); CREATE TABLE logs (id INTEGER PRIMARY KEY,logfname TEXT,lasttime INTEGER); CREATE TABLE people (id INTEGER PRIMARY KEY, firstname TEXT, lastname TEXT, target_age INTEGER DEFAULT 25, sex TEXT DEFAULT 'n', orientation TEXT DEFAULT 's', country TEXT DEFAULT 'zx', region TEXT DEFAULT 'zx', city TEXT DEFAULT 'zx', best_time TEXT 'any', interests TEXT DEFAULT '', likes TEXT DEFAULT '', points INTEGER DEFAULT 0, CONSTRAINT valsconstraint UNIQUE (firstname, lastname)); ------------------------ |
Modified session.scm from [d30d52ed8a] to [2551ba7b15].
︙ | ︙ | |||
360 361 362 363 364 365 366 | (define (session:extract-key self key) (let ((params (sdat-get-params self))) (session:extract-key-from-param self params key))) (define (session:extract-key-from-param self params key) (let ((r1 (regexp (string-append "^" key "=([^=]+)$")))) | | | | 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 | (define (session:extract-key self key) (let ((params (sdat-get-params self))) (session:extract-key-from-param self params key))) (define (session:extract-key-from-param self params key) (let ((r1 (regexp (string-append "^" key "=([^=]+)$")))) (err:log "INFO: Looking for " key " in " params) (if (< (length params) 1) #f (let loop ((head (car params)) (tail (cdr params))) (let ((match (string-match r1 head))) (cond (match (let ((session-key (list-ref match 1))) (err:log "INFO: Found session key=" session-key) (sdat-set-session-key! self (list-ref match 1)) session-key)) ((null? tail) #f) (else (loop (car tail) (cdr tail))))))))) |
︙ | ︙ |