summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoremkael <emkael@tlen.pl>2021-10-22 03:06:26 +0200
committeremkael <emkael@tlen.pl>2021-10-22 03:06:26 +0200
commit86bb0b9d17ae7b1dc0a98b2dd836e2e0adfc8a1f (patch)
tree356d83a88cab4bde6ec613c877ccd7f7e500eb71
parentb0cd66f6c50e954b497cda752dc46ae509081223 (diff)
Revert "Autocommit"
This reverts commit b0cd66f6c50e954b497cda752dc46ae509081223.
-rw-r--r--_cron/autocommit2
-rw-r--r--_cron/playoff2
m---------http0
m---------playoff0
-rw-r--r--rozklady/get-tc-boards.py15
-rwxr-xr-xrozklady/scrape-boards.py54
6 files changed, 2 insertions, 71 deletions
diff --git a/_cron/autocommit b/_cron/autocommit
index 5243ac8..52e9ad0 100644
--- a/_cron/autocommit
+++ b/_cron/autocommit
@@ -1,3 +1,3 @@
# SHELL=/bin/bash
-# */5 * * * * cd $SITEPATH && source .envrc && make autocommit >> $SITEPATH/_log/autocommit.log
+# */10 * * * * cd $SITEPATH && source .envrc && make autocommit >> $SITEPATH/_log/autocommit.log
# SHELL=/bin/sh
diff --git a/_cron/playoff b/_cron/playoff
index 2a22dfa..2fd7400 100644
--- a/_cron/playoff
+++ b/_cron/playoff
@@ -1,3 +1,3 @@
# SHELL=/bin/bash
-# */3 * * * * cd $SITEPATH && source .envrc && make brackets > $SITEPATH/_log/playoff.log 2>&1
+# */2 * * * * cd $SITEPATH && source .envrc && make brackets > $SITEPATH/_log/playoff.log 2>&1
# SHELL=/bin/sh
diff --git a/http b/http
-Subproject c4df0b0e005834dcdb8d8d22ee1f22c06fa1f9d
+Subproject 2741cf5142edc019065a5ca26dd07be4e60aa49
diff --git a/playoff b/playoff
-Subproject ea9d17a8cdcb94d33a97b1f27d41a6fd303cf1e
+Subproject 1456882790affa487c565f92751bdd193ca2524
diff --git a/rozklady/get-tc-boards.py b/rozklady/get-tc-boards.py
deleted file mode 100644
index 637a95c..0000000
--- a/rozklady/get-tc-boards.py
+++ /dev/null
@@ -1,15 +0,0 @@
-import json, sys
-
-for fpath in sys.argv[1:]:
- jsfile = json.load(open(fpath))
- print('[Board "%d"]' % (jsfile['ScoringGroups'][0]['Distribution']['_numberAsPlayed']))
- board = []
- for hand in ['N', 'E', 'S', 'W']:
- board.append('%s.%s.%s.%s' % (
- jsfile['ScoringGroups'][0]['Distribution']['_handRecord']['Hand'+hand]['Spades'],
- jsfile['ScoringGroups'][0]['Distribution']['_handRecord']['Hand'+hand]['Hearts'],
- jsfile['ScoringGroups'][0]['Distribution']['_handRecord']['Hand'+hand]['Diamonds'],
- jsfile['ScoringGroups'][0]['Distribution']['_handRecord']['Hand'+hand]['Clubs']
- ))
- print('[Deal "N:%s"]' % (' '.join(board).replace('10', 'T')))
- print('')
diff --git a/rozklady/scrape-boards.py b/rozklady/scrape-boards.py
deleted file mode 100755
index 5f7ea7f..0000000
--- a/rozklady/scrape-boards.py
+++ /dev/null
@@ -1,54 +0,0 @@
-from bs4 import BeautifulSoup as bs
-import bs4
-import os
-import sys
-
-traveller_file = file(sys.argv[1])
-traveller = bs(traveller_file, 'lxml')
-
-print '% PBN 1.0'
-print '[Generator "JFRTeamy-restorerer"]'
-print '[Event "%s"]' % (traveller_file.name)
-
-board_links = traveller.select('td.bdcc a.zb')
-for board_link in board_links:
- if board_link.has_attr('href'):
- sys.stderr.write(board_link['href'] + "\n")
- board_number = board_link.text.strip()
- board_file = open(
- os.path.join(
- os.path.dirname(traveller_file.name),
- board_link['href']
- )
- )
- board = bs(board_file, 'lxml')
- conditions = [
- c for c in
- board.select('td[valign="top"] h4')[0].contents
- if type(c) == bs4.element.NavigableString
- ]
- dealer = conditions[0].strip()
- vulnerability = conditions[1].title()
- if len(vulnerability) < 3:
- vulnerability = vulnerability.upper()
- card_cells = board.select('td.w')
- sys.stderr.write(str(card_cells))
- sys.stderr.write("\n")
- if len(card_cells) == 4:
- cards = [
- [
- line.replace('10', 'T').replace(' ', '').strip()
- for line in c
- if type(line) == bs4.element.NavigableString and line != "\n"
- ] for c in card_cells
- ]
- print '[Board "%s"]' % board_number
- #print '[Dealer "%s"]' % dealer
- #print '[Vulnerable "%s"]' % vulnerability
- print '[Deal "N:%s %s %s %s"]' % (
- '.'.join(cards[0]),
- '.'.join(cards[2]),
- '.'.join(cards[3]),
- '.'.join(cards[1])
- )
- print